summaryrefslogtreecommitdiff
path: root/mysql-test/r/sp-code.result
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/r/sp-code.result
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/r/sp-code.result')
-rw-r--r--mysql-test/r/sp-code.result11
1 files changed, 9 insertions, 2 deletions
diff --git a/mysql-test/r/sp-code.result b/mysql-test/r/sp-code.result
index 8bdb9a724d7..4ae38861d29 100644
--- a/mysql-test/r/sp-code.result
+++ b/mysql-test/r/sp-code.result
@@ -155,11 +155,11 @@ Pos Instruction
0 stmt 9 "drop temporary table if exists sudoku..."
1 stmt 1 "create temporary table sudoku_work ( ..."
2 stmt 1 "create temporary table sudoku_schedul..."
-3 stmt 95 "call sudoku_init("
+3 stmt 95 "call sudoku_init()"
4 jump_if_not 7(8) p_naive@0
5 stmt 4 "update sudoku_work set cnt = 0 where ..."
6 jump 8
-7 stmt 95 "call sudoku_count("
+7 stmt 95 "call sudoku_count()"
8 stmt 6 "insert into sudoku_schedule (row,col)..."
9 set v_scounter@2 0
10 set v_i@3 1
@@ -199,3 +199,10 @@ Pos Instruction
44 jump 14
45 stmt 9 "drop temporary table sudoku_work, sud..."
drop procedure sudoku_solve;
+DROP PROCEDURE IF EXISTS p1;
+CREATE PROCEDURE p1() CREATE INDEX idx ON t1 (c1);
+SHOW PROCEDURE CODE p1;
+Pos Instruction
+0 stmt 2 "CREATE INDEX idx ON t1 (c1)"
+DROP PROCEDURE p1;
+End of 5.0 tests.