-
Marko Mäkelä authored
InnoDB used to use a mixture of int, ulint, and enum db_err for error codes. This patch changes it to use dberr_t (an enum) everywhere, so that errors are caught more easily. For example, one could forget to convert an InnoDB error code to an MySQL error code, or do the conversion twice. Also, gdb will nicely display the symbolic names of error codes when the enum type is being used. Also, the definition of trx->mysql_thd as void* instead of THD* causes unnecessary type casts. While we are at it, use ut_strerr() for reporting InnoDB internal errors to the user. In this way, the enum values can be changed at will. rb:1026 approved by Jimmy Yang
Marko Mäkelä authoredInnoDB used to use a mixture of int, ulint, and enum db_err for error codes. This patch changes it to use dberr_t (an enum) everywhere, so that errors are caught more easily. For example, one could forget to convert an InnoDB error code to an MySQL error code, or do the conversion twice. Also, gdb will nicely display the symbolic names of error codes when the enum type is being used. Also, the definition of trx->mysql_thd as void* instead of THD* causes unnecessary type casts. While we are at it, use ut_strerr() for reporting InnoDB internal errors to the user. In this way, the enum values can be changed at will. rb:1026 approved by Jimmy Yang
Loading