summaryrefslogtreecommitdiff
path: root/mysql-test/main/parser.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/main/parser.test')
-rw-r--r--mysql-test/main/parser.test24
1 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/main/parser.test b/mysql-test/main/parser.test
index 5ffd379cefd..2d2c0cadeae 100644
--- a/mysql-test/main/parser.test
+++ b/mysql-test/main/parser.test
@@ -408,6 +408,9 @@ select "terminated";$$
select "non terminated, space" $$
select "terminated, space"; $$
select "non terminated, comment" /* comment */$$
+
+#--view-protocol test mode can not parse query
+--disable_view_protocol
select "terminated, comment"; /* comment */$$
# Multi queries can not be used in --ps-protocol test mode
@@ -430,6 +433,7 @@ DROP PROCEDURE IF EXISTS p26030; CREATE PROCEDURE p26030() SELECT 1; CALL p26030
$$
--enable_ps_protocol
+--enable_view_protocol
delimiter ;$$
DROP PROCEDURE p26030;
@@ -689,7 +693,12 @@ DROP TABLE IF EXISTS t1;
--enable_warnings
SELECT STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE;
+
+#enable view protocol after fix MDEV-27871
+--disable_view_protocol
SELECT STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL (INTERVAL(1,2,3) + 1) MINUTE;
+--enable_view_protocol
+
SELECT "1997-12-31 23:59:59" + INTERVAL 1 SECOND;
SELECT 1 + INTERVAL(1,0,1,2) + 1;
SELECT INTERVAL(1^1,0,1,2) + 1;
@@ -1179,12 +1188,18 @@ SELECT (SELECT * FROM t1 GROUP BY a WITH ROLLUP HAVING a IS NULL);
SELECT (SELECT * FROM t1 GROUP BY a WITH ROLLUP HAVING a IS NOT NULL);
SELECT (SELECT * FROM t1 GROUP BY a WITH ROLLUP LIMIT 1);
SELECT (SELECT GROUP_CONCAT(a) FROM t1 GROUP BY a WITH ROLLUP LIMIT 1);
+#enable view protocol after fix MDEV-27871
+--disable_view_protocol
SELECT (SELECT GROUP_CONCAT(a ORDER BY a) FROM t1 GROUP BY a WITH ROLLUP LIMIT 1);
+--enable_view_protocol
SELECT (SELECT * FROM t1 GROUP BY a WITH ROLLUP HAVING a IS NULL) FROM t1;
SELECT (SELECT * FROM t1 GROUP BY a WITH ROLLUP HAVING a IS NOT NULL) FROM t1;
SELECT (SELECT * FROM t1 GROUP BY a WITH ROLLUP LIMIT 1) FROM t1;
SELECT (SELECT GROUP_CONCAT(a) FROM t1 GROUP BY a WITH ROLLUP LIMIT 1) FROM t1;
+#enable view protocol after fix MDEV-27871
+--disable_view_protocol
SELECT (SELECT GROUP_CONCAT(a ORDER BY a) FROM t1 GROUP BY a WITH ROLLUP LIMIT 1) FROM t1;
+--enable_view_protocol
--error ER_SUBQUERY_NO_1_ROW
SELECT (SELECT * FROM t1 GROUP BY a WITH ROLLUP);
@@ -1220,10 +1235,16 @@ CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (10),(20),(30);
SELECT (SELECT * FROM t1 GROUP BY a WITH ROLLUP LIMIT 1);
SELECT (SELECT GROUP_CONCAT(a) FROM t1 GROUP BY a WITH ROLLUP LIMIT 1);
+#enable view protocol after fix MDEV-27871
+--disable_view_protocol
SELECT (SELECT GROUP_CONCAT(a ORDER BY a) FROM t1 GROUP BY a WITH ROLLUP LIMIT 1);
+--enable_view_protocol
SELECT (SELECT * FROM t1 GROUP BY a WITH ROLLUP LIMIT 1) FROM t1;
SELECT (SELECT GROUP_CONCAT(a) FROM t1 GROUP BY a WITH ROLLUP LIMIT 1) FROM t1;
+#enable view protocol after fix MDEV-27871
+--disable_view_protocol
SELECT (SELECT GROUP_CONCAT(a ORDER BY a) FROM t1 GROUP BY a WITH ROLLUP LIMIT 1) FROM t1;
+--enable_view_protocol
--error ER_SUBQUERY_NO_1_ROW
SELECT (SELECT * FROM t1 GROUP BY a WITH ROLLUP);
@@ -1541,6 +1562,8 @@ DROP PROCEDURE p1;
--echo # MDEV-16697: Fix difference between 32bit/windows and 64bit
--echo # systems in allowed select nest level
--echo #
+#enable view protocol after fix MDEV-27871
+--disable_view_protocol
SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT
(SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT
(SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT
@@ -1551,6 +1574,7 @@ DROP PROCEDURE p1;
(SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT
1
)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))));
+--enable_view_protocol
--echo #
--echo # MDEV-17693 Shift/reduce conflicts for NAMES,ROLE,PASSWORD in the option_value_no_option_type grammar