summaryrefslogtreecommitdiff
path: root/mysql-test/t/sp-code.test
diff options
context:
space:
mode:
authorunknown <kroki/tomash@mysql.com/moonlight.intranet>2006-07-07 21:24:54 +0400
committerunknown <kroki/tomash@mysql.com/moonlight.intranet>2006-07-07 21:24:54 +0400
commit7733615d8d843e850dfe336e3d77d7901f84b772 (patch)
tree1fe9e07071338edaddf4672c44bcb3e0fe4511b2 /mysql-test/t/sp-code.test
parentd5d217c0c71572835978448aaf269b6a2196988f (diff)
downloadmariadb-git-7733615d8d843e850dfe336e3d77d7901f84b772.tar.gz
Bug#19207: Final parenthesis omitted for CREATE INDEX in Stored Procedure
Wrong criteria was used to distinguish the case when there was no lookahead performed in the parser. Bug affected only statements ending in one-character token without any optional tail, like CREATE INDEX and CALL. mysql-test/r/sp-code.result: Add result for bug#19207: Final parenthesis omitted for CREATE INDEX in Stored Procedure mysql-test/t/sp-code.test: Add test case for bug#19207: Final parenthesis omitted for CREATE INDEX in Stored Procedure sql/sql_yacc.yy: Use (yychar == YYEMPTY) as the criteria of whether lookahead was not performed.
Diffstat (limited to 'mysql-test/t/sp-code.test')
-rw-r--r--mysql-test/t/sp-code.test22
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/t/sp-code.test b/mysql-test/t/sp-code.test
index 0a26ea644f6..72efa831059 100644
--- a/mysql-test/t/sp-code.test
+++ b/mysql-test/t/sp-code.test
@@ -190,3 +190,25 @@ delimiter ;//
show procedure code sudoku_solve;
drop procedure sudoku_solve;
+
+
+#
+# Bug#19207: Final parenthesis omitted for CREATE INDEX in Stored
+# Procedure
+#
+# Wrong criteria was used to distinguish the case when there was no
+# lookahead performed in the parser. Bug affected only statements
+# ending in one-character token without any optional tail, like CREATE
+# INDEX and CALL.
+#
+--disable_warnings
+DROP PROCEDURE IF EXISTS p1;
+--enable_warnings
+
+CREATE PROCEDURE p1() CREATE INDEX idx ON t1 (c1);
+SHOW PROCEDURE CODE p1;
+
+DROP PROCEDURE p1;
+
+
+--echo End of 5.0 tests.