1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge mysql.com:/home/my/mysql-5.0

into  mysql.com:/home/my/mysql-5.1
Merge of 'remove compiler warnings when using -Wshadow'
This commit is contained in:
monty@narttu.mysql.fi
2007-01-27 03:46:45 +02:00
215 changed files with 3302 additions and 3092 deletions

View File

@ -317,13 +317,15 @@ static char *get_text(LEX *lex)
{
c = yyGet();
#ifdef USE_MB
int l;
if (use_mb(cs) &&
(l = my_ismbchar(cs,
(const char *)lex->ptr-1,
(const char *)lex->end_of_query))) {
{
int l;
if (use_mb(cs) &&
(l = my_ismbchar(cs,
(const char *)lex->ptr-1,
(const char *)lex->end_of_query))) {
lex->ptr += l-1;
continue;
}
}
#endif
if (c == '\\' &&
@ -791,8 +793,8 @@ int MYSQLlex(void *arg, void *yythd)
lex->tok_start=lex->ptr; // Skip first `
while ((c=yyGet()))
{
int length;
if ((length= my_mbcharlen(cs, c)) == 1)
int var_length;
if ((var_length= my_mbcharlen(cs, c)) == 1)
{
if (c == quote_char)
{
@ -804,9 +806,9 @@ int MYSQLlex(void *arg, void *yythd)
}
}
#ifdef USE_MB
else if (length < 1)
else if (var_length < 1)
break; // Error
lex->ptr+= length-1;
lex->ptr+= var_length-1;
#endif
}
if (double_quotes)
@ -1745,13 +1747,14 @@ bool st_lex::can_be_merged()
bool selects_allow_merge= select_lex.next_select() == 0;
if (selects_allow_merge)
{
for (SELECT_LEX_UNIT *unit= select_lex.first_inner_unit();
unit;
unit= unit->next_unit())
for (SELECT_LEX_UNIT *tmp_unit= select_lex.first_inner_unit();
tmp_unit;
tmp_unit= tmp_unit->next_unit())
{
if (unit->first_select()->parent_lex == this &&
(unit->item == 0 ||
(unit->item->place() != IN_WHERE && unit->item->place() != IN_ON)))
if (tmp_unit->first_select()->parent_lex == this &&
(tmp_unit->item == 0 ||
(tmp_unit->item->place() != IN_WHERE &&
tmp_unit->item->place() != IN_ON)))
{
selects_allow_merge= 0;
break;
@ -2049,12 +2052,12 @@ void st_lex::first_lists_tables_same()
FALSE - success
*/
bool st_lex::add_time_zone_tables_to_query_tables(THD *thd)
bool st_lex::add_time_zone_tables_to_query_tables(THD *thd_arg)
{
/* We should not add these tables twice */
if (!time_zone_tables_used)
{
time_zone_tables_used= my_tz_get_table_list(thd, &query_tables_last);
time_zone_tables_used= my_tz_get_table_list(thd_arg, &query_tables_last);
if (time_zone_tables_used == &fake_time_zone_tables_list)
return TRUE;
}