summaryrefslogtreecommitdiffstats
path: root/mysql-test/main/parser_not_embedded.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
commit3f619478f796eddbba6e39502fe941b285dd97b1 (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/main/parser_not_embedded.test
parentInitial commit. (diff)
downloadmariadb-upstream.tar.xz
mariadb-upstream.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/parser_not_embedded.test')
-rw-r--r--mysql-test/main/parser_not_embedded.test118
1 files changed, 118 insertions, 0 deletions
diff --git a/mysql-test/main/parser_not_embedded.test b/mysql-test/main/parser_not_embedded.test
new file mode 100644
index 00000000..0208ee57
--- /dev/null
+++ b/mysql-test/main/parser_not_embedded.test
@@ -0,0 +1,118 @@
+--source include/not_embedded.inc
+
+###########################################################################
+--echo #
+--echo # Bug#39559: dump of stored procedures / functions with C-style
+--echo # comment can't be read back
+--echo #
+
+--write_file $MYSQLTEST_VARDIR/tmp/bug39559.sql
+select 2 as expected, /*!01000/**/*/ 2 as result;
+select 1 as expected, /*!999998/**/*/ 1 as result;
+select 3 as expected, /*!01000 1 + */ 2 as result;
+select 2 as expected, /*!999990 1 + */ 2 as result;
+select 7 as expected, /*!01000 1 + /* 8 + */ 2 + */ 4 as result;
+select 8 as expected, /*!999998 1 + /* 2 + */ 4 + */ 8 as result;
+select 7 as expected, /*!01000 1 + /*!01000 8 + */ 2 + */ 4 as result;
+select 7 as expected, /*!01000 1 + /*!999998 8 + */ 2 + */ 4 as result;
+select 4 as expected, /*!999998 1 + /*!999998 8 + */ 2 + */ 4 as result;
+select 4 as expected, /*!999998 1 + /*!01000 8 + */ 2 + */ 4 as result;
+select 7 as expected, /*!01000 1 + /*!01000 8 + /*!01000 error */ 16 + */ 2 + */ 4 as result;
+select 4 as expected, /* 1 + /*!01000 8 + */ 2 + */ 4;
+EOF
+
+--exec $MYSQL --comments --force --table test <$MYSQLTEST_VARDIR/tmp/bug39559.sql
+--remove_file $MYSQLTEST_VARDIR/tmp/bug39559.sql
+
+--echo # Bug#46527 "COMMIT AND CHAIN RELEASE does not make sense"
+--echo #
+--error ER_PARSE_ERROR
+COMMIT AND CHAIN RELEASE;
+
+COMMIT AND NO CHAIN RELEASE;
+disconnect default;
+connect(default, localhost, root,,);
+
+COMMIT RELEASE;
+disconnect default;
+connect(default, localhost, root,,);
+
+--error ER_PARSE_ERROR
+COMMIT CHAIN RELEASE;
+
+--error ER_PARSE_ERROR
+COMMIT NO CHAIN RELEASE;
+
+--error ER_PARSE_ERROR
+COMMIT AND NO RELEASE;
+--error ER_PARSE_ERROR
+COMMIT AND RELEASE;
+
+COMMIT NO RELEASE;
+--error ER_PARSE_ERROR
+COMMIT CHAIN NO RELEASE;
+--error ER_PARSE_ERROR
+COMMIT NO CHAIN NO RELEASE;
+
+--error ER_PARSE_ERROR
+COMMIT AND RELEASE CHAIN;
+
+COMMIT AND NO CHAIN NO RELEASE;
+
+--error ER_PARSE_ERROR
+ROLLBACK AND CHAIN RELEASE;
+
+ROLLBACK AND NO CHAIN RELEASE;
+disconnect default;
+connect(default, localhost, root,,);
+
+ROLLBACK RELEASE;
+disconnect default;
+connect(default, localhost, root,,);
+
+--error ER_PARSE_ERROR
+ROLLBACK CHAIN RELEASE;
+
+--error ER_PARSE_ERROR
+ROLLBACK NO CHAIN RELEASE;
+disconnect default;
+connect(default, localhost, root,,);
+
+--error ER_PARSE_ERROR
+ROLLBACK AND NO RELEASE;
+
+--error ER_PARSE_ERROR
+ROLLBACK AND RELEASE;
+
+ROLLBACK NO RELEASE;
+
+--error ER_PARSE_ERROR
+ROLLBACK CHAIN NO RELEASE;
+
+--error ER_PARSE_ERROR
+ROLLBACK NO CHAIN NO RELEASE;
+--error ER_PARSE_ERROR
+ROLLBACK AND RELEASE CHAIN;
+
+ROLLBACK AND NO CHAIN NO RELEASE;
+
+--echo #
+--echo # End of 5.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-6899 extra semicolon in show create event syntax
+--echo #
+--disable_ps_protocol
+set timestamp=unix_timestamp('2020-10-10 5:5:5');
+delimiter $;
+create event a on schedule every 1 day do set @a:=1;select 2$
+delimiter ;$
+query_vertical show create event a;
+drop event a;
+set timestamp=default;
+--enable_ps_protocol
+
+--echo #
+--echo # End of 10.2 tests
+--echo #