diff options
author | unknown <kroki/tomash@moonlight.intranet> | 2006-08-24 15:49:12 +0400 |
---|---|---|
committer | unknown <kroki/tomash@moonlight.intranet> | 2006-08-24 15:49:12 +0400 |
commit | 965a3970c91dc4554a8ccbd3e358b1b2c20a0cfb (patch) | |
tree | 86142de219331a5bba797c60295571a3930405fe /mysql-test/r/ps.result | |
parent | f96ee72fb07961faf1ee950fcb66c2dfa0589694 (diff) | |
download | mariadb-git-965a3970c91dc4554a8ccbd3e358b1b2c20a0cfb.tar.gz |
BUG#21166: Prepared statement causes signal 11 on second execution
Changes in an item tree done by optimizer weren't properly
registered and went unnoticed, which resulted in preliminary freeing
of used memory.
mysql-test/r/ps.result:
Add result for bug#21166: Prepared statement causes signal 11
on second execution.
mysql-test/t/ps.test:
Add test case for bug#21166: Prepared statement causes signal 11
on second execution.
sql/item.cc:
Move Item::transform() and Item_default_value::transform() from
item.h here and use THD::change_item_tree() instead of plain
assignment.
Change Item_field::set_no_const_sub() to be used with Item::walk()
instead of Item::transform().
sql/item.h:
Move definition of Item::transform() and Item_default_value::transform()
to item.cc.
Change Item::set_no_const_sub() to be used with Item::walk()
instead of Item::transform().
sql/item_cmpfunc.cc:
Use Item::walk() to execute Item::set_no_const_sub().
Use THD::change_item_tree() instead of plain assignment.
sql/item_func.cc:
Add assert and comment to Item_func::traverse_cond().
sql/item_row.cc:
Use THD::change_item_tree() instead of plain assignment.
sql/item_strfunc.cc:
Move Item_func_make_set::transform() from item_strfunc.h here and use
THD::change_item_tree() instead of plain assignment.
sql/item_strfunc.h:
Move definition of Item_func_make_set::transform() to item_strfunc.cc.
Diffstat (limited to 'mysql-test/r/ps.result')
-rw-r--r-- | mysql-test/r/ps.result | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index d73dd03fc57..080187cfa7b 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -1297,3 +1297,18 @@ ERROR 3D000: No database selected create temporary table t1 (i int); ERROR 3D000: No database selected use test; +DROP TABLE IF EXISTS t1, t2, t3; +CREATE TABLE t1 (i BIGINT, j BIGINT); +CREATE TABLE t2 (i BIGINT); +CREATE TABLE t3 (i BIGINT, j BIGINT); +PREPARE stmt FROM "SELECT * FROM t1 JOIN t2 ON (t2.i = t1.i) + LEFT JOIN t3 ON ((t3.i, t3.j) = (t1.i, t1.j)) + WHERE t1.i = ?"; +SET @a= 1; +EXECUTE stmt USING @a; +i j i i j +EXECUTE stmt USING @a; +i j i i j +DEALLOCATE PREPARE stmt; +DROP TABLE IF EXISTS t1, t2, t3; +End of 5.0 tests. |