summaryrefslogtreecommitdiff
path: root/mysql-test/include/ps_query.inc
diff options
context:
space:
mode:
authorunknown <msvensson@neptunus.(none)>2005-03-30 12:14:37 +0200
committerunknown <msvensson@neptunus.(none)>2005-03-30 12:14:37 +0200
commitaf2ab040ccf9b8814052b3253900c7bc5f6ed58b (patch)
tree26b93e9c58fdf59cd458bd87abc33b197e9f1e4c /mysql-test/include/ps_query.inc
parent8287938b79b52a5c6c6a2304414e9a6d41b79e87 (diff)
downloadmariadb-git-af2ab040ccf9b8814052b3253900c7bc5f6ed58b.tar.gz
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
Diffstat (limited to 'mysql-test/include/ps_query.inc')
-rw-r--r--mysql-test/include/ps_query.inc5
1 files changed, 5 insertions, 0 deletions
diff --git a/mysql-test/include/ps_query.inc b/mysql-test/include/ps_query.inc
index e6f19c67138..9a413bff2f3 100644
--- a/mysql-test/include/ps_query.inc
+++ b/mysql-test/include/ps_query.inc
@@ -421,6 +421,11 @@ prepare stmt1 from ' select a, ?, b FROM t1 outer_table where
b=? and a = (select ? from t1 where b = ? ) ' ;
execute stmt1 using @arg00, @arg01, @arg02, @arg03 ;
+# Bug#8807
+prepare stmt1 from 'select c4 FROM t9 where
+ c13 = (select MAX(b) from t1 where a = ?) and c22 = ? ' ;
+execute stmt1 using @arg01, @arg02;
+
######## correlated subquery
# no parameter
prepare stmt1 from ' select a, b FROM t1 outer_table where