summaryrefslogtreecommitdiff
path: root/mysql-test/t/subselect.test
diff options
context:
space:
mode:
authorGuilhem Bichot <guilhem@mysql.com>2009-02-12 15:08:56 +0100
committerGuilhem Bichot <guilhem@mysql.com>2009-02-12 15:08:56 +0100
commit704b4845aa9ce51a6c5a9f5f42265e376db0dfb3 (patch)
tree73476f970c229f75846855edeeddfbc6fd87ed4b /mysql-test/t/subselect.test
parent2637dda66845868fe996e60e54996acf03f6c537 (diff)
parenta5e5b0180a6b86cce258eef232ef59d6e7c40bb0 (diff)
downloadmariadb-git-704b4845aa9ce51a6c5a9f5f42265e376db0dfb3.tar.gz
merge of 5.1-main into 5.1-maria. Myisam->Maria change propagation will follow.
There were so many changes into mtr (this is the new mtr coming) that I rather copied mtr from 6.0-main here (at least this one knows how to run Maria tests). I also fixed suite/maria tests to be accepted by the new mtr. mysys/thr_mutex.c: adding DBUG_PRINT here, so that we can locate where the warning is issued.
Diffstat (limited to 'mysql-test/t/subselect.test')
-rw-r--r--mysql-test/t/subselect.test46
1 files changed, 41 insertions, 5 deletions
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test
index 1960af371e1..57cae8af815 100644
--- a/mysql-test/t/subselect.test
+++ b/mysql-test/t/subselect.test
@@ -1041,13 +1041,14 @@ DROP TABLE t1;
create table t1 (a int, b decimal(13, 3));
insert into t1 values (1, 0.123);
-let $outfile = $MYSQLTEST_VARDIR/master-data/test/subselect.out.file.1;
+let $outfile_abs= $MYSQLTEST_VARDIR/tmp/subselect.out.file.1;
+let $outfile_rel= ../../tmp/subselect.out.file.1;
--error 0,1
---remove_file $outfile
-select a, (select max(b) from t1) into outfile "subselect.out.file.1" from t1;
+--remove_file $outfile_abs
+eval select a, (select max(b) from t1) into outfile "$outfile_rel" from t1;
delete from t1;
-load data infile "subselect.out.file.1" into table t1;
---remove_file $outfile
+eval load data infile "$outfile_rel" into table t1;
+--remove_file $outfile_abs
select * from t1;
drop table t1;
@@ -3395,4 +3396,39 @@ DELETE FROM v3;
DROP VIEW v1,v2,v3;
DROP TABLE t1,t2;
+--echo #
+--echo # BUG#37822: Correlated subquery with IN and IS UNKNOWN provides wrong result
+--echo #
+create table t1(id integer primary key, g integer, v integer, s char(1));
+create table t2(id integer primary key, g integer, v integer, s char(1));
+insert into t1 values
+ (10, 10, 10, 'l'),
+ (20, 20, 20, 'l'),
+ (40, 40, 40, 'l'),
+ (41, 40, null, 'l'),
+ (50, 50, 50, 'l'),
+ (51, 50, null, 'l'),
+ (60, 60, 60, 'l'),
+ (61, 60, null, 'l'),
+ (70, 70, 70, 'l'),
+ (90, 90, null, 'l');
+insert into t2 values
+ (10, 10, 10, 'r'),
+ (30, 30, 30, 'r'),
+ (50, 50, 50, 'r'),
+ (60, 60, 60, 'r'),
+ (61, 60, null, 'r'),
+ (70, 70, 70, 'r'),
+ (71, 70, null, 'r'),
+ (80, 80, 80, 'r'),
+ (81, 80, null, 'r'),
+ (100,100,null, 'r');
+
+select *
+from t1
+where v in(select v
+ from t2
+ where t1.g=t2.g) is unknown;
+drop table t1, t2;
+
--echo End of 5.1 tests.