Bug #41956 mysqltest function for converting error name to number
Submitted: 8 Jan 2009 11:05 Modified: 1 Sep 2011 14:43
Reporter: Andrei Elkin Email Updates:
Status: Closed Impact on me:
Category:Tools: MTR / mysql-test-run Severity:S3 (Non-critical)
Version:5.0+ OS:Any
Assigned to: Bjørn Munch
Tags: feature request, mtr

[8 Jan 2009 11:05] Andrei Elkin
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 2009 12: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)).
[1 Sep 2011 14:43] Bjørn Munch
Oracle bug has been closed as a duplicate