Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.6, 10.8, 10.9, 10.10, 10.11, 11.0
-
None
Description
I'm not sure if this is actually a replication problem or not. Before 10.6 with the test case below, the line
ALTER ONLINE TABLE `DD` RENAME TO t4, ADD geocol4 GEOMETRY DEFAULT ST_GEOMFROMTEXT('Point(1 1)'); |
doesn't error, and the subsequent commands error. But in 10.6 and above, it errors with:
ERROR 23000: Can't write; duplicate key in table 'mysql.innodb_table_stats'
|
and the remaining commands execute.
To reproduce
--source include/have_innodb.inc
|
--source include/master-slave.inc
|
--source include/have_binlog_format_row.inc
|
--disable_abort_on_error
|
 |
--connection master
|
USE test; |
CREATE OR REPLACE SEQUENCE `A` Engine=InnoDB; |
CREATE TABLE t4 LIKE `A`; |
# this errors but is needed for replication failure |
ALTER ONLINE TABLE t4 ADD CONSTRAINT g CHECK (icol5 > 3), DROP CONSTRAINT w, DROP CONSTRAINT v, ADD CONSTRAINT h PRIMARY KEY(icol2), ALGORITHM=DEFAULT, LOCK=NONE; |
CREATE OR REPLACE TABLE t4 (scol9 BLOB DEFAULT '' CHECK (`col_int_key` LIKE tcol1) ) Engine=InnoDB; |
CREATE OR REPLACE TABLE `DD` (geocol9 POLYGON ) Engine=InnoDB; |
ALTER ONLINE TABLE `DD` RENAME TO t4, ADD geocol4 GEOMETRY DEFAULT ST_GEOMFROMTEXT('Point(1 1)'); |
ALTER TABLE `DD` RENAME TO `D`; |
ALTER TABLE `D` ADD IF NOT EXISTS `col_varchar_key` BLOB NULL DEFAULT NULL, LOCK=SHARED; |
INSERT INTO `D` () VALUES (),(),(); |
--connection slave
|
--let $status_items= Last_SQL_Error, Slave_SQL_Running
|
--source include/show_slave_status.inc
|
--let $slave_param= Slave_SQL_Running
|
--let $slave_param_value= Yes
|
--source include/check_slave_param.inc
|
--connection master
|
DROP DATABASE test; |
CREATE DATABASE test; |
--source include/rpl_end.inc |