diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-11-11 22:27:03 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-11-13 11:12:29 +0200 |
commit | e94c9d24f6e2942f473a59af271dbd5aff60e8b4 (patch) | |
tree | 9483258b3a7cdaff15b0adaaf3437ef1802b10d9 /mysql-test/suite/innodb/r/innodb-alter-tempfile.result | |
parent | a48aa0cd569eda88bef98ed4abe41b0b570fcd51 (diff) | |
download | mariadb-git-e94c9d24f6e2942f473a59af271dbd5aff60e8b4.tar.gz |
MDEV-14378 In ALGORITHM=INPLACE, use a common name for the intermediate tables or partitions
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.
Diffstat (limited to 'mysql-test/suite/innodb/r/innodb-alter-tempfile.result')
-rw-r--r-- | mysql-test/suite/innodb/r/innodb-alter-tempfile.result | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/mysql-test/suite/innodb/r/innodb-alter-tempfile.result b/mysql-test/suite/innodb/r/innodb-alter-tempfile.result index ce13ad0978b..b164c3c26b0 100644 --- a/mysql-test/suite/innodb/r/innodb-alter-tempfile.result +++ b/mysql-test/suite/innodb/r/innodb-alter-tempfile.result @@ -4,17 +4,10 @@ # 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. -# Crash the server in ha_innobase::commit_inplace_alter_table() CREATE TABLE t1 (f1 INT NOT NULL, f2 INT NOT NULL) ENGINE=innodb; -SET debug='d,innodb_alter_commit_crash_before_commit'; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead -# Write file to make mysql-test-run.pl expect crash -# Execute the statement that causes the crash +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 -# Startup the server after the crash -# Read and remember the temporary table name show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -23,13 +16,6 @@ t1 CREATE TABLE `t1` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1 # Consecutive Alter table does not create same temporary file name ALTER TABLE t1 ADD PRIMARY KEY (f2, f1); -# Shutdown the server to allow manual recovery -# Manual recovery begin. The dictionary was not updated -# and the files were not renamed. The rebuilt table -# was left behind on purpose, to faciliate data recovery. -# Manual recovery end -# Startup the server after manual recovery -# Drop the orphaned rebuilt table. show create table t1; Table Create Table t1 CREATE TABLE `t1` ( |