Bug #76972 Support "--error CR_..." for communication related errors
Submitted: 7 May 2015 13:53 Modified: 30 Jun 2016 18:27
Reporter: Matthias Leich Email Updates:
Status: Closed Impact on me:
Category:Tools: MTR / mysql-test-run Severity:S3 (Non-critical)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any

[7 May 2015 13:53] Matthias Leich
This is a request for some enhancement and not some bug report.

MTR based tests should use
   --error <some unique short error name>
whereever possible like for example
   --error ER_NO_SUCH_TABLE
instead of the less future proof (because developers might get
forced to change the numbering even though they usually should not)
   --error 1146

Unfortunately assignments in case of communication errors like
do not work and therefore we are forced to go again with
   --error 2006

I am aware that such an enhancement is difficult.

How to repeat:
let $run=20;
   --connect (con1,localhost,root,,)
   SELECT 1;
   --disconnect con1
   # List taken from include/wait_until_disconnected.inc
   # --error 0,1040,1053,2002,2003,2006,2013
   --error 0, CR_SERVER_GONE_ERROR
   SELECT 1;
   dec $run;

--connection master
--echo # End of test

..... harvests
mysqltest: At line 10: Invalid argument to error: '0, CR_SERVER_GONE_ERROR' - the errno may only consist of digits[0-9]
[18 Jun 2016 21:26] Omer Barnir
Posted by developer:
Reported version value updated to reflect release name change from 5.8 to 8.0
[30 Jun 2016 18:27] Paul DuBois
Posted by developer:
Noted in 8.0.0 changelog.

For test cases in the MySQL test suite, it was previously possible to
use symbolic error names for the --error command only for server
errors. This is now also possible for client errors. For example: