@@ -53,10 +53,16 @@ var CreateTableQueries = []WriteQueryTest{
53
53
ExpectedSelect : []sql.Row {{"tableWithComment" , "CREATE TABLE `tableWithComment` (\n `pk` int\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin COMMENT=''''" }},
54
54
},
55
55
{
56
- WriteQuery : `create table tableWithComment (pk int) COMMENT "newline \n | return \r | backslash \\ | NUL \0 \x00"` ,
56
+ WriteQuery : `create table tableWithComment (pk int) COMMENT "newline \n | return \r | backslash \\ | NUL \0 \x00 | ctrlz \Z \x1A "` ,
57
57
ExpectedWriteResult : []sql.Row {{types .NewOkResult (0 )}},
58
58
SelectQuery : "SHOW CREATE TABLE tableWithComment" ,
59
- ExpectedSelect : []sql.Row {{"tableWithComment" , "CREATE TABLE `tableWithComment` (\n `pk` int\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin COMMENT='newline \\ n | return \\ r | backslash \\ \\ | NUL \\ 0 x00'" }},
59
+ ExpectedSelect : []sql.Row {{"tableWithComment" , "CREATE TABLE `tableWithComment` (\n `pk` int\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin COMMENT='newline \\ n | return \\ r | backslash \\ \\ | NUL \\ 0 x00 | ctrlz \x1A x1A'" }},
60
+ },
61
+ {
62
+ WriteQuery : `create table tableWithComment (pk int) COMMENT "ctrlz \Z \x1A \\Z \\\Z"` ,
63
+ ExpectedWriteResult : []sql.Row {{types .NewOkResult (0 )}},
64
+ SelectQuery : "SHOW CREATE TABLE tableWithComment" ,
65
+ ExpectedSelect : []sql.Row {{"tableWithComment" , "CREATE TABLE `tableWithComment` (\n `pk` int\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin COMMENT='ctrlz \x1A x1A \\ \\ Z \\ \\ \x1A '" }},
60
66
},
61
67
{
62
68
WriteQuery : `create table tableWithColumnComment (pk int COMMENT "'")` ,
@@ -71,10 +77,10 @@ var CreateTableQueries = []WriteQueryTest{
71
77
ExpectedSelect : []sql.Row {{"tableWithColumnComment" , "CREATE TABLE `tableWithColumnComment` (\n `pk` int COMMENT ''''\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin" }},
72
78
},
73
79
{
74
- WriteQuery : `create table tableWithColumnComment (pk int COMMENT "newline \n | return \r | backslash \\ | NUL \0 \x00")` ,
80
+ WriteQuery : `create table tableWithColumnComment (pk int COMMENT "newline \n | return \r | backslash \\ | NUL \0 \x00 | ctrlz \Z \x1A ")` ,
75
81
ExpectedWriteResult : []sql.Row {{types .NewOkResult (0 )}},
76
82
SelectQuery : "SHOW CREATE TABLE tableWithColumnComment" ,
77
- ExpectedSelect : []sql.Row {{"tableWithColumnComment" , "CREATE TABLE `tableWithColumnComment` (\n `pk` int COMMENT 'newline \\ n | return \\ r | backslash \\ \\ | NUL \\ 0 x00'\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin" }},
83
+ ExpectedSelect : []sql.Row {{"tableWithColumnComment" , "CREATE TABLE `tableWithColumnComment` (\n `pk` int COMMENT 'newline \\ n | return \\ r | backslash \\ \\ | NUL \\ 0 x00 | ctrlz \x1A x1A '\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin" }},
78
84
},
79
85
{
80
86
WriteQuery : `create table floattypedefs (a float(10), b float(10, 2), c double(10, 2))` ,
0 commit comments