summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@oracle.com>2011-01-10 23:42:37 +0100
committerMattias Jonsson <mattias.jonsson@oracle.com>2011-01-10 23:42:37 +0100
commit38c5e2cae8338d8941182dacb988b2aa8027cca4 (patch)
tree3609221d196fc50754ae3b53ca23298842a18941 /client
parent28df6d6e00d60742f6578871a04c1b5488a0cd3b (diff)
downloadmariadb-git-38c5e2cae8338d8941182dacb988b2aa8027cca4.tar.gz
Bug#47902: partition_recover_myisam fails with --ps-protocol
The problem was that the warnings was never written out when running with --ps-protocol. This was because the warnings only appeared during the prepare phase, not the execute phase. Solved by not clearing the warnings from the prepare phase if there was no other warnings. If there are warnings from the execute phase, it is very likely to be the same as from the prepare phase. My tests show that if not clearing the warnings from the prepare phase when there are warnings from the execute phase, there will be duplicated warnings in the result. client/mysqltest.cc: Only reset the prepare warnings if there are warnings from the execute phase. Otherwise these warnings will never be returned.
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index a12c56c9657..cdfce036ec7 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -7241,8 +7241,12 @@ void run_query_stmt(MYSQL *mysql, struct st_command *command,
mysql_free_result(res); /* Free normal result set with meta data */
- /* Clear prepare warnings */
- dynstr_set(&ds_prepare_warnings, NULL);
+ /*
+ Clear prepare warnings if there are execute warnings,
+ since they are probably duplicated.
+ */
+ if (ds_execute_warnings.length || mysql->warning_count)
+ dynstr_set(&ds_prepare_warnings, NULL);
}
else
{