diff options
author | unknown <pem@mysql.comhem.se> | 2005-04-05 15:49:10 +0200 |
---|---|---|
committer | unknown <pem@mysql.comhem.se> | 2005-04-05 15:49:10 +0200 |
commit | f3281e7b3381841cdab52d5f53c0ff813754e108 (patch) | |
tree | f658431ec09c56af8e818757f53eb7f0e245245e /sql | |
parent | b419262fe49bb3cc84f496e913edd3f1baf25283 (diff) | |
download | mariadb-git-f3281e7b3381841cdab52d5f53c0ff813754e108.tar.gz |
Additional fix for BUG#5907: Traditional mode: invalid value can be inserted via a stored procedure
... make the handler catch too.
mysql-test/r/strict.result:
Updated corrected result for BUG#5907.
mysql-test/t/strict.test:
Corrected test for BUG#5907.
sql/sp_head.cc:
Make handlers catch certain bad data exceptions in strict mode too.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sp_head.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 89c4b2dbaac..63f67959f33 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -561,7 +561,10 @@ sp_head::execute(THD *thd) // Check if an exception has occurred and a handler has been found // Note: We havo to check even if ret==0, since warnings (and some // errors don't return a non-zero value. - if (!thd->killed && ctx) + // We also have to check even if thd->killed != 0, since some + // errors return with this even when a handler has been found + // (e.g. "bad data"). + if (ctx) { uint hf; @@ -579,6 +582,7 @@ sp_head::execute(THD *thd) ctx->clear_handler(); ctx->in_handler= TRUE; thd->clear_error(); + thd->killed= THD::NOT_KILLED; continue; } } |