mirror of
https://github.com/MariaDB/server.git
synced 2025-02-04 21:02:17 +01:00
2bd41fc5bf
Specifically: Revert "MDEV-29664 Assertion `!n_mysql_tables_in_use' failed in innobase_close_connection" This reverts commitba875e9396
. Revert "MDEV-29620 Assertion `next_insert_id == 0' failed in handler::ha_external_lock" This reverts commitaa08a7442a
. Revert "MDEV-29628 Memory leak after CREATE OR REPLACE with foreign key" This reverts commitc579d66ba6
. Revert "MDEV-29609 create_not_windows test fails with different result" This reverts commitcb583b2f1b
. Revert "MDEV-29544 SIGSEGV in HA_CREATE_INFO::finalize_locked_tables" This reverts commitdcd66c3814
. Revert "MDEV-28933 CREATE OR REPLACE fails to recreate same constraint name" This reverts commitcf6c517632
. Revert "MDEV-28933 Moved RENAME_CONSTRAINT_IDS to include/sql_funcs.h" This reverts commitf1e1c1335b
. Revert "MDEV-28956 Locking is broken if CREATE OR REPLACE fails under LOCK TABLES" This reverts commita228ec80e3
. Revert "MDEV-25292 gcol.gcol_bugfixes --ps fix" This reverts commit24fff8267d
. Revert "MDEV-25292 Disable atomic replace for slave-generated or-replace" This reverts commit2af15914cb
. Revert "MDEV-25292 backup_log improved" This reverts commit34398a20b5
. Revert "MDEV-25292 Atomic CREATE OR REPLACE TABLE" This reverts commit93c8252f02
. Revert "MDEV-25292 Table_name class for (db, table_name, alias)" This reverts commitd145dda9c7
. Revert "MDEV-25292 ha_table_exists() cleanup and improvement" This reverts commit409b8a86de
. Revert "MDEV-25292 Cleanups" This reverts commit595dad83ad
. Revert "MDEV-25292 Refactoring: moved select_field_count into Alter_info." This reverts commitf02af1d229
.
140 lines
3.9 KiB
Text
140 lines
3.9 KiB
Text
--source include/have_debug.inc
|
|
--source include/have_sequence.inc
|
|
--source include/have_innodb.inc
|
|
--source include/have_log_bin.inc
|
|
--source include/not_valgrind.inc
|
|
|
|
#
|
|
# Testing of atomic create table with crashes in a lot of different places
|
|
#
|
|
# We test both statement based logging and row logging as CREATE ... SELECT
|
|
# works a bit differently depending on the logging format
|
|
# First engine will use row logging and second engine will use statement
|
|
# based logging
|
|
#
|
|
|
|
--disable_query_log
|
|
call mtr.add_suppression("InnoDB: .* does not exist in the InnoDB internal");
|
|
# Speed up wait_until_connected_again.inc
|
|
let NO_WSREP=1;
|
|
RESET MASTER;
|
|
--enable_query_log
|
|
let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
|
|
|
if ($engine_count == "")
|
|
{
|
|
let $engine_count=2;
|
|
let $engines='myisam','innodb';
|
|
}
|
|
|
|
let $crash_count=9;
|
|
let $crash_points='ddl_log_create_before_create_frm', 'storage_engine_middle_of_create', 'ddl_log_create_before_create_table', 'ddl_log_create_after_create_table', 'ddl_log_create_after_drop', 'ddl_log_create_before_binlog', 'ddl_log_create_after_prepare_eof', 'ddl_log_create_after_binlog', 'ddl_log_create_log_complete';
|
|
|
|
let $statement_count=6;
|
|
let $statements='CREATE TABLE t1 (a int)',
|
|
'CREATE OR REPLACE TABLE t2 (a int)',
|
|
'CREATE TABLE t1 LIKE const_table',
|
|
'CREATE OR REPLACE TABLE t2 LIKE const_table',
|
|
'CREATE TABLE t1 SELECT * from t2',
|
|
'CREATE OR REPLACE TABLE t2 SELECT * from const_table';
|
|
|
|
create table const_table (a int, b int) engine=myisam;
|
|
insert into const_table values (1,1),(2,2);
|
|
flush tables;
|
|
|
|
let $old_debug=`select @@debug_dbug`;
|
|
|
|
let $e=0;
|
|
let $keep_include_silent=1;
|
|
let $grep_script=CREATE|DROP;
|
|
--disable_query_log
|
|
|
|
while ($e < $engine_count)
|
|
{
|
|
inc $e;
|
|
let $engine=`select ELT($e, $engines)`;
|
|
let $default_engine=$engine;
|
|
let $extra_option=;
|
|
|
|
if ($engine == "aria")
|
|
{
|
|
let $extra_option=transactional=1;
|
|
}
|
|
if ($engine == "aria_notrans")
|
|
{
|
|
let $default_engine="aria";
|
|
let $extra_option=transactional=0;
|
|
}
|
|
--echo engine: $engine
|
|
|
|
let $r=0;
|
|
while ($r < $statement_count)
|
|
{
|
|
inc $r;
|
|
let $statement=`select ELT($r, $statements)`;
|
|
--echo query: $statement
|
|
|
|
let $c=0;
|
|
while ($c < $crash_count)
|
|
{
|
|
inc $c;
|
|
let $crash=`select ELT($c, $crash_points)`;
|
|
|
|
--eval set @@default_storage_engine=$default_engine
|
|
create or replace table t2 select * from seq_1_to_2;
|
|
flush tables;
|
|
|
|
if ($e == 1)
|
|
{
|
|
--source include/set_binlog_format_row.sql
|
|
}
|
|
if ($e == 2)
|
|
{
|
|
--source include/set_binlog_format_statement.sql
|
|
}
|
|
FLUSH BINARY LOGS;
|
|
--let $start_binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
|
|
|
|
--echo crash point: $crash
|
|
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
|
--disable_reconnect
|
|
--eval set @@debug_dbug="+d,$crash",@debug_crash_counter=1
|
|
let $errno=0;
|
|
--error 0,2013
|
|
--eval $statement;
|
|
let $error=$errno;
|
|
--enable_reconnect
|
|
--source include/wait_until_connected_again.inc
|
|
--disable_query_log
|
|
--eval set @@debug_dbug="$old_debug"
|
|
|
|
if ($error == 0)
|
|
{
|
|
echo "No crash!";
|
|
}
|
|
# Check which tables still exists
|
|
--list_files $MYSQLD_DATADIR/test t*
|
|
--list_files $MYSQLD_DATADIR/test *sql*
|
|
|
|
--let $binlog_file=$start_binlog_file
|
|
--let $binlog_output_name=master-bin.000001
|
|
--source include/show_binlog_events.inc
|
|
if ($error)
|
|
{
|
|
--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
|
|
--let $binlog_output_name=master-bin.000002
|
|
if ($binlog_file != $start_binlog_file)
|
|
{
|
|
--source include/show_binlog_events.inc
|
|
}
|
|
}
|
|
# Drop the tables. The warnings will show what was dropped
|
|
--disable_warnings
|
|
drop table if exists t1,t2;
|
|
--enable_warnings
|
|
}
|
|
}
|
|
}
|
|
drop table if exists t1,t2,const_table;
|
|
|
|
--enable_query_log
|