From af2ab040ccf9b8814052b3253900c7bc5f6ed58b Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 30 Mar 2005 12:14:37 +0200 Subject: BUG#8807 Select crash server - Add function Item_param::fix_fields which will update any subselect they are part of and indicate that the subsleect is not const during prepare phase, and thus should not be executed during prepare. mysql-test/include/ps_query.inc: Adde new test case mysql-test/r/ps_2myisam.result: Update test result mysql-test/r/ps_3innodb.result: Update test result mysql-test/r/ps_4heap.result: Update test result mysql-test/r/ps_5merge.result: Update test result mysql-test/r/ps_6bdb.result: Update test result mysql-test/r/ps_7ndb.result: Update test result sql/item.cc: Add function Item_param::fix_fields, which will mark any subselects they are part of as not being a constant expression unless the param value is specified, ie. it will be not be constant during prepare phase. sql/item.h: Adde Item_param::fix_fields sql/item_subselect.h: Make Item_param::fix_field friend of Item_subselect --- mysql-test/r/ps_7ndb.result | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mysql-test/r/ps_7ndb.result') diff --git a/mysql-test/r/ps_7ndb.result b/mysql-test/r/ps_7ndb.result index 43ff9607c55..9b988a46f1a 100644 --- a/mysql-test/r/ps_7ndb.result +++ b/mysql-test/r/ps_7ndb.result @@ -768,6 +768,10 @@ prepare stmt1 from ' select a, ?, b FROM t1 outer_table where execute stmt1 using @arg00, @arg01, @arg02, @arg03 ; a ? b 2 1 two +prepare stmt1 from 'select c4 FROM t9 where + c13 = (select MAX(b) from t1 where a = ?) and c22 = ? ' ; +execute stmt1 using @arg01, @arg02; +c4 prepare stmt1 from ' select a, b FROM t1 outer_table where a = (select a from t1 where b = outer_table.b ) order by a '; execute stmt1 ; -- cgit v1.2.1