From f187ed9efbb6c28fc5405a211e3e0ec164fd157a Mon Sep 17 00:00:00 2001
From: "bar@bar.mysql.r18.ru" <>
Date: Thu, 20 Mar 2003 19:31:01 +0400
Subject: [PATCH] NCHAR(n) and NATIONAL CHARACTER(n) is now synonim for
 CHARACTER(n) CHARACTER SET utf8

---
 sql/sql_yacc.yy | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 3d476ebd57c..9244490f3cc 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -664,7 +664,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
 	when_list2 expr_list2  handler
 	opt_precision opt_ignore opt_column opt_restrict
 	grant revoke set lock unlock string_list field_options field_option
-	field_opt_list opt_binary table_lock_list table_lock varchar
+	field_opt_list opt_binary table_lock_list table_lock varchar nchar
 	ref_list opt_on_delete opt_on_delete_list opt_on_delete_item use
 	opt_delete_options opt_delete_option
 	opt_outer table_list table_name opt_option opt_place
@@ -1130,6 +1130,12 @@ type:
 					  $$=FIELD_TYPE_STRING; }
 	| char opt_binary		{ Lex->length=(char*) "1";
 					  $$=FIELD_TYPE_STRING; }
+	| nchar '(' NUM ')'		{ Lex->length=$3.str;
+					  $$=FIELD_TYPE_STRING; 
+					  Lex->charset=&my_charset_utf8; }
+	| nchar				{ Lex->length=(char*) "1";
+					  $$=FIELD_TYPE_STRING; 
+					  Lex->charset=&my_charset_utf8; }
 	| BINARY '(' NUM ')'		{ Lex->length=$3.str;
 					  Lex->charset=&my_charset_bin;
 					  $$=FIELD_TYPE_STRING; }
@@ -1211,8 +1217,12 @@ type:
 
 char:
 	CHAR_SYM {}
-	| NCHAR_SYM {}
-	| NATIONAL_SYM CHAR_SYM {};
+	;
+
+nchar:
+	NCHAR_SYM {}
+	| NATIONAL_SYM CHAR_SYM {}
+	;
 
 varchar:
 	char VARYING {}
-- 
2.30.9