1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

A fix for a bug in fix_fields in case like this:

select .. UNION select some_column;

This is exhibited in sub-selects and derived tables.
This commit is contained in:
Sinisa@sinisa.nasamreza.org
2002-12-17 20:15:15 +02:00
parent e56fb1962f
commit a83ed34f83
3 changed files with 12 additions and 0 deletions

View File

@ -1735,6 +1735,14 @@ find_field_in_tables(THD *thd, Item_ident *item, TABLE_LIST *tables,
bool allow_rowid= tables && !tables->next; // Only one table
for (; tables ; tables=tables->next)
{
if (!tables->table)
{
if (report_error)
my_printf_error(ER_BAD_FIELD_ERROR,ER(ER_BAD_FIELD_ERROR),MYF(0),
item->full_name(),thd->where);
return (Field*) not_found_field;
}
Field *field=find_field_in_table(thd,tables->table,name,length,
grant_option &&
!thd->master_access, allow_rowid);