From: Mattias Jonsson Date: January 10 2011 10:42pm Subject: bzr commit into mysql-5.1 branch (mattias.jonsson:3539) Bug#47902 List-Archive: http://lists.mysql.com/commits/128362 X-Bug: 47902 Message-Id: <201101102244.p0AMiLrB023169@rcsinet13.oracle.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1610893819552733919==" --===============1610893819552733919== MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline #At file:///Users/mattiasj/mysql-bzr/b47902-51/ based on revid:vasil.dimov@stripped 3539 Mattias Jonsson 2011-01-10 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. modified: client/mysqltest.cc === modified file 'client/mysqltest.cc' --- a/client/mysqltest.cc 2010-12-19 17:07:28 +0000 +++ b/client/mysqltest.cc 2011-01-10 22:42:37 +0000 @@ -7241,8 +7241,12 @@ void run_query_stmt(MYSQL *mysql, struct 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 { --===============1610893819552733919== MIME-Version: 1.0 Content-Type: text/bzr-bundle; charset="us-ascii"; name="bzr/mattias.jonsson@stripped" Content-Transfer-Encoding: 7bit Content-Disposition: inline # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: mattias.jonsson@stripped\ # rh8jh9w73xeg1qm7 # target_branch: file:///Users/mattiasj/mysql-bzr/b47902-51/ # testament_sha1: 36b98f8a5d3911b5dcc760f3d79291207672c8e5 # timestamp: 2011-01-10 23:42:55 +0100 # base_revision_id: vasil.dimov@stripped\ # 0tjqdpa5w3d6tuwn # # Begin bundle IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWZ6TBpkAAfZfgFQQWXf//1o3 jgC////0UAVErZgTWtrWyy1it4SSEmE1PTU8jTU9U/JpR4KeKan5U9JnqmnqG9SaYGRACaZIam0C n6U01MJhohoMmmA1BIkEECn6JkJmUPU9T00hoAZDQA9Q5gEwEyMAIxMTCYTBDTE0wOyYmTJowmCY JgEwCGCMCMOsQqDtViYf17D46sJWtss0zl77tCQ+R19b7//igavr3/uDm8hBkFnzfQ1dvFhm/z1M sIxt90TymEdN1rFdTMHfXqj+Nw+DFI3p/zXgvQPRaeGdHBu+LMLYx9OJIYhgjQ5WMH4i24HzS0Wt DK1LkcJxUm6HBgWaKJt49Zcp6d3LoOYU3nVrGv+fDnUVqM3qlaBE27VPb5RTVKxW0HQgLRj5IKaM fMhxIcVeAKejbtZSMJUeD5U/TYWlp86FVKE0DA0dMCZbROS1jbUn+DkVMSNtRVQPY4TlPoLPfBJU vg+X41uJoU0xfVRlS+02oxUsznnOrfbUYtAonzucs+4VdHkhSOF7fwqlkFPQL2HJo7Zr2OS482CE tAy29QHWxCDJYm6FTzdvaDB88S8dHAuD6FUUmzWRq6HgeAecaa/xEK6qdOwUkYDgZxTRBmyY1kXK WnAKo16Kd1KnIz42WV5NnmV7MNmAvF9pF0Age4tLfMBsNQYMc19jXx8+ILniA4WG1i5ZMLwg7Oe2 8PA4CKUuVZxptZVg3bNtx2gt2V7BsWmB0UNsdNHCMKzmK9+GSJxGKfjIG4nmUosJIcW1R7GIGB6l qvRTAMmSN0F6ehVwry8bXsbvPVs9+KkSknZMevu7Qhm6/fI8ZoDd8vpJlrcj4Qg2D4iIeDYHRaPD hy3RTJEnWceHPo8zZqSz77r5NMGoaGdgBF0TahLOB4V0wPAs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