mirror of
https://github.com/MariaDB/server.git
synced 2025-07-07 06:01:31 +03:00
Bug#56657: Test still uses "--exec rm -f ..." which is non-portable Bug#56601: Test uses Unix path for temporary file, fails, and writes misleading message Several tests that was written in a non portable way (failed on windows) Fixed by 1) backporting the fix for replace_result to also apply to list_files (mysqltest from mysql-trunk) 2) replacing all #p#/#sp#/#tmp# to #P#/#SP#/#TMP#/ (innodb always converts filenames to lower case in windows). 3) replacing '--exec rm -f' with '--remove_files_wildcard' 4) replacing a perl snippet with '--write_file' client/mysqltest.cc: backport from mysql-trunk to allow replace_result to apply also on list_files mysql-test/suite/parts/inc/partition_check_drop.inc: Compensate for differences between innodb on windows vs unix. Using mysqltest command, instead of unix command to remove files. mysql-test/suite/parts/inc/partition_crash.inc: compensate for differences between innodb on windows vs unix mysql-test/suite/parts/inc/partition_fail.inc: compensate for differences between innodb on windows vs unix mysql-test/suite/parts/inc/partition_layout.inc: compensate for differences between innodb on windows vs unix mysql-test/suite/parts/inc/partition_layout_check1.inc: compensate for differences between innodb on windows vs unix mysql-test/suite/parts/inc/partition_layout_check2.inc: compensate for differences between innodb on windows vs unix mysql-test/suite/parts/r/partition_recover_myisam.result: updated result mysql-test/suite/parts/r/partition_special_myisam.result: updated result mysql-test/suite/parts/t/part_supported_sql_func_innodb.test: Test takes very long time, require --big flag mysql-test/suite/parts/t/partition_alter1_1_2_innodb.test: Test takes very long time, require --big flag mysql-test/suite/parts/t/partition_alter1_2_innodb.test: Test takes very long time, require --big flag mysql-test/suite/parts/t/partition_alter2_1_1_innodb.test: Test takes very long time, require --big flag mysql-test/suite/parts/t/partition_alter2_1_2_innodb.test: Test takes very long time, require --big flag mysql-test/suite/parts/t/partition_alter2_2_2_innodb.test: Test takes very long time, require --big flag mysql-test/suite/parts/t/partition_alter4_innodb.test: Test takes very long time, require --big flag mysql-test/suite/parts/t/partition_debug_sync_innodb.test: compensate for differences between innodb on windows vs unix mysql-test/suite/parts/t/partition_recover_myisam.test: more generic suppression (failed in windows) mysql-test/suite/parts/t/partition_special_myisam.test: Using portable mysqltest command 'write_file' instead of perl snippet.
89 lines
2.6 KiB
Plaintext
89 lines
2.6 KiB
Plaintext
--source include/have_innodb.inc
|
|
--source include/have_partition.inc
|
|
--source include/have_debug_sync.inc
|
|
|
|
let $MYSQLD_DATADIR=`SELECT @@datadir`;
|
|
|
|
--echo #
|
|
--echo # Bug#49907: ALTER TABLE ... TRUNCATE PARTITION
|
|
--echo # does not wait for locks on the table
|
|
--echo #
|
|
CREATE TABLE t1 (a INT)
|
|
ENGINE = InnoDB
|
|
PARTITION BY RANGE (a)
|
|
(PARTITION p0 VALUES LESS THAN (15),
|
|
PARTITION pMax VALUES LESS THAN MAXVALUE);
|
|
INSERT INTO t1 VALUES (1), (11), (21), (33);
|
|
BEGIN;
|
|
DELETE FROM t1 WHERE a = 11;
|
|
--sorted_result
|
|
SELECT * FROM t1;
|
|
|
|
--connect (con1, localhost, root,,)
|
|
--echo # con1 (send)
|
|
--send
|
|
ALTER TABLE t1 TRUNCATE PARTITION pMax;
|
|
|
|
--connection default
|
|
--echo # con default
|
|
let $wait_condition=
|
|
SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST
|
|
WHERE STATE = "Waiting for table metadata lock" AND
|
|
INFO = "ALTER TABLE t1 TRUNCATE PARTITION pMax";
|
|
--source include/wait_condition.inc
|
|
--sorted_result
|
|
SELECT * FROM t1;
|
|
--echo # Commit will allow the TRUNCATE to finish
|
|
COMMIT;
|
|
|
|
--echo # con1 (reap)
|
|
--connection con1
|
|
--reap
|
|
--echo # con1 (disconnect)
|
|
--disconnect con1
|
|
--connection default
|
|
--echo # default connection
|
|
SELECT * FROM t1;
|
|
DROP TABLE t1;
|
|
|
|
--echo #
|
|
--echo # Bug#50561: ALTER PARTITIONS does not have adequate lock, breaks with
|
|
--echo # concurrent I_S query
|
|
create table t1 (a int)
|
|
engine = innodb
|
|
partition by range (a)
|
|
(partition p0 values less than MAXVALUE);
|
|
insert into t1 values (1), (11), (21), (33);
|
|
SELECT * FROM t1;
|
|
SHOW CREATE TABLE t1;
|
|
--replace_result #p# #P# #sp# #SP#
|
|
--list_files $MYSQLD_DATADIR/test
|
|
|
|
SET DEBUG_SYNC='before_open_in_get_all_tables SIGNAL parked WAIT_FOR open';
|
|
SET DEBUG_SYNC='partition_open_error SIGNAL alter WAIT_FOR finish';
|
|
send
|
|
SELECT * FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME = 't1' AND TABLE_SCHEMA = 'test';
|
|
|
|
connect (con1, localhost, root,,);
|
|
SET DEBUG_SYNC = 'now WAIT_FOR parked';
|
|
--echo # When waiting for the name lock in get_all_tables in sql_show.cc
|
|
--echo # this will not be concurrent any more, thus the TIMEOUT
|
|
SET DEBUG_SYNC = 'before_rename_partitions SIGNAL open WAIT_FOR alter TIMEOUT 1';
|
|
--echo # Needs to be executed twice, since first is this 'SET DEBUG_SYNC ...'
|
|
SET DEBUG_SYNC = 'before_close_thread_tables SIGNAL finish EXECUTE 2';
|
|
--error 0,ER_TABLE_EXISTS_ERROR
|
|
ALTER TABLE t1 REORGANIZE PARTITION p0 INTO
|
|
(PARTITION p0 VALUES LESS THAN (10),
|
|
PARTITION p10 VALUES LESS THAN MAXVALUE);
|
|
|
|
disconnect con1;
|
|
connection default;
|
|
--reap
|
|
--replace_result #p# #P# #sp# #SP#
|
|
--list_files $MYSQLD_DATADIR/test
|
|
SHOW CREATE TABLE t1;
|
|
SELECT * FROM t1;
|
|
drop table t1;
|
|
--list_files $MYSQLD_DATADIR/test
|
|
SET DEBUG_SYNC = 'RESET';
|