diff options
author | ramil/ram@mysql.com/ramil.myoffice.izhnet.ru <> | 2007-02-06 15:58:40 +0400 |
---|---|---|
committer | ramil/ram@mysql.com/ramil.myoffice.izhnet.ru <> | 2007-02-06 15:58:40 +0400 |
commit | 85f2f924fd04c227843eaccf4f8f87324795012f (patch) | |
tree | 077c7ab3cdb5a473722a35c0a96712e52334bc64 /sql/sql_analyse.cc | |
parent | b0977714a86882834245424edd505dc8febebe1b (diff) | |
download | mariadb-git-85f2f924fd04c227843eaccf4f8f87324795012f.tar.gz |
Fix for bug #23782: Stored procedures: crash if variable in procedure
analyse
We have to call fix_fields() for procedure analyse' arguments as they may
not be
fixed in some circumstances.
(as the crash appears when mysqld starts skipping binlog, a test case
will be added when we can --skip-bin-log in -master.opt)
Diffstat (limited to 'sql/sql_analyse.cc')
-rw-r--r-- | sql/sql_analyse.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/sql_analyse.cc b/sql/sql_analyse.cc index 62b6d4f7920..2b22696ef6a 100644 --- a/sql/sql_analyse.cc +++ b/sql/sql_analyse.cc @@ -87,6 +87,11 @@ proc_analyse_init(THD *thd, ORDER *param, select_result *result, else if (param->next) { // first parameter + if (!(*param->item)->fixed && (*param->item)->fix_fields(thd, param->item)) + { + DBUG_PRINT("info", ("fix_fields() for the first parameter failed")); + goto err; + } if ((*param->item)->type() != Item::INT_ITEM || (*param->item)->val_real() < 0) { @@ -101,6 +106,11 @@ proc_analyse_init(THD *thd, ORDER *param, select_result *result, goto err; } // second parameter + if (!(*param->item)->fixed && (*param->item)->fix_fields(thd, param->item)) + { + DBUG_PRINT("info", ("fix_fields() for the second parameter failed")); + goto err; + } if ((*param->item)->type() != Item::INT_ITEM || (*param->item)->val_real() < 0) { |