pt-online-schema-change clobbers database table when interrupted
Bug #1421027 reported by
monty solomon
This bug report is a duplicate of:
Bug #1450499: ReadKeyMini causes session to lock under some circumstances.
Edit
Remove
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Confirmed
|
High
|
Frank Cizmich |
Bug Description
pt-online-
After being interrupted, pt-osc renamed the new table to the original table even though nothing was inserted into it and then it deleted the old table.
pt-online-
CentOS release 6.5 (Final)
Linux 2.6.32-
tags: | added: pt-online-schema-change |
Changed in percona-toolkit: | |
status: | New → Confirmed |
tags: | added: i54636 |
tags: | added: i57992 |
Changed in percona-toolkit: | |
importance: | Undecided → High |
assignee: | nobody → Frank Cizmich (frank-cizmich) |
To post a comment you must log in.
Here is a sample log excerpt from a failed aborted run
SHOW GLOBAL STATUS LIKE 'Threads_running' SHOW_CREATE, @@SQL_QUOTE_ SHOW_CREATE := 1 */ DB`.`template` SHOW_CREATE := @OLD_QUOTE */ DB`.`template` WHERE 1=1 schema. key_column_ usage WHERE referenced_ table_schema= 'Clobbered_ DB' AND referenced_ table_name= 'template' SHOW_CREATE, @@SQL_QUOTE_ SHOW_CREATE := 1 */ DB`.`template` SHOW_CREATE := @OLD_QUOTE */ DB`.`_template_ new` ( DB`.`_template_ new` ADD COLUMN private tinyint(1) NOT NULL DEFAULT '0' SHOW_CREATE, @@SQL_QUOTE_ SHOW_CREATE := 1 */ DB`.`_template_ new` SHOW_CREATE := @OLD_QUOTE */ Clobbered_ DB_template_ del` AFTER DELETE ON `Clobbered_ DB`.`template` FOR EACH ROW DELETE IGNORE FROM `Clobbered_ DB`.`_template_ new` /*excised*/ Clobbered_ DB_template_ upd` AFTER UPDATE ON `Clobbered_ DB`.`template` FOR EACH ROW REPLACE INTO `Clobbered_ DB`.`_template_ new` /*excised*/ Clobbered_ DB_template_ ins` AFTER INSERT ON `Clobbered_ DB`.`template` FOR EACH ROW REPLACE INTO `Clobbered_ DB`.`_template_ new` /*excised*/ DB`.`template` WHERE 1=1 DB`.`template` FORCE INDEX (`PRIMARY`) /*excised*/ /*key_len*/ DB`.`template` FORCE INDEX(`PRIMARY`) /*excised*/ LIMIT 999, 2 /*next chunk boundary*/ DB`.`template` TO `Clobbered_ DB`.`_template_ old`, `Clobbered_ DB`.`_template_ new` TO `Clobbered_ DB`.`template` DB`.`_template_ old`
SHOW GLOBAL STATUS LIKE 'Threads_running'
SELECT CONCAT(@@hostname, @@port)
SHOW VARIABLES
SHOW TABLES FROM `Clobbered_DB` LIKE 'template'
SHOW TRIGGERS FROM `Clobbered_DB` LIKE 'template'
/*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_
USE `Clobbered_DB`
SHOW CREATE TABLE `Clobbered_
/*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_
EXPLAIN SELECT * FROM `Clobbered_
SELECT table_schema, table_name FROM information_
SHOW VARIABLES LIKE 'wsrep_on'
/*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_
USE `Clobbered_DB`
SHOW CREATE TABLE `Clobbered_
/*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_
CREATE TABLE `Clobbered_
ALTER TABLE `Clobbered_
/*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_
USE `Clobbered_DB`
SHOW CREATE TABLE `Clobbered_
/*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_
CREATE TRIGGER `pt_osc_
CREATE TRIGGER `pt_osc_
CREATE TRIGGER `pt_osc_
EXPLAIN SELECT * FROM `Clobbered_
SELECT /*!40001 SQL_NO_CACHE */ /*excised*/ LIMIT 1 /*first lower boundary*/
SELECT /*!40001 SQL_NO_CACHE */ /*excised*/ LIMIT 1 /*key_len*/
EXPLAIN SELECT /*!40001 SQL_NO_CACHE */ * FROM `Clobbered_
EXPLAIN SELECT /*!40001 SQL_NO_CACHE */ /*excised*/, `id` FROM `Clobbered_
RENAME TABLE `Clobbered_
DROP TABLE IF EXISTS `Clobbered_
SHOW TABLES FROM `Clobbered_DB` LIKE '\_template\_new'