summaryrefslogtreecommitdiff
path: root/mysql-test/suite/parts/t/show_create.test
blob: 9c43b163790043b8ff19c167402d20f5a304ceab (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
#
# MDEV-13089 identifier quoting in partitioning
#
source include/have_partition.inc;
set sql_mode=ansi_quotes;
create table t1 ("select" int) partition by range ("select") (partition "select" values less than maxvalue);
create table t2 (f1 int) partition by range (f1) (partition p1 values less than maxvalue);
# "select", "f1", "p1"
show create table t1;
show create table t2;
set sql_quote_show_create=0;
# "select", f1, p1
show create table t1;
show create table t2;
set sql_mode=default;
# `select`, f1, p1
show create table t1;
show create table t2;
set sql_quote_show_create=1;
# `select`, `f1`, `p1`
show create table t1;
show create table t2;
# re-parse
flush tables;
# `select`, `f1`, `p1`
show create table t1;
show create table t2;
set sql_mode=ansi_quotes;
# "select", "f1", "p1"
show create table t1;
show create table t2;
drop table t1, t2;
set sql_mode=default;

#
# MDEV-14750 Valgrind Invalid read, ASAN heap-use-after-free in Item_ident::print upon SHOW CREATE on partitioned table
#
create table t_partition (f1 int) partition by hash(f1) partitions 2;
select * from t_partition as tbl;
show create table t_partition;
drop table t_partition;