1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-30 11:22:14 +03:00

Fixed BUG#9004: Inconsistent behaviour of SP re. warnings

mysql-test/r/sp.result:
  New test case for BUG#9004.
  Also updated some other results, since formerly "invisible" (but correct)
  warnings now are visible.
mysql-test/t/sp.test:
  New test case for BUG#9004.
sql/sql_error.cc:
  Don't reset warnings while executing a stored routine.
sql/sql_parse.cc:
  Don't reset warnings while executing a stored routine.
This commit is contained in:
unknown
2005-04-22 12:53:48 +02:00
parent 4f1f0b670b
commit 83a8ee38e0
4 changed files with 60 additions and 3 deletions

View File

@@ -2268,9 +2268,11 @@ mysql_execute_command(THD *thd)
A better approach would be to reset this for any commands
that is not a SHOW command or a select that only access local
variables, but for now this is probably good enough.
Don't reset warnings when executing a stored routine.
*/
if (all_tables || &lex->select_lex != lex->all_selects_list ||
lex->spfuns.records || lex->spprocs.records)
if ((all_tables || &lex->select_lex != lex->all_selects_list ||
lex->spfuns.records || lex->spprocs.records) &&
!thd->spcont)
mysql_reset_errors(thd, 0);
#ifdef HAVE_REPLICATION