diff options
author | konstantin@mysql.com <> | 2004-10-22 15:59:58 +0400 |
---|---|---|
committer | konstantin@mysql.com <> | 2004-10-22 15:59:58 +0400 |
commit | 33c97a499b7eb1cddd94fe490267b92248cdea98 (patch) | |
tree | 2bcaef6e540885162b62299bf616ab82e1dcbf88 /mysql-test/t | |
parent | c21b47540f7cee82d71807d2d41cde7b7a51be46 (diff) | |
parent | a7c52d755bab03d134637947d29d5c1b0531660e (diff) | |
download | mariadb-git-33c97a499b7eb1cddd94fe490267b92248cdea98.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/media/sda1/mysql/mysql-4.1-6050
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/ps.test | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test index 7cbcd50245f..04ab8aa62a8 100644 --- a/mysql-test/t/ps.test +++ b/mysql-test/t/ps.test @@ -390,3 +390,28 @@ set @var=3; execute stmt using @var; drop table t1; deallocate prepare stmt; + +# +# A test case for Bug#6050 "EXECUTE stmt reports ambiguous fieldnames with +# identical tables from different schemata" +# Check that field name resolving in prepared statements works OK. +# +create database mysqltest1; +create table t1 (a int); +create table mysqltest1.t1 (a int); +select * from t1, mysqltest1.t1; +prepare stmt from "select * from t1, mysqltest1.t1"; +execute stmt; +execute stmt; +execute stmt; +drop table t1; +drop table mysqltest1.t1; +drop database mysqltest1; +deallocate prepare stmt; +select '1.1' as a, '1.2' as a UNION SELECT '2.1', '2.2'; +prepare stmt from +"select '1.1' as a, '1.2' as a UNION SELECT '2.1', '2.2'"; +execute stmt; +execute stmt; +execute stmt; +deallocate prepare stmt; |