[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.129.67.218: ~ $
################################################################################
# t/partition_special_innodb.test                                              #
#                                                                              #
# Purpose:                                                                     #
#  different Tests                                                             #
#        InnoDB branch                                                         #
#                                                                              #
#------------------------------------------------------------------------------#
# Original Author: HH                                                          #
# Original Date: 2006-08-01                                                    #
# Change Author: MattiasJ                                                      #
# Change Date: 2008-08-20                                                      #
# Change: added test for bug#34604                                             #
################################################################################

#
# NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE !
#       TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
#       THE SOURCED FILES ONLY.
#
# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#

#------------------------------------------------------------------------------#
# General not engine specific settings and requirements

##### Options, for debugging support #####
let $debug= 0;

# The server must support partitioning.
--source include/have_partition.inc

#------------------------------------------------------------------------------#
# Engine specific settings and requirements

##### Storage engine to be tested
--source include/have_innodb.inc
let $engine= 'InnoDB';

#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_key_4col.inc
--source suite/parts/inc/partition_key_8col.inc
--source suite/parts/inc/partition_key_16col.inc
--source suite/parts/inc/partition_key_32col.inc

#------------------------------------------------------------------------------#
# Execute storage engine specific tests

--echo # Bug#34604 - Assertion 'inited==RND' failed in handler::ha_rnd_end

CREATE TABLE t1 (
  a INT AUTO_INCREMENT,
  b VARCHAR(255),
  PRIMARY KEY (a))
ENGINE = InnoDB
PARTITION BY HASH (a)
PARTITIONS 2;

connect (con1, localhost, root,,);
connect (con2, localhost, root,,);

--connection con1
SET autocommit=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES (NULL, 'first row t2');

--connection con2
SET autocommit=OFF;
SET SESSION lock_wait_timeout= 1;
--error ER_LOCK_WAIT_TIMEOUT
ALTER TABLE t1 AUTO_INCREMENT = 10;

--disconnect con2
--disconnect con1
--connection default
DROP TABLE t1;

--echo #
--echo # Bug#53676: Unexpected errors and possible table corruption on
--echo #            ADD PARTITION and LOCK TABLE
--connect (con1,localhost,root,,)
CREATE TABLE t1 ( i INT NOT NULL AUTO_INCREMENT PRIMARY KEY, f INT )
        ENGINE = InnoDB PARTITION BY HASH(i) PARTITIONS 2;
INSERT INTO t1 VALUES (2, 2), (3, 3), (4, 4), (5, 5);

--connect (con2,localhost,root,,)
SET lock_wait_timeout = 2;

--connection con1
--echo #Connection 1 locks the table
LOCK TABLE t1 READ;

--connection con2
--echo # Connection 2 tries to add partitions:
--echo # First attempt: lock wait timeout (as expected)
--error ER_LOCK_WAIT_TIMEOUT
ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
--echo # Second attempt: says that partition already exists
--error ER_LOCK_WAIT_TIMEOUT
ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
--echo # Check that we only can select, not insert/update/delete.
--error ER_LOCK_WAIT_TIMEOUT
INSERT INTO t1 VALUES (NULL, 6), (NULL, 7), (10, 10), (11, 11);
--error ER_LOCK_WAIT_TIMEOUT
UPDATE t1 SET i = 5 WHERE f = 2;
--error ER_LOCK_WAIT_TIMEOUT
DELETE FROM t1 WHERE i = 10;
--sorted_result
SELECT * FROM t1;

--connection con1
--echo # Connection 1 unlocks the table and locks it again:
UNLOCK TABLES;
--real_sleep 1
LOCK TABLE t1 READ;

--connection con2
--echo # Connection 2 tries again to add partitions:
--echo # Third attempt: says that the table does not exist
--error ER_LOCK_WAIT_TIMEOUT
ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
--echo # Check table returns the same (not after fixing bug#56172!)
CHECK TABLE t1;

--connection con1
UNLOCK TABLES;

--connection con2
DROP TABLE t1;

# End of Test1

# Test2

--connection con1

CREATE TABLE t2 ( i INT NOT NULL AUTO_INCREMENT PRIMARY KEY, f INT )
        ENGINE = InnoDB PARTITION BY HASH(i) PARTITIONS 2;

--connection con2
SET lock_wait_timeout = 2;

--connection con1
LOCK TABLE t2 READ;

--connection con2
--error ER_LOCK_WAIT_TIMEOUT
ALTER TABLE t2 ADD PARTITION PARTITIONS 2;
send ALTER TABLE t2 ADD PARTITION PARTITIONS 2;

--connection con1
UNLOCK TABLES;

--connection con2
--reap

--connect (con3,localhost,root,,)
CHECK TABLE t2;
SELECT * FROM t2;
DROP TABLE t2;

# End of Test2
# Test #3

--connection con1

CREATE TABLE t3 ( i INT NOT NULL AUTO_INCREMENT PRIMARY KEY, f INT )
        ENGINE = InnoDB PARTITION BY HASH(i) PARTITIONS 2;

--connection con2
SET lock_wait_timeout = 2;

--connection con1
--echo # Connection 1 locks the table
LOCK TABLE t3 READ;

--connection con2
--echo # Connection 2 tries to add partitions (timeout):
--error ER_LOCK_WAIT_TIMEOUT
ALTER TABLE t3 ADD PARTITION PARTITIONS 2;

--connection con3
SET lock_wait_timeout = 2;
--echo # Connection 3 tries to add partitions (partition already exists):
--error ER_LOCK_WAIT_TIMEOUT
ALTER TABLE t3 ADD PARTITION PARTITIONS 2;

--connect (con4,localhost,root,,)
--echo # Connection 4 tries to rename the table:
send RENAME TABLE t3 TO t4;

--connection con1
--real_sleep 1
--echo # Connection 1 unlocks the table:
UNLOCK TABLES;

--connection con4
--echo # Connection 4 gets error on rename:
--reap

--connect (con5,localhost,root,,)
--echo # SHOW TABLES returns the table (not renamed):
SHOW TABLES;
--echo # Connection 5 attempts to read from the table (table does not exist):
--error ER_NO_SUCH_TABLE
SELECT * FROM t3;
DROP TABLE t4;

--disconnect con5
--disconnect con4
--disconnect con3
--disconnect con2
--disconnect con1
--connection default
# End of Test #3

--echo # Test WRITE LOCK.
--connect (con1,localhost,root,,)
CREATE TABLE t1 ( i INT NOT NULL AUTO_INCREMENT PRIMARY KEY, f INT )
        ENGINE = InnoDB PARTITION BY HASH(i) PARTITIONS 2;
INSERT INTO t1 VALUES (3, 3), (4, 4);

--connect (con2,localhost,root,,)
SET lock_wait_timeout = 2;

--connection con1
--echo #Connection 1 locks the table
LOCK TABLE t1 WRITE;

--connection con2
--echo # Check that we still can SELECT, but not insert/update/delete.
--echo # Check that we only can select, not insert/update/delete.
--error ER_LOCK_WAIT_TIMEOUT
INSERT INTO t1 VALUES (NULL, 1), (NULL, 2), (10, 10), (11, 11);
--error ER_LOCK_WAIT_TIMEOUT
UPDATE t1 SET i = 5 WHERE f = 2;
--error ER_LOCK_WAIT_TIMEOUT
DELETE FROM t1 WHERE i = 10;
--error ER_LOCK_WAIT_TIMEOUT
SELECT * FROM t1;

--connection con1
UNLOCK TABLES;

--connection con2
DROP TABLE t1;

--disconnect con1
--connection default

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