mariadb/mysql-test/suite/atomic
Aleksey Midenkov 69724805bc MDEV-22165 CONVERT TABLE: move in partition from existing table
Syntax for CONVERT TABLE

ALTER TABLE tbl_name CONVERT TABLE tbl_name TO PARTITION partition_name partition_spec

Examples:

    ALTER TABLE t1 CONVERT TABLE tp2 TO PARTITION p2 VALUES LESS THAN MAX_VALUE();

New ALTER_PARTITION_CONVERT_IN command for
fast_alter_partition_table() is done in alter_partition_convert_in()
function which basically does ha_rename_table().

Table structure and data check is basically the same as in EXCHANGE
PARTITION command. And these are done by
compare_table_with_partition() and check_table_data().

Atomic DDL is done by the scheme from MDEV-22166 (see the
corresponding commit message). The only differnce is that it also has
to drop source table frm and that is done by WFRM_DROP_CONVERTED_FROM.

Initial patch was done by Dmitry Shulga <dmitry.shulga@mariadb.com>
2021-10-26 17:07:46 +02:00
..
alter_partition,innodb.rdiff MDEV-22165 CONVERT TABLE: move in partition from existing table 2021-10-26 17:07:46 +02:00
alter_partition.combinations MDEV-22166 CONVERT PARTITION: move out partition into a table 2021-10-26 17:07:46 +02:00
alter_partition.result MDEV-22165 CONVERT TABLE: move in partition from existing table 2021-10-26 17:07:46 +02:00
alter_partition.test MDEV-22165 CONVERT TABLE: move in partition from existing table 2021-10-26 17:07:46 +02:00
alter_table.opt MDEV-25180 Atomic ALTER TABLE 2021-05-19 22:54:13 +02:00
alter_table.result MDEV-25910: Aim to make all InnoDB DDL durable 2021-06-16 09:03:02 +03:00
alter_table.test Speed up atomic test suite by improving wait_until_connected_again.inc 2021-05-24 21:04:40 +03:00
alter_table_aria.result Speed up atomic test suite by improving wait_until_connected_again.inc 2021-05-24 21:04:40 +03:00
alter_table_aria.test MDEV-25180 Atomic ALTER TABLE 2021-05-19 22:54:13 +02:00
alter_table_big_query.result MDEV-25180 Atomic ALTER TABLE 2021-05-19 22:54:13 +02:00
alter_table_big_query.test Speed up atomic test suite by improving wait_until_connected_again.inc 2021-05-24 21:04:40 +03:00
alter_table_rocksdb.result Speed up atomic test suite by improving wait_until_connected_again.inc 2021-05-24 21:04:40 +03:00
alter_table_rocksdb.test MDEV-25180 Atomic ALTER TABLE 2021-05-19 22:54:13 +02:00
alter_table_trigger.result MDEV-25180 Atomic ALTER TABLE 2021-05-19 22:54:13 +02:00
alter_table_trigger.test Speed up atomic test suite by improving wait_until_connected_again.inc 2021-05-24 21:04:40 +03:00
create_table.result
create_table.test Speed up atomic test suite by improving wait_until_connected_again.inc 2021-05-24 21:04:40 +03:00
create_trigger.result Speed up atomic test suite by improving wait_until_connected_again.inc 2021-05-24 21:04:40 +03:00
create_trigger.test Speed up atomic test suite by improving wait_until_connected_again.inc 2021-05-24 21:04:40 +03:00
create_trigger2.result
create_trigger2.test
create_view.result
create_view.test Speed up atomic test suite by improving wait_until_connected_again.inc 2021-05-24 21:04:40 +03:00
drop_db.result Speed up atomic test suite by improving wait_until_connected_again.inc 2021-05-24 21:04:40 +03:00
drop_db.test Speed up atomic test suite by improving wait_until_connected_again.inc 2021-05-24 21:04:40 +03:00
drop_db_long_names.opt
drop_db_long_names.result Speed up atomic test suite by improving wait_until_connected_again.inc 2021-05-24 21:04:40 +03:00
drop_db_long_names.test Speed up atomic test suite by improving wait_until_connected_again.inc 2021-05-24 21:04:40 +03:00
drop_sequence.result Speed up atomic test suite by improving wait_until_connected_again.inc 2021-05-24 21:04:40 +03:00
drop_sequence.test Speed up atomic test suite by improving wait_until_connected_again.inc 2021-05-24 21:04:40 +03:00
drop_table.result Speed up atomic test suite by improving wait_until_connected_again.inc 2021-05-24 21:04:40 +03:00
drop_table.test Speed up atomic test suite by improving wait_until_connected_again.inc 2021-05-24 21:04:40 +03:00
drop_trigger.result Speed up atomic test suite by improving wait_until_connected_again.inc 2021-05-24 21:04:40 +03:00
drop_trigger.test Speed up atomic test suite by improving wait_until_connected_again.inc 2021-05-24 21:04:40 +03:00
drop_view.result Speed up atomic test suite by improving wait_until_connected_again.inc 2021-05-24 21:04:40 +03:00
drop_view.test Speed up atomic test suite by improving wait_until_connected_again.inc 2021-05-24 21:04:40 +03:00
README.txt
rename_case.result
rename_case.test
rename_combinations.result
rename_combinations.test
rename_table.result
rename_table.test Speed up atomic test suite by improving wait_until_connected_again.inc 2021-05-24 21:04:40 +03:00
rename_table_binlog.result
rename_table_binlog.test Speed up atomic test suite by improving wait_until_connected_again.inc 2021-05-24 21:04:40 +03:00
rename_trigger.result
rename_trigger.test Speed up atomic test suite by improving wait_until_connected_again.inc 2021-05-24 21:04:40 +03:00
rename_view.result
rename_view.test
rename_view2.result
rename_view2.test

To debug a the ddl_recovery code in a failing ddl_recovery test one could do
the following:

- Add # before --exec echo "restart" ...
- Force $e (engine), $c (crash point) and $r (crash position) to the values
  where things goes wrong. See comments in alter_table.test for how to do this.
- start mariadbd in a debugger

run the following in the debugger
(Replace 'atomic.create_trigger' with the failing test case)

#break ha_recover
#break MYSQL_BIN_LOG::recover
#break MYSQL_BIN_LOG::open

break ddl_log_close_binlogged_events
break ddl_log_execute_action
break ddl_log_execute_recovery
run --datadir=/my/maria-10.6/mysql-test/var/log/atomic.create_trigger/mysqld.1/data --log-basename=master --log-bin-index=mysqld-bin.index --debug --log-bin