diff --git a/dbcon/ddlpackage/ddl.y b/dbcon/ddlpackage/ddl.y index d0f408e86..f95f3e3fb 100644 --- a/dbcon/ddlpackage/ddl.y +++ b/dbcon/ddlpackage/ddl.y @@ -199,7 +199,7 @@ BOOL BOOLEAN MEDIUMINT TIMESTAMP %type trunc_table_statement %type rename_table_statement %type ident - +%type opt_quoted_literal %% stmtblock: stmtmulti { x->fParseTree = $1; } ; @@ -490,9 +490,9 @@ table_option: | DEFAULT IDB_CHAR SET opt_equal ident {$$ = new pair("default charset", $5);} | - DEFAULT COLLATE opt_equal ident {$$ = new pair("default collate", $4);} + DEFAULT COLLATE opt_equal opt_quoted_literal {$$ = new pair("default collate", $4);} | - COLLATE opt_equal ident {$$ = new pair("default collate", $3);} + COLLATE opt_equal opt_quoted_literal {$$ = new pair("default collate", $3);} ; alter_table_statement: @@ -735,13 +735,13 @@ optional_braces: opt_column_charset: /* empty */ {} | - IDB_CHAR SET ident {} + IDB_CHAR SET opt_quoted_literal {} ; opt_column_collate: /* empty */ {} | - COLLATE ident {} + COLLATE opt_quoted_literal {} ; data_type: @@ -864,6 +864,12 @@ string_literal: '\'' SCONST '\'' {$$ = $2;} ; +opt_quoted_literal: + string_literal + | + ident + ; + character_string_type: CHARACTER {