diff options
author | unknown <monty@hundin.mysql.fi> | 2001-09-17 22:44:51 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-09-17 22:44:51 +0300 |
commit | 05821367d403ff69e6af3c83ceb45756376f9b94 (patch) | |
tree | 84e69c2b39154e624f807c4628e21f3d0fdb1da3 /sql/sql_base.cc | |
parent | 28097f40d3d13a1d42ef7a98b2ebc3330fd41a83 (diff) | |
download | mariadb-git-05821367d403ff69e6af3c83ceb45756376f9b94.tar.gz |
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
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 83be3c1ade1..41093452984 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -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) { |