| 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_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */ |
| 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=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_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_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */ |
| 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=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
| 30 |
EXPECTING identifiers a, b, t1 NOT TO BE quoted like 'a','b','t1' |
| 31 |
'#----------------------------FN_DYNVARS_163_03--------------------------------------#' |
| 32 |
** Connecting con_int1 using 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 |
** Connecting con_int2 using 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 |
Disconnecting Connections con_int1, con_int2 |
| 58 |
|
| 59 |
Cleanup |
| 60 |
SET @@sql_quote_show_create = @default_sql_quote_show_create; |
| 61 |
DROP TABLE t1; |