mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Revert MDEV-25292 Atomic CREATE OR REPLACE TABLE
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
.
This commit is contained in:
@ -1,8 +1,6 @@
|
||||
# Non-windows specific create tests.
|
||||
|
||||
--source include/not_windows.inc
|
||||
--source include/have_debug.inc
|
||||
--source include/not_embedded.inc
|
||||
|
||||
#
|
||||
# Bug#19479:mysqldump creates invalid dump
|
||||
@ -43,64 +41,3 @@ create table t1(a int, b int, c int);
|
||||
--echo "Try to select from the table. This should not crash the server"
|
||||
select count(a) from t1;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-25292 Atomic CREATE OR REPLACE TABLE
|
||||
--echo #
|
||||
|
||||
# This does not work on Windows because of max path limit 255
|
||||
# (actually it does not work for path 254 already)
|
||||
# Note: on Windows use ER_BAD_DB_ERROR instead of ER_CANT_CREATE_TABLE
|
||||
# unless MDEV-28746 is fixed.
|
||||
|
||||
--echo # Test multi-byte characters in table name
|
||||
set names utf8;
|
||||
let $save_debug=`select @@debug_dbug`;
|
||||
let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||
--echo # Filename is too long because it is converted to @274e@274e@274e@274e...
|
||||
--echo # so each '❎' is 5 bytes in filesystem, 51 x 5 = 255 bytes
|
||||
let $t= `select repeat('❎', 51)`;
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
eval create table $t (x int);
|
||||
# The below case is useful for experimenting on Windows
|
||||
--echo # Let's find out max length for '❎'...
|
||||
--disable_query_log
|
||||
let $i= 50;
|
||||
while ($i)
|
||||
{
|
||||
let $t= `select repeat('❎', $i)`;
|
||||
--error 0,ER_CANT_CREATE_TABLE
|
||||
eval create table $t (x int);
|
||||
let $good_len= $i;
|
||||
dec $i;
|
||||
if (!$mysql_errno)
|
||||
{
|
||||
let $i= 0;
|
||||
}
|
||||
}
|
||||
let $fn_len= `select $good_len * 5 + 4`; # 4 is extension length
|
||||
eval drop table $t;
|
||||
--enable_query_log
|
||||
--echo # Acceptable name length: $good_len; Filename length: $fn_len
|
||||
--echo # OK with 64-characters table name, filesystem name is 40 x 5 + 24 = 224 bytes
|
||||
let $t= `select concat(repeat('t', 24), repeat('❎', 40))`;
|
||||
eval create table $t (x int);
|
||||
--echo # Not OK with 65-characters table name
|
||||
let $t2= `select concat(repeat('t', 25), repeat('❎', 40))`;
|
||||
--error ER_WRONG_TABLE_NAME
|
||||
eval create table $t2 (x int);
|
||||
show tables;
|
||||
# Let's try atomic replace with such long name and see what happens
|
||||
eval create or replace table $t (y int);
|
||||
eval show create table $t;
|
||||
set @@debug_dbug="+d,ddl_log_create_after_save_backup", @debug_crash_counter=1;
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--disable_reconnect
|
||||
--error 2013
|
||||
eval create or replace table $t (z int);
|
||||
--replace_regex /-\w+-\w+-ttt/-PID-TID-ttt/
|
||||
--list_files $MYSQLD_DATADIR/test *sql*
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
eval drop table $t;
|
||||
eval set @@debug_dbug="$save_debug";
|
||||
|
Reference in New Issue
Block a user