Loading mysql-test/r/limit.result +3 −0 Original line number Diff line number Diff line Loading @@ -111,3 +111,6 @@ set @a=-14632475938453979136; execute s using @a, @a; ERROR HY000: Incorrect arguments to EXECUTE End of 5.0 tests select 1 as a limit 4294967296,10; a End of 5.1 tests mysql-test/r/order_by.result +16 −0 Original line number Diff line number Diff line Loading @@ -1076,3 +1076,19 @@ set session max_sort_length= 2180; select * from t1 order by b; ERROR HY001: Out of sort memory; increase server sort buffer size drop table t1; # # Bug #39844: Query Crash Mysql Server 5.0.67 # CREATE TABLE t1 (a INT PRIMARY KEY); CREATE TABLE t2 (a INT PRIMARY KEY, b INT); CREATE TABLE t3 (c INT); INSERT INTO t1 (a) VALUES (1), (2); INSERT INTO t2 (a,b) VALUES (1,2), (2,3); INSERT INTO t3 (c) VALUES (1), (2); SELECT (SELECT t1.a FROM t1, t2 WHERE t1.a = t2.b AND t2.a = t3.c ORDER BY t1.a) FROM t3; (SELECT t1.a FROM t1, t2 WHERE t1.a = t2.b AND t2.a = t3.c ORDER BY t1.a) 2 NULL DROP TABLE t1, t2, t3; mysql-test/r/status2.result 0 → 100644 +64 −0 Original line number Diff line number Diff line # # Bug#24289 Status Variable "Questions" gets wrong values with Stored Routines # FLUSH STATUS; DROP TABLE IF EXISTS t1,t2; DROP PROCEDURE IF EXISTS p1; DROP FUNCTION IF EXISTS f1; CREATE FUNCTION f1() RETURNS INTEGER BEGIN DECLARE foo INTEGER; DECLARE bar INTEGER; SET foo=1; SET bar=2; RETURN foo; END $$ CREATE PROCEDURE p1() BEGIN SELECT 1; END $$ CREATE TABLE t1 (c1 INT); CREATE TABLE t2 (c1 INT); INSERT INTO t1 VALUES (1); Assert Questions == 9 SHOW STATUS LIKE 'Questions'; Variable_name Value Questions 9 SELECT f1(); f1() 1 Assert Questions == 11 SHOW STATUS LIKE 'Questions'; Variable_name Value Questions 11 CALL p1(); 1 1 Assert Questions == 13 SHOW STATUS LIKE 'Questions'; Variable_name Value Questions 13 SELECT 1; 1 1 Assert Questions == 15 SHOW STATUS LIKE 'Questions'; Variable_name Value Questions 15 FLUSH STATUS; SELECT 1; 1 1 Assert Questions == 16 SHOW STATUS LIKE 'Questions'; Variable_name Value Questions 16 Global status updated; Assert diff == 5 FLUSH STATUS; SELECT 5; 5 5 DROP TABLE t1,t2; DROP PROCEDURE p1; DROP FUNCTION f1; End of 6.0 tests mysql-test/r/windows.result +1 −0 Original line number Diff line number Diff line Loading @@ -18,4 +18,5 @@ EXPLAIN SELECT * FROM t1 WHERE b = (SELECT max(2)); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used DROP TABLE t1; End of 5.0 tests. mysql-test/t/limit.test +8 −0 Original line number Diff line number Diff line Loading @@ -95,3 +95,11 @@ set @a=-14632475938453979136; execute s using @a, @a; --echo End of 5.0 tests # # Bug#37075: offset of limit clause might be truncated to 0 on 32-bits server w/o big tables # select 1 as a limit 4294967296,10; --echo End of 5.1 tests Loading
mysql-test/r/limit.result +3 −0 Original line number Diff line number Diff line Loading @@ -111,3 +111,6 @@ set @a=-14632475938453979136; execute s using @a, @a; ERROR HY000: Incorrect arguments to EXECUTE End of 5.0 tests select 1 as a limit 4294967296,10; a End of 5.1 tests
mysql-test/r/order_by.result +16 −0 Original line number Diff line number Diff line Loading @@ -1076,3 +1076,19 @@ set session max_sort_length= 2180; select * from t1 order by b; ERROR HY001: Out of sort memory; increase server sort buffer size drop table t1; # # Bug #39844: Query Crash Mysql Server 5.0.67 # CREATE TABLE t1 (a INT PRIMARY KEY); CREATE TABLE t2 (a INT PRIMARY KEY, b INT); CREATE TABLE t3 (c INT); INSERT INTO t1 (a) VALUES (1), (2); INSERT INTO t2 (a,b) VALUES (1,2), (2,3); INSERT INTO t3 (c) VALUES (1), (2); SELECT (SELECT t1.a FROM t1, t2 WHERE t1.a = t2.b AND t2.a = t3.c ORDER BY t1.a) FROM t3; (SELECT t1.a FROM t1, t2 WHERE t1.a = t2.b AND t2.a = t3.c ORDER BY t1.a) 2 NULL DROP TABLE t1, t2, t3;
mysql-test/r/status2.result 0 → 100644 +64 −0 Original line number Diff line number Diff line # # Bug#24289 Status Variable "Questions" gets wrong values with Stored Routines # FLUSH STATUS; DROP TABLE IF EXISTS t1,t2; DROP PROCEDURE IF EXISTS p1; DROP FUNCTION IF EXISTS f1; CREATE FUNCTION f1() RETURNS INTEGER BEGIN DECLARE foo INTEGER; DECLARE bar INTEGER; SET foo=1; SET bar=2; RETURN foo; END $$ CREATE PROCEDURE p1() BEGIN SELECT 1; END $$ CREATE TABLE t1 (c1 INT); CREATE TABLE t2 (c1 INT); INSERT INTO t1 VALUES (1); Assert Questions == 9 SHOW STATUS LIKE 'Questions'; Variable_name Value Questions 9 SELECT f1(); f1() 1 Assert Questions == 11 SHOW STATUS LIKE 'Questions'; Variable_name Value Questions 11 CALL p1(); 1 1 Assert Questions == 13 SHOW STATUS LIKE 'Questions'; Variable_name Value Questions 13 SELECT 1; 1 1 Assert Questions == 15 SHOW STATUS LIKE 'Questions'; Variable_name Value Questions 15 FLUSH STATUS; SELECT 1; 1 1 Assert Questions == 16 SHOW STATUS LIKE 'Questions'; Variable_name Value Questions 16 Global status updated; Assert diff == 5 FLUSH STATUS; SELECT 5; 5 5 DROP TABLE t1,t2; DROP PROCEDURE p1; DROP FUNCTION f1; End of 6.0 tests
mysql-test/r/windows.result +1 −0 Original line number Diff line number Diff line Loading @@ -18,4 +18,5 @@ EXPLAIN SELECT * FROM t1 WHERE b = (SELECT max(2)); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used DROP TABLE t1; End of 5.0 tests.
mysql-test/t/limit.test +8 −0 Original line number Diff line number Diff line Loading @@ -95,3 +95,11 @@ set @a=-14632475938453979136; execute s using @a, @a; --echo End of 5.0 tests # # Bug#37075: offset of limit clause might be truncated to 0 on 32-bits server w/o big tables # select 1 as a limit 4294967296,10; --echo End of 5.1 tests