diff options
author | unknown <acurtis@xiphis.org> | 2005-04-19 10:51:11 +0100 |
---|---|---|
committer | unknown <acurtis@xiphis.org> | 2005-04-19 10:51:11 +0100 |
commit | f054047f022096efaeeec46381ddf86d59eed517 (patch) | |
tree | 3d9c35c12c4a8a60ac8f5a90899a80ed1535e8c6 /sql | |
parent | 9bf92ed6fe303ef0fd758616d336eec4b786cd7f (diff) | |
download | mariadb-git-f054047f022096efaeeec46381ddf86d59eed517.tar.gz |
Bug#7648 - Stored procedure crash when invoking a function that returns a bit
bugfix 9102 corrected the crashing, this corrects the result.
mysql-test/r/sp.result:
Bug#7648
New test for bug
mysql-test/t/sp.test:
Bug#7648
New test for bug
sql/item_func.h:
Bug#7648
Cannot cheat in Item_func_sp::val_int()
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item_func.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sql/item_func.h b/sql/item_func.h index 9bf21fa1aa3..b39786e5544 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -1308,7 +1308,17 @@ public: longlong val_int() { - return (longlong)Item_func_sp::val_real(); + Item *it; + longlong l; + + if (execute(&it)) + { + null_value= 1; + return 0LL; + } + l= it->val_int(); + null_value= it->null_value; + return l; } double val_real() |