diff options
Diffstat (limited to 'sql/sql_yacc_ora.yy')
-rw-r--r-- | sql/sql_yacc_ora.yy | 40 |
1 files changed, 9 insertions, 31 deletions
diff --git a/sql/sql_yacc_ora.yy b/sql/sql_yacc_ora.yy index ad8b6697ce7..db45414fd28 100644 --- a/sql/sql_yacc_ora.yy +++ b/sql/sql_yacc_ora.yy @@ -5777,7 +5777,7 @@ create_table_option: | SEQUENCE_SYM opt_equal choice { Lex->create_info.used_fields|= HA_CREATE_USED_SEQUENCE; - Lex->create_info.sequence= $3; + Lex->create_info.sequence= ($3 == HA_CHOICE_YES); } ; @@ -9896,26 +9896,22 @@ function_call_nonkeyword: } | SUBSTRING '(' expr ',' expr ',' expr ')' { - $$= new (thd->mem_root) Item_func_substr(thd, $3, $5, $7); - if ($$ == NULL) + if (!($$= Lex->make_item_func_substr(thd, $3, $5, $7))) MYSQL_YYABORT; } | SUBSTRING '(' expr ',' expr ')' { - $$= new (thd->mem_root) Item_func_substr(thd, $3, $5); - if ($$ == NULL) + if (!($$= Lex->make_item_func_substr(thd, $3, $5))) MYSQL_YYABORT; } | SUBSTRING '(' expr FROM expr FOR_SYM expr ')' { - $$= new (thd->mem_root) Item_func_substr(thd, $3, $5, $7); - if ($$ == NULL) + if (!($$= Lex->make_item_func_substr(thd, $3, $5, $7))) MYSQL_YYABORT; } | SUBSTRING '(' expr FROM expr ')' { - $$= new (thd->mem_root) Item_func_substr(thd, $3, $5); - if ($$ == NULL) + if (!($$= Lex->make_item_func_substr(thd, $3, $5))) MYSQL_YYABORT; } | SYSDATE opt_time_precision @@ -13924,36 +13920,18 @@ text_literal: } | NCHAR_STRING { - DBUG_ASSERT(my_charset_is_ascii_based(national_charset_info)); - $$= new (thd->mem_root) Item_string(thd, $1.str, $1.length, - national_charset_info, - DERIVATION_COERCIBLE, - $1.repertoire()); - if ($$ == NULL) + if (!($$= thd->make_string_literal_nchar($1))) MYSQL_YYABORT; } | UNDERSCORE_CHARSET TEXT_STRING { - $$= new (thd->mem_root) Item_string_with_introducer(thd, $2.str, - $2.length, $1); - if ($$ == NULL) + if (!($$= thd->make_string_literal_charset($2, $1))) MYSQL_YYABORT; } | text_literal TEXT_STRING_literal { - Item_string* item= (Item_string*) $1; - item->append($2.str, $2.length); - if (!(item->collation.repertoire & MY_REPERTOIRE_EXTENDED)) - { - /* - If the string has been pure ASCII so far, - check the new part. - */ - CHARSET_INFO *cs= thd->variables.collation_connection; - item->collation.repertoire|= my_string_repertoire(cs, - $2.str, - $2.length); - } + if (!($$= thd->make_string_literal_concat($1, $2))) + MYSQL_YYABORT; } ; |