diff options
author | Dmitry Shulga <Dmitry.Shulga@oracle.com> | 2011-08-13 13:34:00 +0700 |
---|---|---|
committer | Dmitry Shulga <Dmitry.Shulga@oracle.com> | 2011-08-13 13:34:00 +0700 |
commit | 644db664462a52bae2237635c1d44401a5b1ec60 (patch) | |
tree | fe01e7d32375d087c27c01c181f1087a25256111 /sql/share | |
parent | 232b112e18bbef171e9b72a30336f14380042ab1 (diff) | |
download | mariadb-git-644db664462a52bae2237635c1d44401a5b1ec60.tar.gz |
Fixed Bug#12621017 - CRASH IF A SP VARIABLE IS USED IN THE LIMIT CLAUSE OF A
SET STATEMENT.
Server built with debug asserts, without debug crashes if a user tries
to run a stored procedure that constains query with subquery that include
either LIMIT or LIMIT OFFSET clauses.
The problem was that Item::fix_fields() was not called for the items
representing LIMIT or OFFSET clauses.
The solution is to call Item::fix_fields() right before evaluation in
st_select_lex_unit::set_limit().
mysql-test/r/sp.result:
Added testcase result for bug#12621017. Updated testcase result for
bug 11918.
mysql-test/t/sp.test:
Added testcase for bug#12621017. Addressed review comments for Bug 11918
(added tests for use LIMIT at stored function).
sql/item.h:
Addressed review comments for Bug 11918.
sql/share/errmsg-utf8.txt:
Addressed review comments for Bug 11918.
sql/sp_head.cc:
Addressed review comments for Bug 11918.
sql/sql_lex.cc:
Added call fix_fields() for item just before its evaluation.
sql/sql_yacc.yy:
Addressed review comments for Bug 11918.
Diffstat (limited to 'sql/share')
-rw-r--r-- | sql/share/errmsg-utf8.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt index b8f46f090ab..fd943c4f4d8 100644 --- a/sql/share/errmsg-utf8.txt +++ b/sql/share/errmsg-utf8.txt @@ -6329,7 +6329,7 @@ ER_DATA_OUT_OF_RANGE 22003 eng "%s value is out of range in '%s'" ER_WRONG_SPVAR_TYPE_IN_LIMIT - eng "A variable of a non-integer type in LIMIT clause" + eng "A variable of a non-integer based type in LIMIT clause" ER_BINLOG_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE eng "Mixing self-logging and non-self-logging engines in a statement is unsafe." |