mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
SAPDB-style syntax
CREATE TABLE tname (a CHAR(10) ASCII) as a synonym for CREATE TABLE tname (a CHAR(10) CHARACTER SET latin1)
This commit is contained in:
parent
f7711e851b
commit
9c94dea185
4 changed files with 7 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (
|
||||
comment CHAR(32) CHARACTER SET latin1 NOT NULL,
|
||||
comment CHAR(32) ASCII NOT NULL,
|
||||
koi8_ru_f CHAR(32) CHARACTER SET koi8_ru NOT NULL
|
||||
) CHARSET=latin5;
|
||||
SHOW CREATE TABLE t1;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
DROP TABLE IF EXISTS t1;
|
||||
|
||||
CREATE TABLE t1 (
|
||||
comment CHAR(32) CHARACTER SET latin1 NOT NULL,
|
||||
comment CHAR(32) ASCII NOT NULL,
|
||||
koi8_ru_f CHAR(32) CHARACTER SET koi8_ru NOT NULL
|
||||
) CHARSET=latin5;
|
||||
|
||||
|
|
|
@ -59,6 +59,7 @@ static SYMBOL symbols[] = {
|
|||
{ "ANY", SYM(ANY_SYM),0,0},
|
||||
{ "AS", SYM(AS),0,0},
|
||||
{ "ASC", SYM(ASC),0,0},
|
||||
{ "ASCII", SYM(ASCII_SYM),0,0},
|
||||
{ "AVG", SYM(AVG_SYM),0,0},
|
||||
{ "AVG_ROW_LENGTH", SYM(AVG_ROW_LENGTH),0,0},
|
||||
{ "AUTO_INCREMENT", SYM(AUTO_INC),0,0},
|
||||
|
@ -413,7 +414,6 @@ static SYMBOL sql_functions[] = {
|
|||
{ "AES_ENCRYPT", SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_aes_encrypt)},
|
||||
{ "AES_DECRYPT", SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_aes_decrypt)},
|
||||
{ "AREA", SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_area)},
|
||||
{ "ASCII", SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_ascii)},
|
||||
{ "ASIN", SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_asin)},
|
||||
{ "ASTEXT", SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_as_text)},
|
||||
{ "ATAN", SYM(ATAN),0,0},
|
||||
|
|
|
@ -381,6 +381,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
|
|||
%token ERRORS
|
||||
%token WARNINGS
|
||||
|
||||
%token ASCII_SYM
|
||||
%token BIGINT
|
||||
%token BLOB_SYM
|
||||
%token CHAR_SYM
|
||||
|
@ -1258,6 +1259,7 @@ opt_db_default_character_set:
|
|||
|
||||
opt_binary:
|
||||
/* empty */ { Lex->charset=NULL; }
|
||||
| ASCII_SYM { Lex->charset=my_charset_latin1; }
|
||||
| BYTE_SYM { Lex->charset=my_charset_bin; }
|
||||
| BINARY { Lex->charset=my_charset_bin; }
|
||||
| UNICODE_SYM
|
||||
|
@ -1270,7 +1272,6 @@ opt_binary:
|
|||
}
|
||||
| CHAR_SYM SET charset_name { Lex->charset=$3; } ;
|
||||
|
||||
|
||||
opt_primary:
|
||||
/* empty */
|
||||
| PRIMARY_SYM
|
||||
|
@ -2023,6 +2024,7 @@ simple_expr:
|
|||
| MATCH ident_list_arg AGAINST '(' expr IN_SYM BOOLEAN_SYM MODE_SYM ')'
|
||||
{ Select->add_ftfunc_to_list((Item_func_match *)
|
||||
($$=new Item_func_match_bool(*$2,$5))); }
|
||||
| ASCII_SYM '(' expr ')' { $$= new Item_func_ascii($3); }
|
||||
| BINARY expr %prec NEG { $$= new Item_func_set_collation($2,my_charset_bin); }
|
||||
| CAST_SYM '(' expr AS cast_type ')' { $$= create_func_cast($3, $5); }
|
||||
| CASE_SYM opt_expr WHEN_SYM when_list opt_else END
|
||||
|
@ -3730,6 +3732,7 @@ keyword:
|
|||
| AGAINST {}
|
||||
| AGGREGATE_SYM {}
|
||||
| ANY_SYM {}
|
||||
| ASCII_SYM {}
|
||||
| AUTO_INC {}
|
||||
| AVG_ROW_LENGTH {}
|
||||
| AVG_SYM {}
|
||||
|
|
Loading…
Reference in a new issue