diff options
author | unknown <bar@bar.mysql.r18.ru> | 2003-03-14 18:08:12 +0400 |
---|---|---|
committer | unknown <bar@bar.mysql.r18.ru> | 2003-03-14 18:08:12 +0400 |
commit | aeb47edbbc10addaf7b551b8f2de17142f3ad269 (patch) | |
tree | da8de3c08ddcdfb12acc6f34445b02a681926a01 | |
parent | 13d28097e7174546409f8757cbed937d9c1ab5a6 (diff) | |
download | mariadb-git-aeb47edbbc10addaf7b551b8f2de17142f3ad269.tar.gz |
Every charset now have its own parser state arrays
-rw-r--r-- | include/m_ctype.h | 18 | ||||
-rw-r--r-- | mysys/charset.c | 64 | ||||
-rw-r--r-- | sql/sql_lex.cc | 301 | ||||
-rw-r--r-- | sql/sql_lex.h | 15 | ||||
-rw-r--r-- | sql/sql_yacc.yy | 6 | ||||
-rw-r--r-- | strings/ctype-big5.c | 1 | ||||
-rw-r--r-- | strings/ctype-bin.c | 1 | ||||
-rw-r--r-- | strings/ctype-czech.c | 1 | ||||
-rw-r--r-- | strings/ctype-euc_kr.c | 1 | ||||
-rw-r--r-- | strings/ctype-extra.c | 24 | ||||
-rw-r--r-- | strings/ctype-gb2312.c | 1 | ||||
-rw-r--r-- | strings/ctype-gbk.c | 1 | ||||
-rw-r--r-- | strings/ctype-latin1.c | 1 | ||||
-rw-r--r-- | strings/ctype-latin1_de.c | 1 | ||||
-rw-r--r-- | strings/ctype-sjis.c | 1 | ||||
-rw-r--r-- | strings/ctype-tis620.c | 1 | ||||
-rw-r--r-- | strings/ctype-ujis.c | 1 | ||||
-rw-r--r-- | strings/ctype-utf8.c | 2 | ||||
-rw-r--r-- | strings/ctype-win1250ch.c | 1 |
19 files changed, 250 insertions, 192 deletions
diff --git a/include/m_ctype.h b/include/m_ctype.h index 19c7d315f4a..43338c1942d 100644 --- a/include/m_ctype.h +++ b/include/m_ctype.h @@ -74,6 +74,22 @@ typedef struct my_uni_idx_st } MY_UNI_IDX; +enum my_lex_states +{ + MY_LEX_START, MY_LEX_CHAR, MY_LEX_IDENT, + MY_LEX_IDENT_SEP, MY_LEX_IDENT_START, + MY_LEX_FOUND_IDENT, MY_LEX_SIGNED_NUMBER, MY_LEX_REAL, MY_LEX_HEX_NUMBER, + MY_LEX_CMP_OP, MY_LEX_LONG_CMP_OP, MY_LEX_STRING, MY_LEX_COMMENT, MY_LEX_END, + MY_LEX_OPERATOR_OR_IDENT, MY_LEX_NUMBER_IDENT, MY_LEX_INT_OR_REAL, + MY_LEX_REAL_OR_POINT, MY_LEX_BOOL, MY_LEX_EOL, MY_LEX_ESCAPE, + MY_LEX_LONG_COMMENT, MY_LEX_END_LONG_COMMENT, MY_LEX_COLON, + MY_LEX_SET_VAR, MY_LEX_USER_END, MY_LEX_HOSTNAME, MY_LEX_SKIP, + MY_LEX_USER_VARIABLE_DELIMITER, MY_LEX_SYSTEM_VAR, + MY_LEX_IDENT_OR_KEYWORD, MY_LEX_IDENT_OR_HEX, MY_LEX_IDENT_OR_BIN, + MY_LEX_STRING_OR_DELIMITER +}; + + typedef struct charset_info_st { uint number; @@ -89,6 +105,8 @@ typedef struct charset_info_st uchar *sort_order; uint16 *tab_to_uni; MY_UNI_IDX *tab_from_uni; + uchar state_map[256]; + uchar ident_map[256]; /* Collation routines */ uint strxfrm_multiply; diff --git a/mysys/charset.c b/mysys/charset.c index 8bc250a3f07..3ad27469c03 100644 --- a/mysys/charset.c +++ b/mysys/charset.c @@ -29,7 +29,7 @@ - Initializing charset related structures - Loading dynamic charsets - Searching for a proper CHARSET_INFO - using charset name, collation name or collatio ID + using charset name, collation name or collation ID - Setting server default character set */ @@ -54,6 +54,62 @@ static void set_max_sort_char(CHARSET_INFO *cs) } +static void init_state_maps(CHARSET_INFO *cs) +{ + uint i; + uchar *state_map= cs->state_map; + uchar *ident_map= cs->ident_map; + + /* Fill state_map with states to get a faster parser */ + for (i=0; i < 256 ; i++) + { + if (my_isalpha(cs,i)) + state_map[i]=(uchar) MY_LEX_IDENT; + else if (my_isdigit(cs,i)) + state_map[i]=(uchar) MY_LEX_NUMBER_IDENT; +#if defined(USE_MB) && defined(USE_MB_IDENT) + else if (use_mb(cs) && my_ismbhead(cs, i)) + state_map[i]=(uchar) MY_LEX_IDENT; +#endif + else if (!my_isgraph(cs,i)) + state_map[i]=(uchar) MY_LEX_SKIP; + else + state_map[i]=(uchar) MY_LEX_CHAR; + } + state_map[(uchar)'_']=state_map[(uchar)'$']=(uchar) MY_LEX_IDENT; + state_map[(uchar)'\'']=(uchar) MY_LEX_STRING; + state_map[(uchar)'-']=state_map[(uchar)'+']=(uchar) MY_LEX_SIGNED_NUMBER; + state_map[(uchar)'.']=(uchar) MY_LEX_REAL_OR_POINT; + state_map[(uchar)'>']=state_map[(uchar)'=']=state_map[(uchar)'!']= (uchar) MY_LEX_CMP_OP; + state_map[(uchar)'<']= (uchar) MY_LEX_LONG_CMP_OP; + state_map[(uchar)'&']=state_map[(uchar)'|']=(uchar) MY_LEX_BOOL; + state_map[(uchar)'#']=(uchar) MY_LEX_COMMENT; + state_map[(uchar)';']=(uchar) MY_LEX_COLON; + state_map[(uchar)':']=(uchar) MY_LEX_SET_VAR; + state_map[0]=(uchar) MY_LEX_EOL; + state_map[(uchar)'\\']= (uchar) MY_LEX_ESCAPE; + state_map[(uchar)'/']= (uchar) MY_LEX_LONG_COMMENT; + state_map[(uchar)'*']= (uchar) MY_LEX_END_LONG_COMMENT; + state_map[(uchar)'@']= (uchar) MY_LEX_USER_END; + state_map[(uchar) '`']= (uchar) MY_LEX_USER_VARIABLE_DELIMITER; + state_map[(uchar)'"']= (uchar) MY_LEX_STRING_OR_DELIMITER; + + /* + Create a second map to make it faster to find identifiers + */ + for (i=0; i < 256 ; i++) + { + ident_map[i]= (uchar) (state_map[i] == MY_LEX_IDENT || + state_map[i] == MY_LEX_NUMBER_IDENT); + } + + /* Special handling of hex and binary strings */ + state_map[(uchar)'x']= state_map[(uchar)'X']= (uchar) MY_LEX_IDENT_OR_HEX; + state_map[(uchar)'b']= state_map[(uchar)'b']= (uchar) MY_LEX_IDENT_OR_BIN; + + +} + static void simple_cs_init_functions(CHARSET_INFO *cs) { @@ -211,8 +267,11 @@ static void simple_cs_copy_data(CHARSET_INFO *to, CHARSET_INFO *from) to->name= my_once_strdup(from->name,MYF(MY_WME)); if (from->ctype) + { to->ctype= (uchar*) my_once_memdup((char*) from->ctype, MY_CS_CTYPE_TABLE_SIZE, MYF(MY_WME)); + init_state_maps(to); + } if (from->to_lower) to->to_lower= (uchar*) my_once_memdup((char*) from->to_lower, MY_CS_TO_LOWER_TABLE_SIZE, MYF(MY_WME)); @@ -447,7 +506,10 @@ static my_bool init_available_charsets(myf myflags) for (cs=all_charsets; cs < all_charsets+255 ; cs++) { if (*cs) + { set_max_sort_char(*cs); + init_state_maps(*cs); + } } strmov(get_charsets_dir(fname), MY_CHARSET_INDEX); diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 9df94204644..cd0a653ba86 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -75,8 +75,6 @@ inline int lex_casecmp(const char *s, const char *t, uint len) #include "lex_hash.h" -static uchar state_map[256], ident_map[256]; - void lex_init(void) { @@ -89,53 +87,6 @@ void lex_init(void) VOID(pthread_key_create(&THR_LEX,NULL)); - /* Fill state_map with states to get a faster parser */ - for (i=0; i < sizeof(state_map) ; i++) - { - if (my_isalpha(system_charset_info,i)) - state_map[i]=(uchar) STATE_IDENT; - else if (my_isdigit(system_charset_info,i)) - state_map[i]=(uchar) STATE_NUMBER_IDENT; -#if defined(USE_MB) && defined(USE_MB_IDENT) - else if (use_mb(system_charset_info) && my_ismbhead(system_charset_info, i)) - state_map[i]=(uchar) STATE_IDENT; -#endif - else if (!my_isgraph(system_charset_info,i)) - state_map[i]=(uchar) STATE_SKIP; - else - state_map[i]=(uchar) STATE_CHAR; - } - state_map[(uchar)'_']=state_map[(uchar)'$']=(uchar) STATE_IDENT; - state_map[(uchar)'\'']=(uchar) STATE_STRING; - state_map[(uchar)'-']=state_map[(uchar)'+']=(uchar) STATE_SIGNED_NUMBER; - state_map[(uchar)'.']=(uchar) STATE_REAL_OR_POINT; - state_map[(uchar)'>']=state_map[(uchar)'=']=state_map[(uchar)'!']= (uchar) STATE_CMP_OP; - state_map[(uchar)'<']= (uchar) STATE_LONG_CMP_OP; - state_map[(uchar)'&']=state_map[(uchar)'|']=(uchar) STATE_BOOL; - state_map[(uchar)'#']=(uchar) STATE_COMMENT; - state_map[(uchar)';']=(uchar) STATE_COLON; - state_map[(uchar)':']=(uchar) STATE_SET_VAR; - state_map[0]=(uchar) STATE_EOL; - state_map[(uchar)'\\']= (uchar) STATE_ESCAPE; - state_map[(uchar)'/']= (uchar) STATE_LONG_COMMENT; - state_map[(uchar)'*']= (uchar) STATE_END_LONG_COMMENT; - state_map[(uchar)'@']= (uchar) STATE_USER_END; - state_map[(uchar) '`']= (uchar) STATE_USER_VARIABLE_DELIMITER; - state_map[(uchar)'"']= (uchar) STAT_STRING_OR_DELIMITER; - - /* - Create a second map to make it faster to find identifiers - */ - for (i=0; i < sizeof(ident_map) ; i++) - { - ident_map[i]= (uchar) (state_map[i] == STATE_IDENT || - state_map[i] == STATE_NUMBER_IDENT); - } - - /* Special handling of hex and binary strings */ - state_map[(uchar)'x']= state_map[(uchar)'X']= (uchar) STATE_IDENT_OR_HEX; - state_map[(uchar)'b']= state_map[(uchar)'b']= (uchar) STATE_IDENT_OR_BIN; - DBUG_VOID_RETURN; } @@ -156,7 +107,7 @@ void lex_free(void) LEX *lex_start(THD *thd, uchar *buf,uint length) { LEX *lex= &thd->lex; - lex->next_state=STATE_START; + lex->next_state=MY_LEX_START; lex->end_of_query=(lex->ptr=buf)+length; lex->yylineno = 1; lex->select_lex.create_refs=lex->in_comment=0; @@ -458,8 +409,8 @@ inline static uint int_token(const char *str,uint length) // yylex remember the following states from the following yylex() -// STATE_EOQ ; found end of query -// STATE_OPERATOR_OR_IDENT ; last state was an ident, text or number +// MY_LEX_EOQ ; found end of query +// MY_LEX_OPERATOR_OR_IDENT ; last state was an ident, text or number // (which can't be followed by a signed number) int yylex(void *arg, void *yythd) @@ -467,76 +418,79 @@ int yylex(void *arg, void *yythd) reg1 uchar c; int tokval; uint length; - enum lex_states state,prev_state; + enum my_lex_states state,prev_state; LEX *lex= &(((THD *)yythd)->lex); YYSTYPE *yylval=(YYSTYPE*) arg; + CHARSET_INFO *cs= ((THD *) yythd)->variables.thd_charset; + uchar *state_map= cs->state_map; + uchar *ident_map= cs->ident_map; lex->yylval=yylval; // The global state lex->tok_start=lex->tok_end=lex->ptr; prev_state=state=lex->next_state; - lex->next_state=STATE_OPERATOR_OR_IDENT; + lex->next_state=MY_LEX_OPERATOR_OR_IDENT; LINT_INIT(c); for (;;) { switch (state) { - case STATE_OPERATOR_OR_IDENT: // Next is operator or keyword - case STATE_START: // Start of token + case MY_LEX_OPERATOR_OR_IDENT: // Next is operator or keyword + case MY_LEX_START: // Start of token // Skip startspace - for (c=yyGet() ; (state_map[c] == STATE_SKIP) ; c= yyGet()) + for (c=yyGet() ; (state_map[c] == MY_LEX_SKIP) ; c= yyGet()) { if (c == '\n') lex->yylineno++; } lex->tok_start=lex->ptr-1; // Start of real token - state= (enum lex_states) state_map[c]; + state= (enum my_lex_states) state_map[c]; break; - case STATE_ESCAPE: + case MY_LEX_ESCAPE: if (yyGet() == 'N') { // Allow \N as shortcut for NULL yylval->lex_str.str=(char*) "\\N"; yylval->lex_str.length=2; return NULL_SYM; } - case STATE_CHAR: // Unknown or single char token - case STATE_SKIP: // This should not happen + case MY_LEX_CHAR: // Unknown or single char token + case MY_LEX_SKIP: // This should not happen yylval->lex_str.str=(char*) (lex->ptr=lex->tok_start);// Set to first chr yylval->lex_str.length=1; c=yyGet(); if (c != ')') - lex->next_state= STATE_START; // Allow signed numbers + lex->next_state= MY_LEX_START; // Allow signed numbers if (c == ',') lex->tok_start=lex->ptr; // Let tok_start point at next item return((int) c); - case STATE_IDENT_OR_HEX: + case MY_LEX_IDENT_OR_HEX: if (yyPeek() == '\'') { // Found x'hex-number' - state= STATE_HEX_NUMBER; + state= MY_LEX_HEX_NUMBER; break; } /* Fall through */ - case STATE_IDENT_OR_BIN: // TODO: Add binary string handling - case STATE_IDENT: + case MY_LEX_IDENT_OR_BIN: // TODO: Add binary string handling + case MY_LEX_IDENT: #if defined(USE_MB) && defined(USE_MB_IDENT) - if (use_mb(system_charset_info)) + if (use_mb(cs)) { - if (my_ismbhead(system_charset_info, yyGetLast())) + if (my_ismbhead(cs, yyGetLast())) { - int l = my_ismbchar(system_charset_info, + int l = my_ismbchar(cs, (const char *)lex->ptr-1, (const char *)lex->end_of_query); if (l == 0) { - state = STATE_CHAR; + state = MY_LEX_CHAR; continue; } lex->ptr += l - 1; } while (ident_map[c=yyGet()]) { - if (my_ismbhead(system_charset_info, c)) + if (my_ismbhead(cs, c)) { int l; - if ((l = my_ismbchar(system_charset_info, + if ((l = my_ismbchar(cs, (const char *)lex->ptr-1, (const char *)lex->end_of_query)) == 0) break; @@ -550,16 +504,16 @@ int yylex(void *arg, void *yythd) length= (uint) (lex->ptr - lex->tok_start)-1; if (lex->ignore_space) { - for (; state_map[c] == STATE_SKIP ; c= yyGet()); + for (; state_map[c] == MY_LEX_SKIP ; c= yyGet()); } if (c == '.' && ident_map[yyPeek()]) - lex->next_state=STATE_IDENT_SEP; + lex->next_state=MY_LEX_IDENT_SEP; else { // '(' must follow directly if function yyUnget(); if ((tokval = find_keyword(lex,length,c == '('))) { - lex->next_state= STATE_START; // Allow signed numbers + lex->next_state= MY_LEX_START; // Allow signed numbers return(tokval); // Was keyword } yySkip(); // next state does a unget @@ -582,30 +536,30 @@ int yylex(void *arg, void *yythd) else return(IDENT); - case STATE_IDENT_SEP: // Found ident and now '.' - lex->next_state=STATE_IDENT_START;// Next is an ident (not a keyword) + case MY_LEX_IDENT_SEP: // Found ident and now '.' + lex->next_state=MY_LEX_IDENT_START;// Next is an ident (not a keyword) yylval->lex_str.str=(char*) lex->ptr; yylval->lex_str.length=1; c=yyGet(); // should be '.' return((int) c); - case STATE_NUMBER_IDENT: // number or ident which num-start - while (my_isdigit(system_charset_info,(c = yyGet()))) ; + case MY_LEX_NUMBER_IDENT: // number or ident which num-start + while (my_isdigit(cs,(c = yyGet()))) ; if (!ident_map[c]) { // Can't be identifier - state=STATE_INT_OR_REAL; + state=MY_LEX_INT_OR_REAL; break; } if (c == 'e' || c == 'E') { // The following test is written this way to allow numbers of type 1e1 - if (my_isdigit(system_charset_info,yyPeek()) || + if (my_isdigit(cs,yyPeek()) || (c=(yyGet())) == '+' || c == '-') { // Allow 1E+10 - if (my_isdigit(system_charset_info,yyPeek())) // Number must have digit after sign + if (my_isdigit(cs,yyPeek())) // Number must have digit after sign { yySkip(); - while (my_isdigit(system_charset_info,yyGet())) ; + while (my_isdigit(cs,yyGet())) ; yylval->lex_str=get_token(lex,yyLength()); return(FLOAT_NUM); } @@ -615,7 +569,7 @@ int yylex(void *arg, void *yythd) else if (c == 'x' && (lex->ptr - lex->tok_start) == 2 && lex->tok_start[0] == '0' ) { // Varbinary - while (my_isxdigit(system_charset_info,(c = yyGet()))) ; + while (my_isxdigit(cs,(c = yyGet()))) ; if ((lex->ptr - lex->tok_start) >= 4 && !ident_map[c]) { yylval->lex_str=get_token(lex,yyLength()); @@ -627,28 +581,28 @@ int yylex(void *arg, void *yythd) yyUnget(); } // fall through - case STATE_IDENT_START: // Incomplete ident + case MY_LEX_IDENT_START: // Incomplete ident #if defined(USE_MB) && defined(USE_MB_IDENT) - if (use_mb(system_charset_info)) + if (use_mb(cs)) { - if (my_ismbhead(system_charset_info, yyGetLast())) + if (my_ismbhead(cs, yyGetLast())) { - int l = my_ismbchar(system_charset_info, + int l = my_ismbchar(cs, (const char *)lex->ptr-1, (const char *)lex->end_of_query); if (l == 0) { - state = STATE_CHAR; + state = MY_LEX_CHAR; continue; } lex->ptr += l - 1; } while (ident_map[c=yyGet()]) { - if (my_ismbhead(system_charset_info, c)) + if (my_ismbhead(cs, c)) { int l; - if ((l = my_ismbchar(system_charset_info, + if ((l = my_ismbchar(cs, (const char *)lex->ptr-1, (const char *)lex->end_of_query)) == 0) break; @@ -661,28 +615,28 @@ int yylex(void *arg, void *yythd) while (ident_map[c = yyGet()]) ; if (c == '.' && ident_map[yyPeek()]) - lex->next_state=STATE_IDENT_SEP;// Next is '.' + lex->next_state=MY_LEX_IDENT_SEP;// Next is '.' // fall through - case STATE_FOUND_IDENT: // Complete ident + case MY_LEX_FOUND_IDENT: // Complete ident yylval->lex_str=get_token(lex,yyLength()); if (lex->convert_set) lex->convert_set->convert((char*) yylval->lex_str.str,lex->yytoklen); return(IDENT); - case STATE_USER_VARIABLE_DELIMITER: + case MY_LEX_USER_VARIABLE_DELIMITER: { char delim= c; // Used char lex->tok_start=lex->ptr; // Skip first ` #ifdef USE_MB - if (use_mb(system_charset_info)) + if (use_mb(cs)) { while ((c=yyGet()) && c != delim && c != (uchar) NAMES_SEP_CHAR) { - if (my_ismbhead(system_charset_info, c)) + if (my_ismbhead(cs, c)) { int l; - if ((l = my_ismbchar(system_charset_info, + if ((l = my_ismbchar(cs, (const char *)lex->ptr-1, (const char *)lex->end_of_query)) == 0) break; @@ -721,67 +675,67 @@ int yylex(void *arg, void *yythd) yySkip(); // Skip end ` return(IDENT); } - case STATE_SIGNED_NUMBER: // Incomplete signed number - if (prev_state == STATE_OPERATOR_OR_IDENT) + case MY_LEX_SIGNED_NUMBER: // Incomplete signed number + if (prev_state == MY_LEX_OPERATOR_OR_IDENT) { if (c == '-' && yyPeek() == '-' && - (my_isspace(system_charset_info,yyPeek2()) || - my_iscntrl(system_charset_info,yyPeek2()))) - state=STATE_COMMENT; + (my_isspace(cs,yyPeek2()) || + my_iscntrl(cs,yyPeek2()))) + state=MY_LEX_COMMENT; else - state= STATE_CHAR; // Must be operator + state= MY_LEX_CHAR; // Must be operator break; } - if (!my_isdigit(system_charset_info,c=yyGet()) || yyPeek() == 'x') + if (!my_isdigit(cs,c=yyGet()) || yyPeek() == 'x') { if (c != '.') { - if (c == '-' && my_isspace(system_charset_info,yyPeek())) - state=STATE_COMMENT; + if (c == '-' && my_isspace(cs,yyPeek())) + state=MY_LEX_COMMENT; else - state = STATE_CHAR; // Return sign as single char + state = MY_LEX_CHAR; // Return sign as single char break; } yyUnget(); // Fix for next loop } - while (my_isdigit(system_charset_info,c=yyGet())) ; // Incomplete real or int number + while (my_isdigit(cs,c=yyGet())) ; // Incomplete real or int number if ((c == 'e' || c == 'E') && - (yyPeek() == '+' || yyPeek() == '-' || my_isdigit(system_charset_info,yyPeek()))) + (yyPeek() == '+' || yyPeek() == '-' || my_isdigit(cs,yyPeek()))) { // Real number yyUnget(); c= '.'; // Fool next test } // fall through - case STATE_INT_OR_REAL: // Compleat int or incompleat real + case MY_LEX_INT_OR_REAL: // Compleat int or incompleat real if (c != '.') { // Found complete integer number. yylval->lex_str=get_token(lex,yyLength()); return int_token(yylval->lex_str.str,yylval->lex_str.length); } // fall through - case STATE_REAL: // Incomplete real number - while (my_isdigit(system_charset_info,c = yyGet())) ; + case MY_LEX_REAL: // Incomplete real number + while (my_isdigit(cs,c = yyGet())) ; if (c == 'e' || c == 'E') { c = yyGet(); if (c == '-' || c == '+') c = yyGet(); // Skip sign - if (!my_isdigit(system_charset_info,c)) + if (!my_isdigit(cs,c)) { // No digit after sign - state= STATE_CHAR; + state= MY_LEX_CHAR; break; } - while (my_isdigit(system_charset_info,yyGet())) ; + while (my_isdigit(cs,yyGet())) ; yylval->lex_str=get_token(lex,yyLength()); return(FLOAT_NUM); } yylval->lex_str=get_token(lex,yyLength()); return(REAL_NUM); - case STATE_HEX_NUMBER: // Found x'hexstring' + case MY_LEX_HEX_NUMBER: // Found x'hexstring' yyGet(); // Skip ' - while (my_isxdigit(system_charset_info,(c = yyGet()))) ; + while (my_isxdigit(cs,(c = yyGet()))) ; length=(lex->ptr - lex->tok_start); // Length of hexnum+3 if (!(length & 1) || c != '\'') { @@ -794,56 +748,56 @@ int yylex(void *arg, void *yythd) lex->yytoklen-=3; return (HEX_NUM); - case STATE_CMP_OP: // Incomplete comparison operator - if (state_map[yyPeek()] == STATE_CMP_OP || - state_map[yyPeek()] == STATE_LONG_CMP_OP) + case MY_LEX_CMP_OP: // Incomplete comparison operator + if (state_map[yyPeek()] == MY_LEX_CMP_OP || + state_map[yyPeek()] == MY_LEX_LONG_CMP_OP) yySkip(); if ((tokval = find_keyword(lex,(uint) (lex->ptr - lex->tok_start),0))) { - lex->next_state= STATE_START; // Allow signed numbers + lex->next_state= MY_LEX_START; // Allow signed numbers return(tokval); } - state = STATE_CHAR; // Something fishy found + state = MY_LEX_CHAR; // Something fishy found break; - case STATE_LONG_CMP_OP: // Incomplete comparison operator - if (state_map[yyPeek()] == STATE_CMP_OP || - state_map[yyPeek()] == STATE_LONG_CMP_OP) + case MY_LEX_LONG_CMP_OP: // Incomplete comparison operator + if (state_map[yyPeek()] == MY_LEX_CMP_OP || + state_map[yyPeek()] == MY_LEX_LONG_CMP_OP) { yySkip(); - if (state_map[yyPeek()] == STATE_CMP_OP) + if (state_map[yyPeek()] == MY_LEX_CMP_OP) yySkip(); } if ((tokval = find_keyword(lex,(uint) (lex->ptr - lex->tok_start),0))) { - lex->next_state= STATE_START; // Found long op + lex->next_state= MY_LEX_START; // Found long op return(tokval); } - state = STATE_CHAR; // Something fishy found + state = MY_LEX_CHAR; // Something fishy found break; - case STATE_BOOL: + case MY_LEX_BOOL: if (c != yyPeek()) { - state=STATE_CHAR; + state=MY_LEX_CHAR; break; } yySkip(); tokval = find_keyword(lex,2,0); // Is a bool operator - lex->next_state= STATE_START; // Allow signed numbers + lex->next_state= MY_LEX_START; // Allow signed numbers return(tokval); - case STAT_STRING_OR_DELIMITER: + case MY_LEX_STRING_OR_DELIMITER: if (((THD *) yythd)->variables.sql_mode & MODE_ANSI_QUOTES) { - state= STATE_USER_VARIABLE_DELIMITER; + state= MY_LEX_USER_VARIABLE_DELIMITER; break; } /* " used for strings */ - case STATE_STRING: // Incomplete text string + case MY_LEX_STRING: // Incomplete text string if (!(yylval->lex_str.str = get_text(lex))) { - state= STATE_CHAR; // Read char by char + state= MY_LEX_CHAR; // Read char by char break; } yylval->lex_str.length=lex->yytoklen; @@ -851,16 +805,16 @@ int yylex(void *arg, void *yythd) lex->convert_set->convert((char*) yylval->lex_str.str,lex->yytoklen); return(TEXT_STRING); - case STATE_COMMENT: // Comment + case MY_LEX_COMMENT: // Comment lex->select_lex.options|= OPTION_FOUND_COMMENT; while ((c = yyGet()) != '\n' && c) ; yyUnget(); // Safety against eof - state = STATE_START; // Try again + state = MY_LEX_START; // Try again break; - case STATE_LONG_COMMENT: /* Long C comment? */ + case MY_LEX_LONG_COMMENT: /* Long C comment? */ if (yyPeek() != '*') { - state=STATE_CHAR; // Probable division + state=MY_LEX_CHAR; // Probable division break; } yySkip(); // Skip '*' @@ -869,8 +823,8 @@ int yylex(void *arg, void *yythd) { ulong version=MYSQL_VERSION_ID; yySkip(); - state=STATE_START; - if (my_isdigit(system_charset_info,yyPeek())) + state=MY_LEX_START; + if (my_isdigit(cs,yyPeek())) { // Version number version=strtol((char*) lex->ptr,(char**) &lex->ptr,10); } @@ -888,88 +842,87 @@ int yylex(void *arg, void *yythd) } if (lex->ptr != lex->end_of_query) yySkip(); // remove last '/' - state = STATE_START; // Try again + state = MY_LEX_START; // Try again break; - case STATE_END_LONG_COMMENT: + case MY_LEX_END_LONG_COMMENT: if (lex->in_comment && yyPeek() == '/') { yySkip(); lex->in_comment=0; - state=STATE_START; + state=MY_LEX_START; } else - state=STATE_CHAR; // Return '*' + state=MY_LEX_CHAR; // Return '*' break; - case STATE_SET_VAR: // Check if ':=' + case MY_LEX_SET_VAR: // Check if ':=' if (yyPeek() != '=') { - state=STATE_CHAR; // Return ':' + state=MY_LEX_CHAR; // Return ':' break; } yySkip(); return (SET_VAR); - case STATE_COLON: // optional line terminator + case MY_LEX_COLON: // optional line terminator if (yyPeek()) { if (((THD *)yythd)->client_capabilities & CLIENT_MULTI_QUERIES) { lex->found_colon=(char*)lex->ptr; ((THD *)yythd)->server_status |= SERVER_MORE_RESULTS_EXISTS; - lex->next_state=STATE_END; + lex->next_state=MY_LEX_END; return(END_OF_INPUT); } else - state=STATE_CHAR; // Return ';' + state=MY_LEX_CHAR; // Return ';' break; } /* fall true */ - case STATE_EOL: - lex->next_state=STATE_END; // Mark for next loop + case MY_LEX_EOL: + lex->next_state=MY_LEX_END; // Mark for next loop return(END_OF_INPUT); - case STATE_END: - lex->next_state=STATE_END; + case MY_LEX_END: + lex->next_state=MY_LEX_END; return(0); // We found end of input last time /* Actually real shouldn't start with . but allow them anyhow */ - case STATE_REAL_OR_POINT: - if (my_isdigit(system_charset_info,yyPeek())) - state = STATE_REAL; // Real + case MY_LEX_REAL_OR_POINT: + if (my_isdigit(cs,yyPeek())) + state = MY_LEX_REAL; // Real else { - state = STATE_CHAR; // return '.' - lex->next_state=STATE_IDENT_START;// Next is an ident (not a keyword) + state = MY_LEX_CHAR; // return '.' + lex->next_state=MY_LEX_IDENT_START;// Next is an ident (not a keyword) } break; - case STATE_USER_END: // end '@' of user@hostname + case MY_LEX_USER_END: // end '@' of user@hostname switch (state_map[yyPeek()]) { - case STATE_STRING: - case STATE_USER_VARIABLE_DELIMITER: - case STAT_STRING_OR_DELIMITER: + case MY_LEX_STRING: + case MY_LEX_USER_VARIABLE_DELIMITER: + case MY_LEX_STRING_OR_DELIMITER: break; - case STATE_USER_END: - lex->next_state=STATE_SYSTEM_VAR; + case MY_LEX_USER_END: + lex->next_state=MY_LEX_SYSTEM_VAR; break; default: - lex->next_state=STATE_HOSTNAME; + lex->next_state=MY_LEX_HOSTNAME; break; } yylval->lex_str.str=(char*) lex->ptr; yylval->lex_str.length=1; return((int) '@'); - case STATE_HOSTNAME: // end '@' of user@hostname - for (c=yyGet() ; - my_isalnum(system_charset_info,c) || c == '.' || c == '_' || - c == '$'; + case MY_LEX_HOSTNAME: // end '@' of user@hostname + for (c=yyGet() ; + my_isalnum(cs,c) || c == '.' || c == '_' || c == '$'; c= yyGet()) ; yylval->lex_str=get_token(lex,yyLength()); return(LEX_HOSTNAME); - case STATE_SYSTEM_VAR: + case MY_LEX_SYSTEM_VAR: yylval->lex_str.str=(char*) lex->ptr; yylval->lex_str.length=1; - lex->next_state=STATE_IDENT_OR_KEYWORD; + lex->next_state=MY_LEX_IDENT_OR_KEYWORD; yySkip(); // Skip '@' return((int) '@'); - case STATE_IDENT_OR_KEYWORD: + case MY_LEX_IDENT_OR_KEYWORD: /* We come here when we have found two '@' in a row. We should now be able to handle: @@ -978,7 +931,7 @@ int yylex(void *arg, void *yythd) while (ident_map[c=yyGet()]) ; if (c == '.') - lex->next_state=STATE_IDENT_SEP; + lex->next_state=MY_LEX_IDENT_SEP; length= (uint) (lex->ptr - lex->tok_start)-1; if ((tokval= find_keyword(lex,length,0))) { diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 21c151d33b2..b540f3ef0d1 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -77,19 +77,6 @@ enum enum_sql_command { SQLCOM_END }; -enum lex_states -{ - STATE_START, STATE_CHAR, STATE_IDENT, STATE_IDENT_SEP, STATE_IDENT_START, - STATE_FOUND_IDENT, STATE_SIGNED_NUMBER, STATE_REAL, STATE_HEX_NUMBER, - STATE_CMP_OP, STATE_LONG_CMP_OP, STATE_STRING, STATE_COMMENT, STATE_END, - STATE_OPERATOR_OR_IDENT, STATE_NUMBER_IDENT, STATE_INT_OR_REAL, - STATE_REAL_OR_POINT, STATE_BOOL, STATE_EOL, STATE_ESCAPE, STATE_LONG_COMMENT, - STATE_END_LONG_COMMENT, STATE_COLON, STATE_SET_VAR, STATE_USER_END, - STATE_HOSTNAME, STATE_SKIP, STATE_USER_VARIABLE_DELIMITER, STATE_SYSTEM_VAR, - STATE_IDENT_OR_KEYWORD, STATE_IDENT_OR_HEX, STATE_IDENT_OR_BIN, - STAT_STRING_OR_DELIMITER -}; - typedef List<Item> List_item; @@ -474,7 +461,7 @@ typedef struct st_lex ulong thread_id,type; enum_sql_command sql_command; thr_lock_type lock_option; - enum lex_states next_state; + enum my_lex_states next_state; enum enum_duplicates duplicates; enum enum_tx_isolation tx_isolation; enum enum_ha_read_modes ha_read_mode; diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 3473f2ecab8..fac3315f5c9 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -3867,7 +3867,7 @@ literal: | REAL_NUM { $$ = new Item_real($1.str, $1.length); } | FLOAT_NUM { $$ = new Item_float($1.str, $1.length); } | NULL_SYM { $$ = new Item_null(); - Lex->next_state=STATE_OPERATOR_OR_IDENT;} + Lex->next_state=MY_LEX_OPERATOR_OR_IDENT;} | HEX_NUM { $$ = new Item_varbinary($1.str,$1.length);} | DATE_SYM text_literal { $$ = $2; } | TIME_SYM text_literal { $$ = $2; } @@ -3964,8 +3964,8 @@ ident: LEX *lex= Lex; $$.str= lex->thd->strmake($1.str,$1.length); $$.length=$1.length; - if (lex->next_state != STATE_END) - lex->next_state=STATE_OPERATOR_OR_IDENT; + if (lex->next_state != MY_LEX_END) + lex->next_state= MY_LEX_OPERATOR_OR_IDENT; } ; diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c index c1d6d9e63de..87b76ce789b 100644 --- a/strings/ctype-big5.c +++ b/strings/ctype-big5.c @@ -6244,6 +6244,7 @@ CHARSET_INFO my_charset_big5 = sort_order_big5, NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ + "","", 1, /* strxfrm_multiply */ my_strnncoll_big5, my_strnncollsp_big5, diff --git a/strings/ctype-bin.c b/strings/ctype-bin.c index b39697e6f81..9f5cad01cb2 100644 --- a/strings/ctype-bin.c +++ b/strings/ctype-bin.c @@ -306,6 +306,7 @@ CHARSET_INFO my_charset_bin = bin_char_array, /* sort_order */ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ + "","", 0, /* strxfrm_multiply */ my_strnncoll_binary, /* strnncoll */ my_strnncoll_binary, diff --git a/strings/ctype-czech.c b/strings/ctype-czech.c index 9bdf666cc21..11e40dcf32f 100644 --- a/strings/ctype-czech.c +++ b/strings/ctype-czech.c @@ -618,6 +618,7 @@ CHARSET_INFO my_charset_czech = sort_order_czech, tab_8859_2_uni, /* tab_to_uni */ idx_uni_8859_2, /* tab_from_uni */ + "","", 4, /* strxfrm_multiply */ my_strnncoll_czech, my_strnncollsp_czech, diff --git a/strings/ctype-euc_kr.c b/strings/ctype-euc_kr.c index bd588c351c4..5ccc2cf486b 100644 --- a/strings/ctype-euc_kr.c +++ b/strings/ctype-euc_kr.c @@ -8652,6 +8652,7 @@ CHARSET_INFO my_charset_euc_kr = sort_order_euc_kr, NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ + "","", 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ my_strnncollsp_simple, diff --git a/strings/ctype-extra.c b/strings/ctype-extra.c index cd82ffdd9bb..b95228c9f65 100644 --- a/strings/ctype-extra.c +++ b/strings/ctype-extra.c @@ -2818,6 +2818,7 @@ CHARSET_INFO compiled_charsets[] = { sort_order_latin1, tab_8859_1_uni, /* tab_to_uni */ idx_uni_8859_1, /* tab_from_uni */ + "","", 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ my_strnncollsp_simple,/* strnncollsp */ @@ -2869,6 +2870,7 @@ CHARSET_INFO compiled_charsets[] = { sort_order_cp1251, tab_cp1251_uni, /* tab_to_uni */ idx_uni_cp1251, /* tab_from_uni */ + "","", 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ my_strnncollsp_simple,/* strnncollsp */ @@ -2919,6 +2921,7 @@ CHARSET_INFO compiled_charsets[] = { sort_order_cp1257, tab_cp1257_uni, /* tab_to_uni */ idx_uni_cp1257, /* tab_from_uni */ + "","", 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ my_strnncollsp_simple,/* strnncollsp */ @@ -2969,6 +2972,7 @@ CHARSET_INFO compiled_charsets[] = { sort_order_croat, tab_8859_2_uni, /* tab_to_uni */ idx_uni_8859_2, /* tab_from_uni */ + "","", 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ my_strnncollsp_simple,/* strnncollsp */ @@ -3020,6 +3024,7 @@ CHARSET_INFO compiled_charsets[] = { sort_order_danish, tab_8859_1_uni, /* tab_to_uni */ idx_uni_8859_1, /* tab_from_uni */ + "","", 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ my_strnncollsp_simple,/* strnncollsp */ @@ -3070,6 +3075,7 @@ CHARSET_INFO compiled_charsets[] = { sort_order_dec8, NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ + "","", 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ my_strnncollsp_simple,/* strnncollsp */ @@ -3120,6 +3126,7 @@ CHARSET_INFO compiled_charsets[] = { sort_order_dos, NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ + "","", 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ my_strnncollsp_simple,/* strnncollsp */ @@ -3170,6 +3177,7 @@ CHARSET_INFO compiled_charsets[] = { sort_order_estonia, NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ + "","", 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ my_strnncollsp_simple,/* strnncollsp */ @@ -3221,6 +3229,7 @@ CHARSET_INFO compiled_charsets[] = { sort_order_german1, tab_8859_1_uni, /* tab_to_uni */ idx_uni_8859_1, /* tab_from_uni */ + "","", 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ my_strnncollsp_simple,/* strnncollsp */ @@ -3271,6 +3280,7 @@ CHARSET_INFO compiled_charsets[] = { sort_order_greek, NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ + "","", 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ my_strnncollsp_simple,/* strnncollsp */ @@ -3321,6 +3331,7 @@ CHARSET_INFO compiled_charsets[] = { sort_order_hebrew, NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ + "","", 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ my_strnncollsp_simple,/* strnncollsp */ @@ -3371,6 +3382,7 @@ CHARSET_INFO compiled_charsets[] = { sort_order_hp8, NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ + "","", 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ my_strnncollsp_simple,/* strnncollsp */ @@ -3421,6 +3433,7 @@ CHARSET_INFO compiled_charsets[] = { sort_order_hungarian, tab_8859_2_uni, /* tab_to_uni */ idx_uni_8859_2, /* tab_from_uni */ + "","", 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ my_strnncollsp_simple,/* strnncollsp */ @@ -3471,6 +3484,7 @@ CHARSET_INFO compiled_charsets[] = { sort_order_koi8_ru, tab_koi8_r_uni, /* tab_to_uni */ idx_uni_koi8_r, /* tab_from_uni */ + "","", 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ my_strnncollsp_simple,/* strnncollsp */ @@ -3521,6 +3535,7 @@ CHARSET_INFO compiled_charsets[] = { sort_order_koi8_ukr, tab_koi8_u_uni, /* tab_to_uni */ idx_uni_koi8_u, /* tab_from_uni */ + "","", 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ my_strnncollsp_simple,/* strnncollsp */ @@ -3572,6 +3587,7 @@ CHARSET_INFO compiled_charsets[] = { sort_order_latin2, tab_8859_2_uni, /* tab_to_uni */ idx_uni_8859_2, /* tab_from_uni */ + "","", 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ my_strnncollsp_simple,/* strnncollsp */ @@ -3622,6 +3638,7 @@ CHARSET_INFO compiled_charsets[] = { sort_order_latin5, tab_8859_9_uni, /* tab_to_uni */ idx_uni_8859_9, /* tab_from_uni */ + "","", 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ my_strnncollsp_simple,/* strnncollsp */ @@ -3673,6 +3690,7 @@ CHARSET_INFO compiled_charsets[] = { sort_order_swe7, NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ + "","", 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ my_strnncollsp_simple,/* strnncollsp */ @@ -3724,6 +3742,7 @@ CHARSET_INFO compiled_charsets[] = { sort_order_usa7, tab_us_ascii_uni, /* tab_to_uni */ idx_uni_us_ascii, /* tab_from_uni */ + "","", 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ my_strnncollsp_simple,/* strnncollsp */ @@ -3774,6 +3793,7 @@ CHARSET_INFO compiled_charsets[] = { sort_order_win1250, tab_cp1250_uni, /* tab_to_uni */ idx_uni_cp1250, /* tab_from_uni */ + "","", 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ my_strnncollsp_simple,/* strnncollsp */ @@ -3824,6 +3844,7 @@ CHARSET_INFO compiled_charsets[] = { sort_order_win1251ukr, tab_cp1251_uni, /* tab_to_uni */ idx_uni_cp1251, /* tab_from_uni */ + "","", 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ my_strnncollsp_simple,/* strnncollsp */ @@ -3874,6 +3895,7 @@ CHARSET_INFO compiled_charsets[] = { sort_order_armscii8, tab_armscii_8_uni, /* tab_to_uni */ idx_uni_armscii_8, /* tab_from_uni */ + "","", 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ my_strnncollsp_simple,/* strnncollsp */ @@ -3924,6 +3946,7 @@ CHARSET_INFO compiled_charsets[] = { sort_order_win1251, tab_cp1251_uni, /* tab_to_uni */ idx_uni_cp1251, /* tab_from_uni */ + "","", 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ my_strnncollsp_simple,/* strnncollsp */ @@ -3973,6 +3996,7 @@ CHARSET_INFO compiled_charsets[] = { NULL, NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ + "","", 0, NULL, /* strnncoll */ NULL, /* strnncollsp */ diff --git a/strings/ctype-gb2312.c b/strings/ctype-gb2312.c index 9eca4383176..f346c249677 100644 --- a/strings/ctype-gb2312.c +++ b/strings/ctype-gb2312.c @@ -5702,6 +5702,7 @@ CHARSET_INFO my_charset_gb2312 = sort_order_gb2312, NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ + "","", 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ my_strnncollsp_simple, diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c index c1a65c48aef..9c3a36ffb9b 100644 --- a/strings/ctype-gbk.c +++ b/strings/ctype-gbk.c @@ -9899,6 +9899,7 @@ CHARSET_INFO my_charset_gbk = sort_order_gbk, NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ + "","", 1, /* strxfrm_multiply */ my_strnncoll_gbk, my_strnncollsp_gbk, diff --git a/strings/ctype-latin1.c b/strings/ctype-latin1.c index 36260356816..7e721299692 100644 --- a/strings/ctype-latin1.c +++ b/strings/ctype-latin1.c @@ -188,6 +188,7 @@ CHARSET_INFO my_charset_latin1 = sort_order_latin1, NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ + "","", 2, /* strxfrm_multiply */ my_strnncoll_simple, my_strnncollsp_simple, diff --git a/strings/ctype-latin1_de.c b/strings/ctype-latin1_de.c index 66f47bb7326..e07bc6e9a70 100644 --- a/strings/ctype-latin1_de.c +++ b/strings/ctype-latin1_de.c @@ -359,6 +359,7 @@ CHARSET_INFO my_charset_latin1_de = sort_order_latin1_de, tab_8859_1_uni, /* tab_to_uni */ idx_uni_8859_1, /* tab_from_uni */ + "","", 2, /* strxfrm_multiply */ my_strnncoll_latin1_de, my_strnncollsp_latin1_de, diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c index af87c550727..daeeb1706aa 100644 --- a/strings/ctype-sjis.c +++ b/strings/ctype-sjis.c @@ -4486,6 +4486,7 @@ CHARSET_INFO my_charset_sjis = sort_order_sjis, NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ + "","", 1, /* strxfrm_multiply */ my_strnncoll_sjis, my_strnncollsp_sjis, diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c index fd3a9318c25..345627dbc18 100644 --- a/strings/ctype-tis620.c +++ b/strings/ctype-tis620.c @@ -709,6 +709,7 @@ CHARSET_INFO my_charset_tis620 = sort_order_tis620, NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ + "","", 4, /* strxfrm_multiply */ my_strnncoll_tis620, my_strnncollsp_tis620, diff --git a/strings/ctype-ujis.c b/strings/ctype-ujis.c index 6c238d50dcc..4930c6f95aa 100644 --- a/strings/ctype-ujis.c +++ b/strings/ctype-ujis.c @@ -8443,6 +8443,7 @@ CHARSET_INFO my_charset_ujis = sort_order_ujis, NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ + "","", 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ my_strnncollsp_simple, diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c index ecd163ac4c5..2db00e64c72 100644 --- a/strings/ctype-utf8.c +++ b/strings/ctype-utf8.c @@ -1988,6 +1988,7 @@ CHARSET_INFO my_charset_utf8 = to_upper_utf8, /* sort_order */ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ + "","", 1, /* strxfrm_multiply */ my_strnncoll_utf8, /* strnncoll */ my_strnncollsp_utf8, @@ -3095,6 +3096,7 @@ CHARSET_INFO my_charset_ucs2 = to_upper_ucs2, /* sort_order */ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ + "","", 1, /* strxfrm_multiply */ my_strnncoll_ucs2, /* strnncoll */ my_strnncoll_ucs2, diff --git a/strings/ctype-win1250ch.c b/strings/ctype-win1250ch.c index 978a5e8a55b..49ca0cf996c 100644 --- a/strings/ctype-win1250ch.c +++ b/strings/ctype-win1250ch.c @@ -653,6 +653,7 @@ CHARSET_INFO my_charset_win1250ch = sort_order_win1250ch, tab_cp1250_uni, /* tab_to_uni */ idx_uni_cp1250, /* tab_from_uni */ + "","", 2, /* strxfrm_multiply */ my_strnncoll_win1250ch, my_strnncollsp_win1250ch, |