[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@13.58.7.136: ~ $
--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 stats_persistent=0
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 TABLE_SCHEMA, TABLE_NAME, PARTITION_NAME, PARTITION_ORDINAL_POSITION,
       PARTITION_DESCRIPTION, TABLE_ROWS
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';

Filemanager

Name Type Size Permission Actions
disabled.def File 1.37 KB 0644
part_blocked_sql_func_innodb.test File 2 KB 0644
part_blocked_sql_func_myisam.test File 1.96 KB 0644
part_ctype_utf32.test File 1.42 KB 0644
part_supported_sql_func_innodb.test File 2.15 KB 0644
part_supported_sql_func_myisam.test File 1.98 KB 0644
partition-dml-1-1-innodb-modes.test File 387 B 0644
partition-dml-1-1-innodb.test File 305 B 0644
partition-dml-1-1-myisam-modes.test File 266 B 0644
partition-dml-1-1-myisam.test File 184 B 0644
partition-dml-1-10-innodb.test File 102 B 0644
partition-dml-1-10-myisam.test File 69 B 0644
partition-dml-1-11-innodb.test File 306 B 0644
partition-dml-1-11-myisam.test File 185 B 0644
partition-dml-1-2-innodb.test File 101 B 0644
partition-dml-1-2-myisam.test File 68 B 0644
partition-dml-1-3-innodb.test File 101 B 0644
partition-dml-1-4-innodb.test File 101 B 0644
partition-dml-1-5-innodb.test File 101 B 0644
partition-dml-1-6-innodb.test File 101 B 0644
partition-dml-1-7-innodb.test File 101 B 0644
partition-dml-1-8-innodb.test File 101 B 0644
partition-dml-1-9-innodb.test File 217 B 0644
partition-dml-1-9-myisam.test File 184 B 0644
partition_alter1_1_2_innodb.test File 3.7 KB 0644
partition_alter1_1_2_myisam.test File 3.41 KB 0644
partition_alter1_1_innodb.test File 3.61 KB 0644
partition_alter1_1_myisam.test File 3.41 KB 0644
partition_alter1_2_innodb.test File 3.7 KB 0644
partition_alter1_2_myisam.test File 3.41 KB 0644
partition_alter2_1_1_innodb.test File 3.51 KB 0644
partition_alter2_1_2_innodb.test File 3.51 KB 0644
partition_alter2_1_myisam.test File 3.24 KB 0644
partition_alter2_2_1_innodb.test File 3.53 KB 0644
partition_alter2_2_2_innodb.test File 3.51 KB 0644
partition_alter2_2_myisam.test File 3.24 KB 0644
partition_alter3_innodb.test File 3.24 KB 0644
partition_alter3_myisam.test File 3.21 KB 0644
partition_alter4_innodb.test File 3.44 KB 0644
partition_alter4_myisam.test File 3.33 KB 0644
partition_auto_increment_archive.test File 1.88 KB 0644
partition_auto_increment_blackhole.test File 1.77 KB 0644
partition_auto_increment_innodb.test File 1.76 KB 0644
partition_auto_increment_memory.test File 1.73 KB 0644
partition_auto_increment_myisam.test File 1.73 KB 0644
partition_basic_innodb.test File 3.5 KB 0644
partition_basic_myisam.test File 3.17 KB 0644
partition_basic_symlink_innodb.test File 6.5 KB 0644
partition_basic_symlink_myisam.test File 3.57 KB 0644
partition_bit_innodb.test File 2.4 KB 0644
partition_bit_myisam.test File 2.37 KB 0644
partition_char_innodb.test File 2.4 KB 0644
partition_char_myisam.test File 2.37 KB 0644
partition_datetime_innodb.test File 2.27 KB 0644
partition_datetime_myisam.test File 2.24 KB 0644
partition_debug.test File 2.47 KB 0644
partition_debug_innodb-master.opt File 53 B 0644
partition_debug_innodb.test File 3.64 KB 0644
partition_debug_myisam.test File 568 B 0644
partition_debug_sync_innodb-master.opt File 26 B 0644
partition_debug_sync_innodb.test File 2.71 KB 0644
partition_decimal_innodb.test File 2.1 KB 0644
partition_decimal_myisam.test File 2.23 KB 0644
partition_engine_innodb.test File 3.24 KB 0644
partition_engine_myisam.test File 3.14 KB 0644
partition_exch_innodb.test File 242 B 0644
partition_exch_myisam.test File 209 B 0644
partition_exch_myisam_innodb.test File 442 B 0644
partition_exch_qa.test File 209 B 0644
partition_exch_qa_10.test File 1.69 KB 0644
partition_exch_qa_11.test File 844 B 0644
partition_exch_qa_12.test File 6.22 KB 0644
partition_exch_qa_13.test File 212 B 0644
partition_exch_qa_14.test File 2.42 KB 0644
partition_exch_qa_15.test File 800 B 0644
partition_exch_qa_1_innodb.test File 244 B 0644
partition_exch_qa_1_myisam.test File 211 B 0644
partition_exch_qa_2.test File 2.38 KB 0644
partition_exch_qa_3.test File 934 B 0644
partition_exch_qa_4_innodb.test File 244 B 0644
partition_exch_qa_4_myisam.test File 211 B 0644
partition_exch_qa_5_innodb.test File 244 B 0644
partition_exch_qa_5_myisam.test File 211 B 0644
partition_exch_qa_6.test File 2.88 KB 0644
partition_exch_qa_7_innodb.test File 244 B 0644
partition_exch_qa_7_myisam.test File 211 B 0644
partition_exch_qa_8_innodb.test File 244 B 0644
partition_exch_qa_8_myisam.test File 211 B 0644
partition_exchange_archive.test File 293 B 0644
partition_exchange_blackhole.test File 703 B 0644
partition_exchange_innodb.test File 178 B 0644
partition_exchange_memory.test File 145 B 0644
partition_exchange_myisam.test File 145 B 0644
partition_float_innodb.test File 2.14 KB 0644
partition_float_myisam.test File 2.2 KB 0644
partition_innodb_status_file-master.opt File 23 B 0644
partition_innodb_status_file.test File 563 B 0644
partition_int_innodb.test File 2.27 KB 0644
partition_int_myisam.test File 2.41 KB 0644
partition_max_parts_hash_innodb-master.opt File 59 B 0644
partition_max_parts_hash_innodb.test File 1.19 KB 0644
partition_max_parts_hash_myisam-master.opt File 59 B 0644
partition_max_parts_hash_myisam.test File 1.16 KB 0644
partition_max_parts_inv_innodb-master.opt File 59 B 0644
partition_max_parts_inv_innodb.test File 1.19 KB 0644
partition_max_parts_inv_myisam-master.opt File 59 B 0644
partition_max_parts_inv_myisam.test File 1.15 KB 0644
partition_max_parts_key_innodb-master.opt File 59 B 0644
partition_max_parts_key_innodb.test File 1.27 KB 0644
partition_max_parts_key_myisam-master.opt File 59 B 0644
partition_max_parts_key_myisam.test File 1.23 KB 0644
partition_max_parts_list_innodb-master.opt File 59 B 0644
partition_max_parts_list_innodb.test File 1.19 KB 0644
partition_max_parts_list_myisam-master.opt File 59 B 0644
partition_max_parts_list_myisam.test File 1.16 KB 0644
partition_max_parts_range_innodb-master.opt File 59 B 0644
partition_max_parts_range_innodb.test File 1.19 KB 0644
partition_max_parts_range_myisam-master.opt File 59 B 0644
partition_max_parts_range_myisam.test File 1.16 KB 0644
partition_max_sub_parts_key_list_innodb-master.opt File 59 B 0644
partition_max_sub_parts_key_list_innodb.test File 1.28 KB 0644
partition_max_sub_parts_key_list_myisam-master.opt File 59 B 0644
partition_max_sub_parts_key_list_myisam.test File 1.24 KB 0644
partition_max_sub_parts_key_range_innodb-master.opt File 59 B 0644
partition_max_sub_parts_key_range_innodb.test File 1.28 KB 0644
partition_max_sub_parts_key_range_myisam-master.opt File 59 B 0644
partition_max_sub_parts_key_range_myisam.test File 1.24 KB 0644
partition_max_sub_parts_list_innodb-master.opt File 59 B 0644
partition_max_sub_parts_list_innodb.test File 1.44 KB 0644
partition_max_sub_parts_list_myisam-master.opt File 59 B 0644
partition_max_sub_parts_list_myisam.test File 1.16 KB 0644
partition_max_sub_parts_range_innodb-master.opt File 59 B 0644
partition_max_sub_parts_range_innodb.test File 1.36 KB 0644
partition_max_sub_parts_range_myisam-master.opt File 59 B 0644
partition_max_sub_parts_range_myisam.test File 1.16 KB 0644
partition_mgm_lc0_archive.test File 2.01 KB 0644
partition_mgm_lc0_innodb.test File 1.99 KB 0644
partition_mgm_lc0_memory.test File 1.99 KB 0644
partition_mgm_lc0_myisam.test File 1.99 KB 0644
partition_mgm_lc1_archive-master.opt File 27 B 0644
partition_mgm_lc1_archive.test File 1.8 KB 0644
partition_mgm_lc1_innodb-master.opt File 27 B 0644
partition_mgm_lc1_innodb.test File 1.78 KB 0644
partition_mgm_lc1_memory-master.opt File 27 B 0644
partition_mgm_lc1_memory.test File 1.78 KB 0644
partition_mgm_lc1_myisam-master.opt File 27 B 0644
partition_mgm_lc1_myisam.test File 1.78 KB 0644
partition_mgm_lc2_archive-master.opt File 27 B 0644
partition_mgm_lc2_archive.test File 1.8 KB 0644
partition_mgm_lc2_innodb-master.opt File 27 B 0644
partition_mgm_lc2_innodb.test File 1.78 KB 0644
partition_mgm_lc2_memory-master.opt File 27 B 0644
partition_mgm_lc2_memory.test File 1.78 KB 0644
partition_mgm_lc2_myisam-master.opt File 27 B 0644
partition_mgm_lc2_myisam.test File 1.78 KB 0644
partition_recover_myisam-master.opt File 17 B 0644
partition_recover_myisam.test File 1.6 KB 0644
partition_reorganize_innodb.test File 5.76 KB 0644
partition_reorganize_myisam.test File 3.61 KB 0644
partition_repair_myisam.test File 12.45 KB 0644
partition_special_innodb-master.opt File 55 B 0644
partition_special_innodb.test File 7.1 KB 0644
partition_special_myisam.test File 3.12 KB 0644
partition_syntax_innodb.test File 3.25 KB 0644
partition_syntax_myisam.test File 3.14 KB 0644
partition_value_innodb.test File 3.4 KB 0644
partition_value_myisam.test File 3.36 KB 0644
rpl-partition-dml-1-1-innodb.test File 250 B 0644
rpl-partition-dml-1-1-myisam.test File 216 B 0644
rpl_partition.test File 5.26 KB 0644