File: partition_special_innodb.test

package info (click to toggle)
mysql-5.1 5.1.73-1%2Bdeb6u1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze-lts
  • size: 197,132 kB
  • ctags: 93,377
  • sloc: cpp: 579,952; ansic: 429,462; perl: 49,053; sh: 21,692; pascal: 21,272; yacc: 12,801; makefile: 4,545; xml: 4,114; sql: 3,297; lex: 1,265; asm: 1,023
file content (80 lines) | stat: -rw-r--r-- 3,015 bytes parent folder | download | duplicates (2)
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
################################################################################
# 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;
--error ER_LOCK_WAIT_TIMEOUT
ALTER TABLE t1 AUTO_INCREMENT = 10;

--connection con1
INSERT INTO t1 VALUES (NULL, 'second row t2');
SELECT a,b FROM t1 ORDER BY a;
--disconnect con2
--disconnect con1
--connection default
DROP TABLE t1;