Quantcast
Channel: MySQL Forums - InnoDB
Viewing all articles
Browse latest Browse all 1957

Phases and Problems with "ALTER TABLE" (no replies)

$
0
0
Hello,

We tried to ALTER a InnoDB TABLE with heavy update load. The ALTER TABLE failed many times. Perhaps Bug #37346 was hit.

I do not understand why ALTER TABLE needs and does not get a X-lock. The updates try to get a "Table lock" - I do not know either.

Regards,
Holger


CREATE TABLE "linemaker" (
"id" bigint(20) NOT NULL AUTO_INCREMENT,

...

CONSTRAINT "FKDAFD949415C85998" FOREIGN KEY ("fixationProfileId") REFERENCES "aux_tde_profile" ("id"),
CONSTRAINT "FKDAFD94944A7C5CF4" FOREIGN KEY ("tariffProfileId") REFERENCES "aux_tde_profile" ("id"),
CONSTRAINT "FKDAFD9494A04685C2" FOREIGN KEY ("lastFixationProfileId") REFERENCES "aux_tde_profile" ("id")
)




---TRANSACTION FDAF92A5, ACTIVE 113 sec, process no 11320, OS thread id 1274837344
mysql tables in use 1, locked 1
6 lock struct(s), heap size 1248, 2 row lock(s), undo log entries 3
MySQL thread id 1939362, query id 1707124888 peter.gedoens.de.gedoens.de 172.19.17.120 peter Table lock
update linemaker set lastChange='2010-11-11 08:47:53.0' where id=8426905
Trx read view will not see trx with id >= FDAF92A6, sees < FDAF92A2
---TRANSACTION FDAF92A2, ACTIVE 113 sec, process no 11320, OS thread id 1249810784 fetching rows
mysql tables in use 2, locked 2
LOCK WAIT 7425 lock struct(s), heap size 686520, 427687 row lock(s), undo log entries 420267
MySQL thread id 1938950, query id 1707100504 localhost root copy to tmp table
alter table linemaker add column firstMsnCc varchar(255), add column firstMsnNdc varchar(255), add column firstMsnSn varchar(255)
------- TRX HAS BEEN WAITING 79 SEC FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 665843 page no 55527 n bits 128 index `PRIMARY` of table `auxdb`.`linemaker` trx id FDAF92A2 lock_mode X waiting
Record lock, heap no 46 PHYSICAL RECORD: n_fields 61; compact format; info bits 0

Viewing all articles
Browse latest Browse all 1957

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>