summaryrefslogtreecommitdiff
path: root/mysql-test/suite/parts/t/partition_special_myisam.test
blob: b6f25484f3ac2ac3f795515bb975a2498c34d610 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
################################################################################
# t/partition_special_myisam.test                                                 #
#                                                                              #
# Purpose:                                                                     #
#  different Tests                                                             #
#        MYISAM branch                                                         #
#                                                                              #
#------------------------------------------------------------------------------#
# Original Author: HH                                                          #
# Original Date: 2006-08-01                                                    #
# Change Author:                                                               #
# Change Date:                                                                 #
# Change:                                                                      #
################################################################################

#
# NOTE: PLEASE DO NOT ADD NOT MYISAM 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
let $engine= 'MyISAM';

#------------------------------------------------------------------------------#
# 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

--echo #
--echo # Bug#53770: Server crash at handler.cc:2076 on LOAD DATA
--echo #            after timed out COALESCE PARTITION
CREATE TABLE t1 ( i INT NOT NULL AUTO_INCREMENT PRIMARY KEY, f INT )
        ENGINE = MyISAM PARTITION BY HASH(i) PARTITIONS 3;

START TRANSACTION;
SELECT * FROM t1;

--connect (con2,localhost,root,,)
SET lock_wait_timeout = 2;
--error ER_LOCK_WAIT_TIMEOUT
ALTER TABLE t1 COALESCE PARTITION 2;

--connect (con3,localhost,root,,)

--let $MYSQLD_DATADIR= `SELECT @@datadir`
--write_file $MYSQLD_DATADIR/test/load.in
1
2
3
EOF
send LOAD DATA INFILE 'load.in' INTO TABLE t1 (f);

--connection default
--real_sleep 1
COMMIT;

--connection con3
--reap
--remove_file $MYSQLD_DATADIR/test/load.in
DROP TABLE t1;

--disconnect con3
--disconnect con2
--connection default