summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/gcol/t/gcol_partition_innodb.test
blob: 6bcd9d27118de381224988cbd781ca2374d28490 (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
################################################################################
# t/gcol_partition_innodb.test                                                 #
#                                                                              #
# Purpose:                                                                     #
#   Testing partitioning tables with generated columns.                          #
#                                                                              #
#        InnoDB branch                                                         #
#                                                                              #
#------------------------------------------------------------------------------#
# Original Author: Andrey Zhakov                                               #
# Original Date: 2008-09-04                                                    #
# 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.
#

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

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

##### Storage engine to be tested
# Set the session storage engine
--source include/have_innodb.inc
SET @save_stats_persistent = @@GLOBAL.innodb_stats_persistent;
SET GLOBAL innodb_stats_persistent = 0;
SET default_storage_engine = 'InnoDB';

##### Workarounds for known open engine specific bugs
#     none

#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/gcol/inc/gcol_partition.inc

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

--echo #
--echo # MDEV-16980 Wrongly set tablename len while opening the
--echo #                table for purge thread
--echo #

CREATE TABLE t1(pk SERIAL, d DATE, vd DATE AS (d) VIRTUAL,
                PRIMARY KEY(pk), KEY (vd))ENGINE=InnoDB
                PARTITION BY HASH(pk) PARTITIONS 2;

INSERT IGNORE INTO t1 (d) VALUES ('2015-04-14');
SET sql_mode= '';
REPLACE INTO t1 SELECT * FROM t1;

# Cleanup
DROP TABLE t1;

--source suite/innodb/include/wait_all_purged.inc

SET GLOBAL innodb_stats_persistent = @save_stats_persistent;

#------------------------------------------------------------------------------#
# Cleanup
--source suite/gcol/inc/gcol_cleanup.inc