mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Fix for bug #20695: Charset introducer overrides charset definition for column.
- if there are two character set definitions in the column declaration,
we replace the first one with the second one as we store both in the LEX->charset
slot. Add a separate slot to the LEX structure to store underscore charset.
- convert default values to the column charset of STRING, VARSTRING fields
if necessary as well.
This commit is contained in:
parent
7ff64de172
commit
6660f98b64
@@ -643,8 +643,9 @@ int yylex(void *arg, void *yythd)
|
||||
*/
|
||||
|
||||
if ((yylval->lex_str.str[0]=='_') &&
|
||||
(lex->charset=get_charset_by_csname(yylval->lex_str.str+1,
|
||||
MY_CS_PRIMARY,MYF(0))))
|
||||
(lex->underscore_charset=
|
||||
get_charset_by_csname(yylval->lex_str.str + 1,
|
||||
MY_CS_PRIMARY,MYF(0))))
|
||||
return(UNDERSCORE_CHARSET);
|
||||
return(result_state); // IDENT or IDENT_QUOTED
|
||||
|
||||
|
||||
Reference in New Issue
Block a user