Debian Codegraph @

mysql-test/suite/sys_vars/r/sql_quote_show_create_func.result

raw
1 ** Setup **
2
3 SET @default_sql_quote_show_create = @@sql_quote_show_create;
4 CREATE TEMPORARY TABLE t1(a varchar(20), b varchar(20));
5 '#-----------------------------FN_DYNVARS_163_01------------------------------------#'
6 SET SESSION sql_quote_show_create = TRUE;
7 SHOW CREATE DATABASE test;
8 Database Create Database
9 test CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_uca1400_ai_ci */
10 EXPECTING identifiers test TO BE quoted like 'test'
11 SHOW CREATE TABLE t1;
12 Table Create Table
13 t1 CREATE TEMPORARY TABLE `t1` (
14 `a` varchar(20) DEFAULT NULL,
15 `b` varchar(20) DEFAULT NULL
16 ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
17 EXPECTING identifiers a, b, t1 TO BE quoted like 'a','b','t1'
18 '#-----------------------------FN_DYNVARS_163_02------------------------------------#'
19 SET SESSION sql_quote_show_create = FALSE;
20 SHOW CREATE DATABASE test;
21 Database Create Database
22 test CREATE DATABASE test /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_uca1400_ai_ci */
23 EXPECTING identifiers test NOT TO BE quoted like 'test'
24 SHOW CREATE TABLE t1;
25 Table Create Table
26 t1 CREATE TEMPORARY TABLE t1 (
27 a varchar(20) DEFAULT NULL,
28 b varchar(20) DEFAULT NULL
29 ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
30 EXPECTING identifiers a, b, t1 NOT TO BE quoted like 'a','b','t1'
31 '#----------------------------FN_DYNVARS_163_03--------------------------------------#'
32 connect con_int1,localhost,root,,;
33 connection con_int1;
34 SELECT @@SESSION.sql_quote_show_create;
35 @@SESSION.sql_quote_show_create
36 1
37 1 / TRUE Expected
38 SET SESSION sql_quote_show_create = FALSE;
39 connect con_int2,localhost,root,,;
40 connection con_int2;
41 SELECT @@SESSION.sql_quote_show_create;
42 @@SESSION.sql_quote_show_create
43 1
44 1 / TRUE Expected
45 SET SESSION sql_quote_show_create = TRUE;
46 connection con_int2;
47 SELECT @@SESSION.sql_quote_show_create;
48 @@SESSION.sql_quote_show_create
49 1
50 1 / TRUE Expected
51 connection con_int1;
52 SELECT @@SESSION.sql_quote_show_create;
53 @@SESSION.sql_quote_show_create
54 0
55 0 / FALSE Expected
56 connection default;
57 disconnect con_int1;
58 disconnect con_int2;
59
60 Cleanup
61 SET @@sql_quote_show_create = @default_sql_quote_show_create;
62 DROP TABLE t1;