diff options
author | unknown <evgen@moonbone.local> | 2006-11-29 15:03:53 +0300 |
---|---|---|
committer | unknown <evgen@moonbone.local> | 2006-11-29 15:03:53 +0300 |
commit | 004aadd6f716e2bdd055a2518b50bd8d13e961e8 (patch) | |
tree | 8a4b4dbca4f569565f89a30bab47a7700d15da81 /mysql-test/t/ps.test | |
parent | a116f93dd32cdd0bc29e66f93ad71fc12727e3d3 (diff) | |
parent | fe499575af62bebdc42f804645da089f8e268bc4 (diff) | |
download | mariadb-git-004aadd6f716e2bdd055a2518b50bd8d13e961e8.tar.gz |
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into moonbone.local:/work/20327-bug-5.0-opt-mysql
sql/sql_base.cc:
Auto merged
mysql-test/r/ps.result:
Manual merge
mysql-test/t/ps.test:
Manual merge
Diffstat (limited to 'mysql-test/t/ps.test')
-rw-r--r-- | mysql-test/t/ps.test | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test index 8d01277b515..0cb71265d07 100644 --- a/mysql-test/t/ps.test +++ b/mysql-test/t/ps.test @@ -1514,6 +1514,29 @@ DROP TABLE t1, t2; # +# BUG#20327: Marking of a wrong field leads to a wrong result on select with +# view, prepared statement and subquery. +# +CREATE TABLE t1 (i INT); +CREATE VIEW v1 AS SELECT * FROM t1; + +INSERT INTO t1 VALUES (1), (2); + +let $query = SELECT t1.i FROM t1 JOIN v1 ON t1.i = v1.i + WHERE EXISTS (SELECT * FROM t1 WHERE v1.i = 1); +eval $query; +eval PREPARE stmt FROM "$query"; +# Statement execution should return '1'. +EXECUTE stmt; +# Check re-execution. +EXECUTE stmt; + +DEALLOCATE PREPARE stmt; +DROP VIEW v1; +DROP TABLE t1; + + +# # BUG#21856: Prepared Statments: crash if bad create # --disable_warnings |