Browse Source
A fix for Bug#11918 "SP does not accept variables in LIMIT clause"
A fix for Bug#11918 "SP does not accept variables in LIMIT clause"
Allow stored procedure variables in LIMIT clause. Only allow variables of INTEGER types. Handle negative values by means of an implicit cast to UNSIGNED (similarly to prepared statement placeholders). Add tests. Make sure replication works by not doing NAME_CONST substitution for variables in LIMIT clause. Add replication tests. mysql-test/r/sp.result: Update results (Bug#11918). mysql-test/suite/rpl/r/rpl_sp.result: Update results (Bug#11918). mysql-test/suite/rpl/t/rpl_sp.test: Add a test case for Bug#11918. mysql-test/t/sp.test: Add a test case for Bug#11918. sql/item.cc: Mark sp variables in LIMIT clause (a hack for replication). sql/item.h: Mark sp variables in LIMIT clause (a hack for replication). sql/share/errmsg-utf8.txt: Add a new error message (a type mismatch for LIMIT clause parameter). sql/sp_head.cc: Binlog rewrite sp variables in LIMIT clause without NAME_CONST substitution. sql/sql_string.cc: Implement append_ulonglong method. sql/sql_string.h: Declare append_ulonglong(). sql/sql_yacc.yy: Support stored procedure variables in LIMIT.pull/374/head
11 changed files with 357 additions and 3 deletions
-
103mysql-test/r/sp.result
-
45mysql-test/suite/rpl/r/rpl_sp.result
-
50mysql-test/suite/rpl/t/rpl_sp.test
-
91mysql-test/t/sp.test
-
4sql/item.cc
-
7sql/item.h
-
3sql/share/errmsg-utf8.txt
-
11sql/sp_head.cc
-
10sql/sql_string.cc
-
1sql/sql_string.h
-
35sql/sql_yacc.yy
Write
Preview
Loading…
Cancel
Save
Reference in new issue