diff options
author | Alexander Barkov <bar@mariadb.org> | 2017-01-24 17:22:06 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-01-24 17:22:06 +0400 |
commit | ae91690d893c13e86fd9f84e0c37fd9640bca257 (patch) | |
tree | 2ed02394f8991629e64bf8ba7c5d0f4dc5f1532a /.travis.yml | |
parent | 836804499704396aacff58d415b63741b22ff2f6 (diff) | |
download | mariadb-git-ae91690d893c13e86fd9f84e0c37fd9640bca257.tar.gz |
MDEV-11780 Crash with PREPARE + SP out parameter + literal
Before "MDEV-10709 Expressions as parameters to Dynamic SQL" only
user variables were syntactically allowed as EXECUTE parameters.
User variables were OK as both IN and OUT parameters.
When Item_param was bound to an actual parameter (a user variable),
it automatically meant that the bound Item was settable.
The DBUG_ASSERT() in Protocol_text::send_out_parameters() guarded that
the actual parameter is really settable.
After MDEV-10709, any kind of expressions are allowed as EXECUTE IN parameters.
But the patch for MDEV-10709 forgot to check that only descendants of
Settable_routine_parameter should be allowed as OUT parameters.
So an attempt to pass a non-settable parameter as an OUT parameter
made server crash on the above mentioned DBUG_ASSERT.
This patch changes Item_param::get_settable_routine_parameter(),
which previously always returned "this". Now, when Item_param is bound
to some Item, it caches if the bound Item is settable.
Item_param::get_settable_routine_parameter() now returns "this" only
if the bound actual parameter is settable, and returns NULL otherwise.
Diffstat (limited to '.travis.yml')
0 files changed, 0 insertions, 0 deletions