From 4ac20ad4a925fe9efa4f0937ddeb026cf112857f Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 12 Jun 2003 16:52:36 +0300 Subject: Derived tables bug fix ....... sql/ha_myisam.cc: DISABLE KEYS warnings sql/sql_table.cc: DISABLE KEYS warnings --- sql/sql_base.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sql/sql_base.cc') diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 1ef4e9df020..6ee423d4ed7 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -789,6 +789,7 @@ TABLE *open_table(THD *thd,const char *db,const char *table_name, DBUG_RETURN(0); } table->query_id=thd->query_id; + table->clear_query_id=1; thd->tmp_table_used= 1; goto reset; } @@ -2050,8 +2051,9 @@ bool setup_tables(TABLE_LIST *tables) table->keys_in_use_for_query &= ~map; } table->used_keys &= table->keys_in_use_for_query; - if (table_list->shared) + if (table_list->shared || table->clear_query_id) { + table->clear_query_id= 0; /* Clear query_id that may have been set by previous select */ for (Field **ptr=table->field ; *ptr ; ptr++) (*ptr)->query_id=0; -- cgit v1.2.1