June 19, 2013

Post: Rotating MySQL slow logs safely

…, and then truncates the original file. no copytruncate – Uses the rename() system call to move the file to a new name… MySQL bug 65481 explains that the HUP signal also flushes tables in addition to logs. Flushing tables can impact running queries. Disable MySQL slow… practices: /var/mysql/slow_query.log { nocompress create 660 mysql mysql size 1G dateext missingok notifempty sharedscripts postrotate /usr/local/bin/mysql -e ‘select…

Post: Announcing Percona XtraBackup 2.1.1 GA

…, XtraBackup drives down backup costs while providing unique features for MySQL backup. The new 2.1.1 GA version offers improved…. innobackupex now uses Perl’s DBD::MySQL package for server communication instead of spawning the MySQL command line client. Support for InnoDB… #1172016. Percona XtraBackup would assume the table has been dropped if the tablespace was renamed after it was scanned by XtraBackup on…

Post: MySQL 5.6 Compatible Percona Toolkit 2.2 Released

… how. There’s still one noticeable omission: pt-table-sync. It’s still unclear if or how … options that probably nobody ever used, and changed/renamed other options to be more logical. The result … (http) connection. pt-stalk and pt-mysql-summary have built-in MySQL options No more “pt-stalk — -h db1…

Post: Ultimate MySQL variable and status reference list

… referring to the amazing MySQL manual, especially the option and variable reference table. But just as frequently,…dateblogpercona.commanual Com_release_savepointblogpercona.commanual Com_rename_tableblogpercona.commanual Com_rename_userblogpercona.commanual Com_repairblogpercona.commanual Com…

Post: MySQL opening .frm even when table is in table definition cache

… an instance of MySQL with 100 tables and the table_definition_cache set to 1000. My understanding of this is that MySQL won’t… in the server: DROP TABLE RENAME TABLE DROP VIEW open table filling INFORMATION_SCHEMA tables (I think it is actually the TABLES table, but didn’t look closely) An example of how this is used is that in the DROP TABLE code path, MySQL

Post: Resyncing table on MySQL Slave

rename table instead of locking – for many applications this works better anyway as having table locked causes connections to pile up and either MySQL… can do following instead: mysql> rename table rep to rep_maint; Query OK, 0 rows affected (0.01 sec) mysql> select * from rep_maint…’ into table rep_new; Query OK, 0 rows affected (0.01 sec) Records: 0 Deleted: 0 Skipped: 0 Warnings: 0 mysql> rename table rep…

Post: On Character Sets and Disappearing Tables

… what happens: (root@localhost) [foobar]> ALTER TABLE bar drop j; ERROR 1025 (HY000): Error on rename of ‘./foobar/#sql-3c13_11′ to…) character set ascii not null; ERROR 1025 (HY000): Error on rename of ‘./oops4/#sql-3c13_14′ to ‘./oops4/dos2′ (errno: 150… tables or rename them. This looks somewhat like closed bug 13378, but I think there’s something of an inconsistency present when MySQL

Post: Logging Foreign Key errors

… CASCADE The index in the foreign key in table is “PRIMARY” See http://dev.mysql.com/doc/refman/5.5/en/innodb-foreign-key-constraints.html for correct foreign key definition. InnoDB: Renaming table `employees10… KEY. So, the command that causes the error was: mysql> ALTER TABLE employees DROP PRIMARY KEY; Conclusion If you are having too…

Post: Percona Toolkit 2.1.8 released today with beta support for MySQL 5.6

…. Fixed bug 1015590: pt-mysql-summary doesn’t handle renamed variables in Percona Server 5.5. Some renamed variables had caused the Percona Server section to work unreliably. Fixed bug 1074179: pt-table-checksum doesn’t ignore tables for…, and the tool uses the information_schema to find child tables, this could cause unnecessary load on the server. Percona Toolkit…