Debian Codegraph @

mysql-test/suite/parts/t/show_create.test

raw
1 #
2 # MDEV-13089 identifier quoting in partitioning
3 #
4 source include/have_partition.inc;
5 set sql_mode=ansi_quotes;
6 create table t1 ("select" int) partition by range ("select") (partition "select" values less than maxvalue);
7 create table t2 (f1 int) partition by range (f1) (partition p1 values less than maxvalue);
8 # "select", "f1", "p1"
9 show create table t1;
10 show create table t2;
11 set sql_quote_show_create=0;
12 # "select", f1, p1
13 show create table t1;
14 show create table t2;
15 set sql_mode=default;
16 # `select`, f1, p1
17 show create table t1;
18 show create table t2;
19 set sql_quote_show_create=1;
20 # `select`, `f1`, `p1`
21 show create table t1;
22 show create table t2;
23 # re-parse
24 flush tables;
25 # `select`, `f1`, `p1`
26 show create table t1;
27 show create table t2;
28 set sql_mode=ansi_quotes;
29 # "select", "f1", "p1"
30 show create table t1;
31 show create table t2;
32 drop table t1, t2;
33 set sql_mode=default;
34
35 #
36 # MDEV-14750 Valgrind Invalid read, ASAN heap-use-after-free in Item_ident::print upon SHOW CREATE on partitioned table
37 #
38 create table t_partition (f1 int) partition by hash(f1) partitions 2;
39 select * from t_partition as tbl;
40 show create table t_partition;
41 drop table t_partition;
42
43 #
44 # 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
45 #
46 create table t1 (a int) partition by range(a) (partition p0 values less than (5));
47 set sql_mode='ansi_quotes';
48 alter table t1 add partition (partition p1 values less than (10));
49 set sql_mode= default;
50 --replace_column 12 X 13 X
51 show table status;
52 drop table t1;