Commit 2209dcdc authored by kostja@bodhi.local's avatar kostja@bodhi.local

Merge bodhi.local:/opt/local/work/mysql-5.0-runtime

into  bodhi.local:/opt/local/work/mysql-5.1-runtime
parents 717452fe 47dff35d
...@@ -3611,3 +3611,9 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -3611,3 +3611,9 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range si,ai si 5 NULL 2 Using where 1 SIMPLE t2 range si,ai si 5 NULL 2 Using where
1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where 1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where
DROP TABLE t1,t2,t3; DROP TABLE t1,t2,t3;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1(a int);
INSERT into t1 values (1), (2), (3);
SELECT * FROM t1 LIMIT 2, -1;
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 '-1' at line 1
DROP TABLE t1;
...@@ -3093,3 +3093,23 @@ SELECT t3.a FROM t1,t2,t3 ...@@ -3093,3 +3093,23 @@ SELECT t3.a FROM t1,t2,t3
t3.c IN ('bb','ee'); t3.c IN ('bb','ee');
DROP TABLE t1,t2,t3; DROP TABLE t1,t2,t3;
#
# Bug#6298: LIMIT #, -1 no longer works to set start with no end limit
#
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
CREATE TABLE t1(a int);
INSERT into t1 values (1), (2), (3);
# LIMIT N, -1 was accepted by accident in 4.0, but was not intended.
# This test verifies that this illegal construct is now properly detected.
--error ER_PARSE_ERROR
SELECT * FROM t1 LIMIT 2, -1;
DROP TABLE t1;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment