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.
This commit is contained in:
parent
28df6d6e00
commit
38c5e2cae8
@ -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
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user