summaryrefslogtreecommitdiff
path: root/sql/protocol.cc
diff options
context:
space:
mode:
authorunknown <pem@mysql.comhem.se>2005-02-24 13:56:09 +0100
committerunknown <pem@mysql.comhem.se>2005-02-24 13:56:09 +0100
commit9d5d847835475f9195c0b9a3e83d2e9770f1b7b1 (patch)
treea18d45cf395e5862f6eb3839aaef007ad7540b67 /sql/protocol.cc
parent0119ea08668ba936ba980a4e6a882ad48039564f (diff)
downloadmariadb-git-9d5d847835475f9195c0b9a3e83d2e9770f1b7b1.tar.gz
Fixed BUG#8638: Test 'sp' fails: Stored Procedure often sends warning 1329
The warning sent is by itself ok, the problem was rather why it wasn't sent on some other platforms... The real problem was that a total_warn_count which was inconsistent with warn_list was sent back with send_eof() during SP execution, which in turn cause a protocol error in mysqltest. mysql-test/r/sp.result: Updated results after fixing bug in how total_warn_count is handled. sql/protocol.cc: Fixed bug that caused protocol errors with mysqltest. Don't send total_warn_count with send_eof() during SP execution, as it's usually wrong anyway. (warn_list is cleared) sql/sql_parse.cc: Reset total_warn_count if the warn_list has been cleared. This gets rid of "empty" warnings after some CALLs.
Diffstat (limited to 'sql/protocol.cc')
-rw-r--r--sql/protocol.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/protocol.cc b/sql/protocol.cc
index f31462ddad1..e14262fdbe0 100644
--- a/sql/protocol.cc
+++ b/sql/protocol.cc
@@ -359,7 +359,9 @@ send_eof(THD *thd, bool no_flush)
if (thd->client_capabilities & CLIENT_PROTOCOL_41)
{
uchar buff[5];
- uint tmp= min(thd->total_warn_count, 65535);
+ /* Don't send warn count during SP execution, as the warn_list
+ is cleared between substatements, and mysqltest gets confused */
+ uint tmp= (thd->spcont ? 0 : min(thd->total_warn_count, 65535));
buff[0]=254;
int2store(buff+1, tmp);
/*