May 25, 2012

Post: InnoDB's gap locks

…create locks to prevent that from happening. 2- innodb_locks_unsafe_for_binlog = 1. Disables the gap locks except for foreign-key constraint checking or duplicate-key…source of information: http://dev.mysql.com/doc/refman/5.1/en/innodb-locks-set.html. Conclusion MySQL uses REPEATABLE READ as the …

Post: Best kept MySQLDump Secret

…00 sec) mysql> …InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; — – Dumping data for table `C` — LOCKKEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY

Post: Instrumentation and the cost of Foreign Keys

KEY (id), KEY (parent_id), CONSTRAINT child_ibfk_1 FOREIGN KEY (parent_id) REFERENCES parent (id) ) ENGINE=InnoDB

Post: Improved InnoDB fast index creation

key: mysql> CREATE TABLE t(id INT AUTO_INCREMENT PRIMARY KEY, c FLOAT) ENGINE=InnoDB; Query OK, 0 rows affected (0.00 sec) mysqllockkeys that are part of a FOREIGN KEY constraint; mysqldump –innodb-optimize-keys ignores foreign keys because InnoDB requires a full table rebuild on foreign key

Post: Ultimate MySQL variable and status reference list

MySQL manual….commanual foreign_key_checksblogpercona….Innodb_row_lock_current_waitsblogpercona.commanual Innodb_row_lock_timeblogpercona.commanual Innodb_row_lock_time_avgblogpercona.commanual Innodb_row_lock_time_maxblogpercona.commanual Innodb_row_lock_waitsblogpercona.commanual Innodb

Post: SHOW INNODB STATUS walk through

INNODB STATUS is good enough. As for deadlock information we have similar information about last failed foreign key constraint: ———————— LATEST FOREIGN KEYMySQL thread id 9697561, query id 188161264 localhost root update insert into child values(2,2) Foreign key

Post: Heikki Tuuri Innodb answers - Part I

… works – it is global MySQL Server option, though it may have problems on Linux if you lock very large portion of physical… different CPUs. Q25: In InnoDB, the referenced columns of a foreign key constraint need not form a primary key or a unique constraint: it… that suppors foreign key constraints)? Any concrete examples are appreciated. HT: Yes, it is sufficient that a foreign key and the referenced key appear as…

Post: MySQL Error Message Nonsenses

… 150 MySQL error code 150: Foreign key constraint is incorrectly formed What is also interesting is – this error 150 is in fact internal Innodb… engines we surely saw lock related tables being far from consistent. Let me give you another example. So Innodb has limit of… error is foreign key related but you also need to run SHOW INNODB STATUS to see what exactly Innodb did not like about foreign key constraint…

Post: Percona Server 5.1.59-13.0

… overhead from locking rows only …InnoDB requires a full table rebuild for foreign key changes. This unnecessarily delays their creation in a mysqldump output, so –innodb-optimize-keys should ignore foreign keyInnoDB in the absence of a PRIMARY KEY. #851674 (Alexey Kopytov). Backported fix for MySQL

Post: Percona Server 5.5.16-22.0

… Software Repositories). Based on MySQL 5.5.16, including …but has high overhead from locking rows only to undo changes…InnoDB requires a full table rebuild for foreign key changes. This unnecessarily delays their creation in a mysqldump output, so –innodb-optimize-keys should ignore foreign key