diff options
author | unknown <bell@sanja.is.com.ua> | 2003-05-28 16:52:56 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2003-05-28 16:52:56 +0300 |
commit | a100c0e951cd4e2db8efbc385883e408fa164ee9 (patch) | |
tree | bdd4144655cde94721e38ddd9dd17c703d52e14c /sql/item_subselect.h | |
parent | 15b3f3a0d8c11babff0f2e4dfa81c1716bcf533d (diff) | |
download | mariadb-git-a100c0e951cd4e2db8efbc385883e408fa164ee9.tar.gz |
added mem_root switching for subselect if it is necessary
(bug #518 fixed)
mysql-test/r/subselect.result:
test of bug #518
mysql-test/t/subselect.test:
test of bug #518
sql/item_subselect.cc:
test and switch mem_root if it is necessary
exec() - wrapper around engine->exec() to test and switch mem_root if necessary
sql/item_subselect.h:
added storing THD for mem_root testinmg & switching
exec() - wrapper around engine->exec() to test and switch mem_root if necessary
Diffstat (limited to 'sql/item_subselect.h')
-rw-r--r-- | sql/item_subselect.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/item_subselect.h b/sql/item_subselect.h index fc4dad5a6b3..3ed3f2af0e9 100644 --- a/sql/item_subselect.h +++ b/sql/item_subselect.h @@ -36,6 +36,8 @@ class Item_subselect :public Item_result_field my_bool engine_owner; /* Is this item owner of engine */ my_bool value_assigned; /* value already assigned to subselect */ protected: + /* thread handler, will be assigned in fix_fields only */ + THD *thd; /* substitution instead of subselect in case of optimization */ Item *substitution; /* engine that perform execution of subselect (single select or union) */ @@ -81,6 +83,7 @@ public: return null_value; } bool fix_fields(THD *thd, TABLE_LIST *tables, Item **ref); + bool exec(); virtual void fix_length_and_dec(); table_map used_tables() const; |