diff options
author | bar@bar.mysql.r18.ru <> | 2002-12-19 09:38:25 +0400 |
---|---|---|
committer | bar@bar.mysql.r18.ru <> | 2002-12-19 09:38:25 +0400 |
commit | f7711e851b350c8c453dc805cd96cda2af3db7c3 (patch) | |
tree | 2419d4e1328ce3e2d98a650f580034b845a07f16 /sql | |
parent | acc4c439158c2ea6f88945074d72bc7f6ce1e5f0 (diff) | |
download | mariadb-git-f7711e851b350c8c453dc805cd96cda2af3db7c3.tar.gz |
Introducing SAPDB-style
"fieldname CHAR(n) UNICODE"
as a synonym to
"fieldname CHAR(n) CHARACTER SET ucs2"
Diffstat (limited to 'sql')
-rw-r--r-- | sql/lex.h | 1 | ||||
-rw-r--r-- | sql/sql_yacc.yy | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/sql/lex.h b/sql/lex.h index 421ac933f50..1dae62eec4b 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -374,6 +374,7 @@ static SYMBOL symbols[] = { { "TYPE", SYM(TYPE_SYM),0,0}, { "TYPES", SYM(TYPES_SYM),0,0}, { "UNCOMMITTED", SYM(UNCOMMITTED_SYM),0,0}, + { "UNICODE", SYM(UNICODE_SYM),0,0}, { "UNION", SYM(UNION_SYM),0,0}, { "UNIQUE", SYM(UNIQUE_SYM),0,0}, { "UNLOCK", SYM(UNLOCK_SYM),0,0}, diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 8e947ec7587..3c9ec865348 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -361,6 +361,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); %token UDF_SYM %token UNCOMMITTED_SYM %token UNDERSCORE_CHARSET +%token UNICODE_SYM %token UNION_SYM %token UNIQUE_SYM %token USAGE @@ -1259,6 +1260,14 @@ opt_binary: /* empty */ { Lex->charset=NULL; } | BYTE_SYM { Lex->charset=my_charset_bin; } | BINARY { Lex->charset=my_charset_bin; } + | UNICODE_SYM + { + if (!(Lex->charset=get_charset_by_name("ucs2",MYF(0)))) + { + net_printf(YYTHD,ER_UNKNOWN_CHARACTER_SET,"ucs2"); + YYABORT; + } + } | CHAR_SYM SET charset_name { Lex->charset=$3; } ; @@ -3872,6 +3881,7 @@ keyword: | TYPE_SYM {} | UDF_SYM {} | UNCOMMITTED_SYM {} + | UNICODE_SYM {} | USE_FRM {} | VARIABLES {} | VALUE_SYM {} |