diff options
author | aelkin@mysql.com <> | 2006-04-25 20:05:15 +0300 |
---|---|---|
committer | aelkin@mysql.com <> | 2006-04-25 20:05:15 +0300 |
commit | 3363effa526576a995f40cbdb7a404db116ae1e5 (patch) | |
tree | 96bcefe1c6d26a68dfcb4305fbf1b8de217283e4 /mysql-test | |
parent | f1374951c9c7f8ba28239cf87aee3e4216174022 (diff) | |
parent | 051e6ac9942a0438fdb89b7d4c7607ac8ef39581 (diff) | |
download | mariadb-git-3363effa526576a995f40cbdb7a404db116ae1e5.tar.gz |
Merge mysql.com:/home/elkin/MySQL/BARE/5.0
into mysql.com:/home/elkin/MySQL/MERGE/5.1-new
Diffstat (limited to 'mysql-test')
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 2 | ||||
-rw-r--r-- | mysql-test/r/case.result | 8 | ||||
-rw-r--r-- | mysql-test/r/func_compress.result | 7 | ||||
-rw-r--r-- | mysql-test/r/rpl_temporary.result | 14 | ||||
-rw-r--r-- | mysql-test/t/case.test | 11 | ||||
-rw-r--r-- | mysql-test/t/func_compress.test | 9 | ||||
-rw-r--r-- | mysql-test/t/rpl_temporary.test | 30 |
7 files changed, 79 insertions, 2 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index a095b4535fe..c8d50990c14 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -3580,7 +3580,7 @@ sub valgrind_arguments { if ( $opt_valgrind_options ) { - mtr_add_arg($args, split(' ', $opt_valgrind_options)); + mtr_add_arg($args, '%s', $_) for (split(' ', $opt_valgrind_options)); } diff --git a/mysql-test/r/case.result b/mysql-test/r/case.result index d28c3af4e0b..9d2706f64fa 100644 --- a/mysql-test/r/case.result +++ b/mysql-test/r/case.result @@ -175,6 +175,14 @@ SELECT CASE '1' WHEN '2' THEN 'BUG' ELSE 'nobug' END; case+union+test case+union+test nobug +create table t1(a float, b int default 3); +insert into t1 (a) values (2), (11), (8); +select min(a), min(case when 1=1 then a else NULL end), +min(case when 1!=1 then NULL else a end) +from t1 where b=3 group by b; +min(a) min(case when 1=1 then a else NULL end) min(case when 1!=1 then NULL else a end) +2 2 2 +drop table t1; CREATE TABLE t1 (EMPNUM INT); INSERT INTO t1 VALUES (0), (2); CREATE TABLE t2 (EMPNUM DECIMAL (4, 2)); diff --git a/mysql-test/r/func_compress.result b/mysql-test/r/func_compress.result index 9bc8e417e19..8d6fa9927ce 100644 --- a/mysql-test/r/func_compress.result +++ b/mysql-test/r/func_compress.result @@ -72,3 +72,10 @@ set @@max_allowed_packet=1048576*100; select compress(repeat('aaaaaaaaaa', IF(XXX, 10, 10000000))) is null; compress(repeat('aaaaaaaaaa', IF(XXX, 10, 10000000))) is null 0 +create table t1(a blob); +insert into t1 values(NULL), (compress('a')); +select uncompress(a), uncompressed_length(a) from t1; +uncompress(a) uncompressed_length(a) +NULL NULL +a 1 +drop table t1; diff --git a/mysql-test/r/rpl_temporary.result b/mysql-test/r/rpl_temporary.result index bc5cc262079..929dc33c447 100644 --- a/mysql-test/r/rpl_temporary.result +++ b/mysql-test/r/rpl_temporary.result @@ -88,3 +88,17 @@ f 1 drop temporary table t4; drop table t5; +set @session.pseudo_thread_id=100; +create temporary table t101 (id int); +create temporary table t102 (id int); +set @session.pseudo_thread_id=200; +create temporary table t201 (id int); +create temporary table `#not_user_table_prefixed_with_hash_sign_no_harm` (id int); +set @con1_id=connection_id(); +kill @con1_id; +create table t1(f int); +insert into t1 values (1); +select * from t1 /* must be 1 */; +f +1 +drop table t1; diff --git a/mysql-test/t/case.test b/mysql-test/t/case.test index 42536ce8a3b..1bdfc5cc10f 100644 --- a/mysql-test/t/case.test +++ b/mysql-test/t/case.test @@ -122,6 +122,17 @@ SELECT 'case+union+test' UNION SELECT CASE '1' WHEN '2' THEN 'BUG' ELSE 'nobug' END; +# +# Bug #17896: problem with MIN(CASE...) +# + +create table t1(a float, b int default 3); +insert into t1 (a) values (2), (11), (8); +select min(a), min(case when 1=1 then a else NULL end), + min(case when 1!=1 then NULL else a end) +from t1 where b=3 group by b; +drop table t1; + # End of 4.1 tests diff --git a/mysql-test/t/func_compress.test b/mysql-test/t/func_compress.test index a78017ddb2f..4ae749f2343 100644 --- a/mysql-test/t/func_compress.test +++ b/mysql-test/t/func_compress.test @@ -47,4 +47,13 @@ set @@max_allowed_packet=1048576*100; --replace_result "''" XXX "'1'" XXX eval select compress(repeat('aaaaaaaaaa', IF('$LOW_MEMORY', 10, 10000000))) is null; +# +# Bug #18643: problem with null values +# + +create table t1(a blob); +insert into t1 values(NULL), (compress('a')); +select uncompress(a), uncompressed_length(a) from t1; +drop table t1; + # End of 4.1 tests diff --git a/mysql-test/t/rpl_temporary.test b/mysql-test/t/rpl_temporary.test index 7269b54556b..612ab54dff1 100644 --- a/mysql-test/t/rpl_temporary.test +++ b/mysql-test/t/rpl_temporary.test @@ -131,6 +131,8 @@ drop table t1,t2; create temporary table t3 (f int); sync_with_master; +# The server will now close done + # # Bug#17284 erroneous temp table cleanup on slave # @@ -156,5 +158,31 @@ connection master; drop temporary table t4; drop table t5; -# The server will now close done +# +# BUG#17263 incorrect generation DROP temp tables +# Temporary tables of connection are dropped in batches +# where a batch correspond to pseudo_thread_id +# value was set up at the moment of temp table creation +# +connection con1; +set @session.pseudo_thread_id=100; +create temporary table t101 (id int); +create temporary table t102 (id int); +set @session.pseudo_thread_id=200; +create temporary table t201 (id int); +create temporary table `#not_user_table_prefixed_with_hash_sign_no_harm` (id int); +set @con1_id=connection_id(); +kill @con1_id; + +#now do something to show that slave is ok after DROP temp tables +connection master; +create table t1(f int); +insert into t1 values (1); + +sync_slave_with_master; +#connection slave; +select * from t1 /* must be 1 */; + +connection master; +drop table t1; # End of 5.1 tests |