Commit 77fb60e9 authored by bar@bar.mysql.r18.ru's avatar bar@bar.mysql.r18.ru

New syntax for character strings:

SELECT _latin1 0x345678;
SELECT _latin x'345678';
parent ce016df8
...@@ -3885,6 +3885,14 @@ literal: ...@@ -3885,6 +3885,14 @@ literal:
| NULL_SYM { $$ = new Item_null(); | NULL_SYM { $$ = new Item_null();
Lex->next_state=MY_LEX_OPERATOR_OR_IDENT;} Lex->next_state=MY_LEX_OPERATOR_OR_IDENT;}
| HEX_NUM { $$ = new Item_varbinary($1.str,$1.length);} | HEX_NUM { $$ = new Item_varbinary($1.str,$1.length);}
| UNDERSCORE_CHARSET HEX_NUM
{
Item *tmp= new Item_varbinary($2.str,$2.length);
String *str= tmp ? tmp->val_str((String*) 0) : (String*) 0;
$$ = new Item_string(str ? str->ptr() : "",
str ? str->length() : 0,
Lex->charset,Item::COER_IMPLICIT);
}
| DATE_SYM text_literal { $$ = $2; } | DATE_SYM text_literal { $$ = $2; }
| TIME_SYM text_literal { $$ = $2; } | TIME_SYM text_literal { $$ = $2; }
| TIMESTAMP text_literal { $$ = $2; }; | TIMESTAMP text_literal { $$ = $2; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment