diff options
author | Sinisa@sinisa.nasamreza.org <> | 2003-06-12 16:52:36 +0300 |
---|---|---|
committer | Sinisa@sinisa.nasamreza.org <> | 2003-06-12 16:52:36 +0300 |
commit | 862506b6af24f6d96b4ec87950d1f14792a5aed5 (patch) | |
tree | c4add756e3fc9920bd44b6c481e233ad82d452ac /sql/sql_base.cc | |
parent | 19a17f602fc42f596271bd80a586c530ee3722d5 (diff) | |
download | mariadb-git-862506b6af24f6d96b4ec87950d1f14792a5aed5.tar.gz |
Derived tables bug fix .......
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 4 |
1 files changed, 3 insertions, 1 deletions
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; |