1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00
This commit is contained in:
monty@mysql.com
2004-07-15 04:28:42 +03:00
1779 changed files with 65690 additions and 40946 deletions

View File

@ -43,13 +43,6 @@ pthread_key(LEX*,THR_LEX);
/* Longest standard keyword name */
#define TOCK_NAME_LENGTH 24
/*
Map to default keyword characters. This is used to test if an identifer
is 'simple', in which case we don't have to do any character set conversions
on it
*/
uchar *bin_ident_map= my_charset_bin.ident_map;
/*
The following data is based on the latin1 character set, and is only
used when comparing keywords
@ -557,13 +550,9 @@ int yylex(void *arg, void *yythd)
else
#endif
{
result_state= bin_ident_map[c] ? IDENT : IDENT_QUOTED;
while (ident_map[c=yyGet()])
{
/* If not simple character, mark that we must convert it */
if (!bin_ident_map[c])
result_state= IDENT_QUOTED;
}
for (result_state= c; ident_map[c= yyGet()]; result_state|= c);
/* If there were non-ASCII characters, mark that we must convert */
result_state= result_state & 0x80 ? IDENT_QUOTED : IDENT;
}
length= (uint) (lex->ptr - lex->tok_start)-1;
if (lex->ignore_space)
@ -665,12 +654,11 @@ int yylex(void *arg, void *yythd)
}
else
#endif
while (ident_map[c = yyGet()])
{
/* If not simple character, mark that we must convert it */
if (!bin_ident_map[c])
result_state= IDENT_QUOTED;
}
{
for (result_state=0; ident_map[c= yyGet()]; result_state|= c);
/* If there were non-ASCII characters, mark that we must convert */
result_state= result_state & 0x80 ? IDENT_QUOTED : IDENT;
}
if (c == '.' && ident_map[yyPeek()])
lex->next_state=MY_LEX_IDENT_SEP;// Next is '.'
@ -944,13 +932,11 @@ int yylex(void *arg, void *yythd)
We should now be able to handle:
[(global | local | session) .]variable_name
*/
result_state= IDENT;
while (ident_map[c=yyGet()])
{
/* If not simple character, mark that we must convert it */
if (!bin_ident_map[c])
result_state= IDENT_QUOTED;
}
for (result_state= 0; ident_map[c= yyGet()]; result_state|= c);
/* If there were non-ASCII characters, mark that we must convert */
result_state= result_state & 0x80 ? IDENT_QUOTED : IDENT;
if (c == '.')
lex->next_state=MY_LEX_IDENT_SEP;
length= (uint) (lex->ptr - lex->tok_start)-1;
@ -1018,7 +1004,7 @@ void st_select_lex::init_query()
ref_pointer_array= 0;
select_n_having_items= 0;
prep_where= 0;
explicit_limit= 0;
subquery_in_having= explicit_limit= 0;
first_execution= 1;
first_cond_optimization= 1;
}