1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fixed bug in UNION when doing UNION with the same tables

myisam/mi_extra.c:
  More debugging information
mysql-test/r/union.result:
  Added test for UNION bug
mysql-test/t/union.test:
  Added test for UNION bug
sql/sql_base.cc:
  Clear field->query_id when using UNION
sql/sql_parse.cc:
  Fix for UNION bug
sql/sql_union.cc:
  Cleanup
sql/table.h:
  Fix for UNION bug
tools/Makefile.am:
  Fix for compiling with MIT-threads
This commit is contained in:
unknown
2001-09-17 22:44:51 +03:00
parent 28097f40d3
commit 05821367d4
8 changed files with 23 additions and 8 deletions

View File

@ -1590,7 +1590,8 @@ Field *find_field_in_table(THD *thd,TABLE *table,const char *name,uint length,
else
thd->dupp_field=field;
}
if (check_grants && !thd->master_access && check_grant_column(thd,table,name,length))
if (check_grants && !thd->master_access &&
check_grant_column(thd,table,name,length))
return WRONG_GRANT;
return field;
}
@ -1808,6 +1809,12 @@ bool setup_tables(TABLE_LIST *tables)
DBUG_RETURN(1);
table->keys_in_use_for_query &= ~map;
}
if (table_list->shared)
{
/* Clear query_id that may have been set by previous select */
for (Field **ptr=table->field ; *ptr ; ptr++)
(*ptr)->query_id=0;
}
}
if (tablenr > MAX_TABLES)
{