diff options
author | msvensson@neptunus.(none) <> | 2005-03-30 12:14:37 +0200 |
---|---|---|
committer | msvensson@neptunus.(none) <> | 2005-03-30 12:14:37 +0200 |
commit | 382a8c00486b258d31ea58d27ade86780e750241 (patch) | |
tree | 26b93e9c58fdf59cd458bd87abc33b197e9f1e4c /mysql-test | |
parent | c4a698ea3e1eb1955844489a3bde126cd512fbda (diff) | |
download | mariadb-git-382a8c00486b258d31ea58d27ade86780e750241.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.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/include/ps_query.inc | 5 | ||||
-rw-r--r-- | mysql-test/r/ps_2myisam.result | 4 | ||||
-rw-r--r-- | mysql-test/r/ps_3innodb.result | 4 | ||||
-rw-r--r-- | mysql-test/r/ps_4heap.result | 4 | ||||
-rw-r--r-- | mysql-test/r/ps_5merge.result | 8 | ||||
-rw-r--r-- | mysql-test/r/ps_6bdb.result | 4 | ||||
-rw-r--r-- | mysql-test/r/ps_7ndb.result | 4 |
7 files changed, 33 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 diff --git a/mysql-test/r/ps_2myisam.result b/mysql-test/r/ps_2myisam.result index a27b8b996cd..a983ecd187d 100644 --- a/mysql-test/r/ps_2myisam.result +++ b/mysql-test/r/ps_2myisam.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 ; diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result index eb17d25e80c..61ec956035d 100644 --- a/mysql-test/r/ps_3innodb.result +++ b/mysql-test/r/ps_3innodb.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 ; diff --git a/mysql-test/r/ps_4heap.result b/mysql-test/r/ps_4heap.result index b53ad7e2409..7f3bd0547ef 100644 --- a/mysql-test/r/ps_4heap.result +++ b/mysql-test/r/ps_4heap.result @@ -769,6 +769,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 ; diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result index 13227eb533b..4682c70661c 100644 --- a/mysql-test/r/ps_5merge.result +++ b/mysql-test/r/ps_5merge.result @@ -811,6 +811,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 ; @@ -3821,6 +3825,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 ; diff --git a/mysql-test/r/ps_6bdb.result b/mysql-test/r/ps_6bdb.result index 8630ba2db9b..01beb7924a0 100644 --- a/mysql-test/r/ps_6bdb.result +++ b/mysql-test/r/ps_6bdb.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 ; 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 ; |