diff options
author | dlenev@mysql.com <> | 2005-08-10 00:23:56 +0400 |
---|---|---|
committer | dlenev@mysql.com <> | 2005-08-10 00:23:56 +0400 |
commit | 60511c3df207f30a5ee66be199932dc0973d0323 (patch) | |
tree | 3f10f6888ecf2531022cc520ee953ad5fb8b0ee1 /sql/item_subselect.h | |
parent | 26e4741dc3320c7d7a397d7f1a22754a3160cd45 (diff) | |
download | mariadb-git-60511c3df207f30a5ee66be199932dc0973d0323.tar.gz |
Clumsy but working fix for bug #11973 "SELECT .. INTO var_name; in trigger
cause crash on update".
Let us update "thd" pointer in LEX, all its units and in LEX::result before
executing statement in trigger body, since triggers are associated with TABLE
object and because of this can be used in different threads.
Diffstat (limited to 'sql/item_subselect.h')
-rw-r--r-- | sql/item_subselect.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/item_subselect.h b/sql/item_subselect.h index 0b5736169fa..46623f76170 100644 --- a/sql/item_subselect.h +++ b/sql/item_subselect.h @@ -299,8 +299,11 @@ public: virtual ~subselect_engine() {}; // to satisfy compiler virtual void cleanup()= 0; - // set_thd should be called before prepare() - void set_thd(THD *thd_arg) { thd= thd_arg; } + /* + Also sets "thd" for subselect_engine::result. + Should be called before prepare(). + */ + void set_thd(THD *thd_arg); THD * get_thd() { return thd; } virtual int prepare()= 0; virtual void fix_length_and_dec(Item_cache** row)= 0; |