summaryrefslogtreecommitdiff
path: root/mysql-test/suite/parts/t/show_create.test
blob: 3f62ee11757d3a3c64e3fffbe025a1780b7b66e6 (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
#
# 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;

#
# MDEV-16792 Assertion `m_status == DA_ERROR' failed in Diagnostics_area::sql_errno or wrong result upon SHOW TABLE STATUS after adding partition under ANSI_QUOTES
#
create table t1 (a int) partition by range(a) (partition p0 values less than (5));
set sql_mode='ansi_quotes';
alter table t1 add partition (partition p1 values less than (10));
set sql_mode= default;
--replace_column 12 X 13 X
show table status;
drop table t1;