File: show.test

package info (click to toggle)
mariadb 1%3A11.8.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 772,520 kB
  • sloc: ansic: 2,414,714; cpp: 1,791,394; asm: 381,336; perl: 62,905; sh: 49,647; pascal: 40,897; java: 39,363; python: 20,791; yacc: 20,432; sql: 17,907; xml: 12,344; ruby: 8,544; cs: 6,542; makefile: 6,145; ada: 1,879; lex: 1,193; javascript: 996; objc: 80; tcl: 73; awk: 46; php: 22
file content (95 lines) | stat: -rw-r--r-- 2,680 bytes parent folder | download
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
--echo #
--echo # MDEV-9538 Server crashes in check_show_access on SHOW STATISTICS
--echo # MDEV-9539 Server crashes in make_columns_old_format on SHOW GEOMETRY_COLUMNS
--echo # MDEV-9540 SHOW SPATIAL_REF_SYS and SHOW SYSTEM_VARIABLES return empty results with numerous warnings
--echo #
--error ER_PARSE_ERROR
show statistics;
--error ER_PARSE_ERROR
show spatial_ref_sys
--error ER_PARSE_ERROR
show system_variables;
--error ER_PARSE_ERROR
show geometry_columns;
--error ER_PARSE_ERROR
show nonexistent;

--echo #
--echo # MDEV-21603 Crashing SHOW TABLES with derived table in WHERE condition
--echo #
create table t1 (nm varchar(32), a int);
insert t1 values ('1',1),('2',2),('3',3);

show tables
  where tables_in_test in (select *
                              from (select nm from test.t1 group by nm) dt);
show fields from test.t1
   where field in (select * from (select nm from test.t1 group by nm) dt);
insert t1 values ('nm',0);
show fields from test.t1
   where field in (select * from (select nm from test.t1 group by nm) dt);

show fields from test.t1 where field in
        (select * from (select column_name from information_schema.columns
                          where table_name='t1' group by column_name) dt);
drop table t1;

--echo #
--echo # MDEV-4621 select returns null for information_schema.statistics.collation field
--echo #
create table t1 (f varchar(64), key(f));
select index_name, column_name, collation, cardinality from information_schema.STATISTICS where table_schema='test' and table_name='t1';
select index_name, column_name, collation from information_schema.STATISTICS where table_schema='test' and table_name='t1';
drop table t1;

--echo #
--echo # End of 10.2 tests
--echo #

--echo #
--echo # MDEV-28253 Mysqldump - INVISIBLE column error
--echo #
create table t1 (a int, b datetime invisible on update now() without system versioning) with system versioning;
desc t1;
drop table t1;

--echo #
--echo # End of 10.3 tests
--echo #

--echo #
--echo # MDEV-31721: Cursor protocol increases the counter of  "Empty_queries" for select
--echo #

FLUSH STATUS;

CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1);

--disable_ps2_protocol
SELECT COUNT(*) FROM t1;
SELECT * FROM t1;
SELECT * FROM t1 LIMIT 0;
--enable_ps2_protocol

SHOW STATUS LIKE "Empty_queries";

DROP TABLE t1;

--echo #------------------------------

CREATE TABLE t1 (a INT);
CREATE TABLE t2 (b INT);
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (2);

--disable_ps2_protocol
SELECT * FROM t1 UNION SELECT * FROM t2;
SELECT * FROM t1 UNION SELECT * FROM t2 LIMIT 0;
--enable_ps2_protocol

SHOW STATUS LIKE "Empty_queries";

DROP TABLE t1, t2;

--echo # End of 10.11 tests