mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
MDEV-14425 preparation: Remove log_t::append_on_checkpoint
Simplify the logging of ALTER TABLE operations, by making use of the
TRX_UNDO_RENAME_TABLE undo log record that was introduced in
commit 0bc36758ba.
commit_try_rebuild(): Invoke row_rename_table_for_mysql() and
actually rename the files before committing the transaction.
fil_mtr_rename_log(), commit_cache_rebuild(),
log_append_on_checkpoint(), row_merge_rename_tables_dict(): Remove.
mtr_buf_copy_t, log_t::append_on_checkpoint: Remove.
row_rename_table_for_mysql(): If !use_fk, ignore missing foreign
keys. Remove a call to dict_table_rename_in_cache(), because
trx_rollback_to_savepoint() should invoke the function if needed.
This commit is contained in:
@@ -59,7 +59,7 @@ ALTER TABLE t1 ADD COLUMN d INT, ALGORITHM=COPY;
|
||||
#
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
|
||||
ERROR HY000: Tablespace for table 'test/t1' exists. Please DISCARD the tablespace before IMPORT
|
||||
ERROR HY000: Tablespace for table 'test/#sql-ib' exists. Please DISCARD the tablespace before IMPORT
|
||||
ALTER TABLE t1 FORCE, ALGORITHM=COPY;
|
||||
ERROR HY000: Error on rename of 'OLD_FILE_NAME' to 'NEW_FILE_NAME' (errno: 184 "Tablespace already exists")
|
||||
#
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
CREATE TABLE t1 (x INT NOT NULL UNIQUE KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES(5);
|
||||
SET GLOBAL innodb_log_checkpoint_now=TRUE;
|
||||
SET DEBUG_SYNC='commit_cache_rebuild SIGNAL ready WAIT_FOR finish';
|
||||
ALTER TABLE t1 FORCE;;
|
||||
connect con1,localhost,root,,;
|
||||
SET DEBUG_SYNC='now WAIT_FOR ready';
|
||||
SET GLOBAL innodb_log_checkpoint_now=TRUE;
|
||||
SET DEBUG_SYNC='now SIGNAL finish';
|
||||
disconnect con1;
|
||||
connection default;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`x` int(11) NOT NULL,
|
||||
UNIQUE KEY `x` (`x`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
SET DEBUG_SYNC='RESET';
|
||||
@@ -237,11 +237,7 @@ SET SESSION FOREIGN_KEY_CHECKS = OFF;
|
||||
ALTER TABLE t1 ADD FOREIGN KEY (f) REFERENCES non_existing_table (x);
|
||||
SET SESSION FOREIGN_KEY_CHECKS = ON;
|
||||
ALTER TABLE t1 ADD FULLTEXT INDEX ft1 (f);
|
||||
Warnings:
|
||||
Warning 1088 failed to load FOREIGN KEY constraints
|
||||
ALTER TABLE t1 ADD FULLTEXT INDEX ft2 (f);
|
||||
Warnings:
|
||||
Warning 1088 failed to load FOREIGN KEY constraints
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (f VARCHAR(256), FTS_DOC_ID BIGINT UNSIGNED PRIMARY KEY)
|
||||
ENGINE=InnoDB;
|
||||
|
||||
Reference in New Issue
Block a user