From 77f134900898a3e6a947a1a64a7332ba1e465b8c Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 17 May 2004 12:47:16 +0500 Subject: A fix (bug #3756: ISNULL(QUOTE()) returns 1 for every row after 1st NULL) --- mysql-test/r/func_str.result | 9 +++++++++ mysql-test/t/func_str.test | 9 +++++++++ 2 files changed, 18 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index dd20ffa2dbb..12c1cf78f7c 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -273,3 +273,12 @@ i ELT(j, '345', '34') 1 345 2 34 DROP TABLE t1; +create table t1(a char(4)); +insert into t1 values ('one'),(NULL),('two'),('four'); +select a, quote(a), isnull(quote(a)), quote(a) is null, ifnull(quote(a), 'n') from t1; +a quote(a) isnull(quote(a)) quote(a) is null ifnull(quote(a), 'n') +one 'one' 0 0 'one' +NULL NULL 1 1 n +two 'two' 0 0 'two' +four 'four' 0 0 'four' +drop table t1; diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test index d6255e4d93c..1d33e459372 100644 --- a/mysql-test/t/func_str.test +++ b/mysql-test/t/func_str.test @@ -163,3 +163,12 @@ CREATE TABLE t1 (i int, j int); INSERT INTO t1 VALUES (1,1),(2,2); SELECT DISTINCT i, ELT(j, '345', '34') FROM t1; DROP TABLE t1; + +# +# bug #3756: quote and NULL +# + +create table t1(a char(4)); +insert into t1 values ('one'),(NULL),('two'),('four'); +select a, quote(a), isnull(quote(a)), quote(a) is null, ifnull(quote(a), 'n') from t1; +drop table t1; \ No newline at end of file -- cgit v1.2.1 From e881a38738d7558fa66ed1a6a2c1157cad46885e Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 17 May 2004 13:40:02 +0500 Subject: added newline at the end of the file. --- mysql-test/t/func_str.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test index 1d33e459372..9b0c076f23e 100644 --- a/mysql-test/t/func_str.test +++ b/mysql-test/t/func_str.test @@ -171,4 +171,4 @@ DROP TABLE t1; create table t1(a char(4)); insert into t1 values ('one'),(NULL),('two'),('four'); select a, quote(a), isnull(quote(a)), quote(a) is null, ifnull(quote(a), 'n') from t1; -drop table t1; \ No newline at end of file +drop table t1; -- cgit v1.2.1 From da04e3fe6d96e1d079b18cd52e747f7539ec2347 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 18 May 2004 22:59:43 +0400 Subject: Fix and test case for BUG#3649. mysql-test/r/handler.result: Test case for BUG#3649 mysql-test/t/handler.test: Test case for BUG#3649 sql/sql_handler.cc: Fix for BUG#3649: when doing an index scan for an equality condition, use index_next_same to retrieve subsequent rows. --- mysql-test/r/handler.result | 12 ++++++++++++ mysql-test/t/handler.test | 12 ++++++++++++ 2 files changed, 24 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/handler.result b/mysql-test/r/handler.result index 1cfc3a9de8b..50d51cf14f4 100644 --- a/mysql-test/r/handler.result +++ b/mysql-test/r/handler.result @@ -191,3 +191,15 @@ Ok handler t close; use test; drop table t1; +create table t1 ( a int, b int, INDEX a (a) ); +insert into t1 values (1,2), (2,1); +handler t1 open; +handler t1 read a=(1) where b=2; +a b +1 2 +handler t1 read a=(1) where b=3; +a b +handler t1 read a=(1) where b=1; +a b +handler t1 close; +drop table t1; diff --git a/mysql-test/t/handler.test b/mysql-test/t/handler.test index 936902fd9bf..1f7f32c930a 100644 --- a/mysql-test/t/handler.test +++ b/mysql-test/t/handler.test @@ -123,3 +123,15 @@ handler t close; use test; drop table t1; +# +# BUG#3649 +# +create table t1 ( a int, b int, INDEX a (a) ); +insert into t1 values (1,2), (2,1); +handler t1 open; +handler t1 read a=(1) where b=2; +handler t1 read a=(1) where b=3; +handler t1 read a=(1) where b=1; +handler t1 close; +drop table t1; + -- cgit v1.2.1 From b7a0883cd74eaf989f032c6d84ae783a4ac0fb10 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 19 May 2004 16:42:29 +0400 Subject: Fix for Bug#3754 "SET GLOBAL myisam_max_sort_file_size doesn't work as expected": precision-losing conversion removed from sys_var_thd_ulonglong. mysql-test/r/variables.result: Test case for Bug#3754 mysql-test/t/variables.test: Test case for Bug#3754 sql/set_var.cc: Fix for Bug#3754: precision-losing conversion removed from sys_var_thd_ulonglong. --- mysql-test/r/variables.result | 4 ++++ mysql-test/t/variables.test | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index b4a607cb174..f84364089bc 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -377,3 +377,7 @@ select 1; 1 select @@session.key_buffer_size; Variable 'key_buffer_size' is a GLOBAL variable +set global myisam_max_sort_file_size=4294967296; +show global variables like 'myisam_max_sort_file_size'; +Variable_name Value +myisam_max_sort_file_size 4294967296 diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index ec86a763023..e59667d6af4 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -268,4 +268,10 @@ select @@xxxxxxxxxx; select 1; --error 1238 -select @@session.key_buffer_size; \ No newline at end of file +select @@session.key_buffer_size; + +# Bug#3754 SET GLOBAL myisam_max_sort_file_size doesn't work as +# expected: check that there is no overflow when 64-bit unsigned +# variables are set +set global myisam_max_sort_file_size=4294967296; +show global variables like 'myisam_max_sort_file_size'; -- cgit v1.2.1