diff options
author | unknown <konstantin@mysql.com> | 2005-07-16 13:45:32 +0400 |
---|---|---|
committer | unknown <konstantin@mysql.com> | 2005-07-16 13:45:32 +0400 |
commit | 40efb3622d9666ff23edee23678acd0b3e024476 (patch) | |
tree | 088fa24c9ce0b4e14763ddce9d9bb5106fc4a8af /mysql-test | |
parent | 0789b177e50dae46863e3b37837ad684bcc44483 (diff) | |
parent | d5b80a789e05b7dce12dfeef7393a6ac8bf17fb7 (diff) | |
download | mariadb-git-40efb3622d9666ff23edee23678acd0b3e024476.tar.gz |
Merge mysql.com:/opt/local/work/mysql-4.1-root
into mysql.com:/media/sda1/mysql/mysql-5.0-merge
mysql-test/r/select.result:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/r/ps.result:
Manual merge (again).
mysql-test/t/ps.test:
Manual merge (again).
mysql-test/t/select.test:
Manual merge (again).
sql/item_func.cc:
Manual merge (again).
sql/item_func.h:
Manual merge (again).
sql/set_var.h:
Manual merge (again).
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/ps.result | 25 | ||||
-rw-r--r-- | mysql-test/r/select.result | 11 | ||||
-rw-r--r-- | mysql-test/t/ps.test | 17 | ||||
-rw-r--r-- | mysql-test/t/select.test | 11 |
4 files changed, 64 insertions, 0 deletions
diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index 81d85306e93..0050dfc0841 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -775,3 +775,28 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp select ? from t1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? from t1' at line 1 drop table t1; +prepare stmt from "select @@time_zone"; +execute stmt; +@@time_zone +SYSTEM +set @@time_zone:='Japan'; +execute stmt; +@@time_zone +Japan +prepare stmt from "select @@tx_isolation"; +execute stmt; +@@tx_isolation +REPEATABLE-READ +set transaction isolation level read committed; +execute stmt; +@@tx_isolation +READ-COMMITTED +set transaction isolation level serializable; +execute stmt; +@@tx_isolation +SERIALIZABLE +set @@tx_isolation=default; +execute stmt; +@@tx_isolation +REPEATABLE-READ +deallocate prepare stmt; diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index d0503d1b83b..d327b491ebf 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -2746,3 +2746,14 @@ WHERE COUNT(*) 4 drop table t1,t2,t3; +create table t1 (f1 int); +insert into t1 values (1),(NULL); +create table t2 (f2 int, f3 int, f4 int); +create index idx1 on t2 (f4); +insert into t2 values (1,2,3),(2,4,6); +select A.f2 from t1 left join t2 A on A.f2 = f1 where A.f3=(select min(f3) +from t2 C where A.f4 = C.f4) or A.f3 IS NULL; +f2 +1 +NULL +drop table t1,t2; diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test index e8ea1dc373b..de92c67518e 100644 --- a/mysql-test/t/ps.test +++ b/mysql-test/t/ps.test @@ -811,3 +811,20 @@ select ??; select ? from t1; --enable_ps_protocol drop table t1; +# +# Bug#9359 "Prepared statements take snapshot of system vars at PREPARE +# time" +# +prepare stmt from "select @@time_zone"; +execute stmt; +set @@time_zone:='Japan'; +execute stmt; +prepare stmt from "select @@tx_isolation"; +execute stmt; +set transaction isolation level read committed; +execute stmt; +set transaction isolation level serializable; +execute stmt; +set @@tx_isolation=default; +execute stmt; +deallocate prepare stmt; diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test index 712658a19a6..69343524928 100644 --- a/mysql-test/t/select.test +++ b/mysql-test/t/select.test @@ -2330,3 +2330,14 @@ WHERE drop table t1,t2,t3; +# +# Bug #11482 4.1.12 produces different resultset for a complex query +# than in previous 4.1.x +create table t1 (f1 int); +insert into t1 values (1),(NULL); +create table t2 (f2 int, f3 int, f4 int); +create index idx1 on t2 (f4); +insert into t2 values (1,2,3),(2,4,6); +select A.f2 from t1 left join t2 A on A.f2 = f1 where A.f3=(select min(f3) +from t2 C where A.f4 = C.f4) or A.f3 IS NULL; +drop table t1,t2; |