diff options
author | pem@mysql.comhem.se <> | 2005-02-24 13:56:09 +0100 |
---|---|---|
committer | pem@mysql.comhem.se <> | 2005-02-24 13:56:09 +0100 |
commit | 2b1f0bf1f516e968c41b8da2bccfe467b54f126c (patch) | |
tree | a18d45cf395e5862f6eb3839aaef007ad7540b67 /sql/protocol.cc | |
parent | c3af8b202dfd6b281e5341c5aa8b138cb5e70f9b (diff) | |
download | mariadb-git-2b1f0bf1f516e968c41b8da2bccfe467b54f126c.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.
Diffstat (limited to 'sql/protocol.cc')
-rw-r--r-- | sql/protocol.cc | 4 |
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); /* |