File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1029,6 +1029,23 @@ var AlterTableScripts = []ScriptTest{
10291029 },
10301030 },
10311031 },
1032+ {
1033+ Name : "alter table comments are escaped" ,
1034+ SetUpScript : []string {
1035+ "create table t (i int);" ,
1036+ `alter table t modify column i int comment "newline \n | return \r | backslash \\ | NUL \0 \x00"` ,
1037+ `alter table t add column j int comment "newline \n | return \r | backslash \\ | NUL \0 \x00"` ,
1038+ },
1039+ Assertions : []ScriptTestAssertion {
1040+ {
1041+ Query : "show create table t" ,
1042+ Expected : []sql.Row {{
1043+ "t" ,
1044+ "CREATE TABLE `t` (\n `i` int COMMENT 'newline \\ n | return \\ r | backslash \\ \\ | NUL \\ 0 x00'," +
1045+ "\n `j` int COMMENT 'newline \\ n | return \\ r | backslash \\ \\ | NUL \\ 0 x00'\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin" }},
1046+ },
1047+ },
1048+ },
10321049}
10331050
10341051var RenameTableScripts = []ScriptTest {
You can’t perform that action at this time.
0 commit comments