Bug #41956 mysqltest function for converting error name to number
Submitted: 8 Jan 12:05
Reporter: Andrei Elkin
Status: Verified
Category:Tools: MTR / mysql-test-run Severity:S3 (Non-critical)
Version:5.0+ OS:Any
Assigned to: Bjorn Munch Target Version:
Tags: mtr, feature request

[8 Jan 12:05] Andrei Elkin
Description:
Using the number format is the only possible way to deal with the error tag
in mtr except the --error err_symb1,err_symb2,... primitive.
In such a case, e.g wait_for_slave_sql_error.inc version refined by Bug#37718 fixes or
value of the Last_Errno of Show Slave Status,
the error tag is better to be in the symbol format to avoid quite frequest
adjusting of the number due to the code numbers shift.

How to repeat:
To look at the definition of wait_for_slave_sql_error.inc or
to consider the value of the Last_Errno of Show Slave Status.

Suggested fix:
To introduce a new primitive in mtr to convert the error's symb tag to the current error
code number.
[8 Jan 13:02] Sven Sandberg
One possible way to do this could be to introduce a new table in the mtr database that
contains the mapping (CREATE TABLE `mtr`.`error_codes` (number AS INT PRIMARY KEY, symbol
AS VARCHAR PRIMARY KEY)).