mirror of
https://github.com/MariaDB/server.git
synced 2025-07-24 19:42:23 +03:00
Allow DROP TABLE `#mysql50##sql-...._.` to drop tables that were being rebuilt by ALGORITHM=INPLACE NOTE: If the server is killed after the table-rebuilding ALGORITHM=INPLACE commits inside InnoDB but before the .frm file has been replaced, then the recovery will involve something else than DROP TABLE. NOTE: If the server is killed in a true inplace ALTER TABLE commits inside InnoDB but before the .frm file has been replaced, then we are really out of luck. To properly handle that situation, we would need a transactional mysql.ddl_fixup table that directs recovery to rename or remove files. prepare_inplace_alter_table_dict(): Use the altered_table->s->table_name for generating the new_table_name. table_name_t::part_suffix: The start of the partition name suffix. table_name_t::dbend(): Return the end of the schema name. table_name_t::dblen(): Return the length of the schema name, in bytes. table_name_t::basename(): Return the name without the schema name. table_name_t::part(): Return the partition name, or NULL if none. row_drop_table_for_mysql(): Assert for #sql, not #sql-ib.
27 lines
903 B
Plaintext
27 lines
903 B
Plaintext
#
|
|
# Bug #18734396 INNODB IN-PLACE ALTER FAILURES BLOCK FUTURE ALTERS
|
|
#
|
|
# Temporary tablename will be unique. This makes sure that future
|
|
# in-place ALTERs of the same table will not be blocked due to
|
|
# temporary tablename.
|
|
CREATE TABLE t1 (f1 INT NOT NULL, f2 INT NOT NULL) ENGINE=innodb;
|
|
SET debug_dbug='+d,innodb_alter_commit_crash_before_commit';
|
|
ALTER TABLE t1 ADD PRIMARY KEY (f2, f1);
|
|
ERROR HY000: Lost connection to MySQL server during query
|
|
show create table t1;
|
|
Table Create Table
|
|
t1 CREATE TABLE `t1` (
|
|
`f1` int(11) NOT NULL,
|
|
`f2` int(11) NOT NULL
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
|
# Consecutive Alter table does not create same temporary file name
|
|
ALTER TABLE t1 ADD PRIMARY KEY (f2, f1);
|
|
show create table t1;
|
|
Table Create Table
|
|
t1 CREATE TABLE `t1` (
|
|
`f1` int(11) NOT NULL,
|
|
`f2` int(11) NOT NULL,
|
|
PRIMARY KEY (`f2`,`f1`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
|
drop table t1;
|