Dear MariaDB, Both Percona-Server/XtraDB and MariaDB experience problems concerning forward compatible error codes. 1) Both servers have a lot of features backported from mysql 5.5. Some features add new error (new error codes from MySQL 5.5). 2) Some Percona-Server/XtraDB and MariaDB features add new error code. In the first case we should save error code. For example, Percona has patch query_cache_totally_disable.patch (http://www.percona.com/docs/wiki/patches:query_cache_totally_disable) This patch adds error ER_QUERY_CACHE_DISABLED - error code number 1651 in mysql 5.5 (http://dev.mysql.com/doc/refman/5.5/en/error-messages-server.html#error_er_q...) We must be consistent with error code numbers, because they may be used in scripts. After migrating PerconaServer/XtraDB and MariaDB to mysql 5.5, users might experience troubles because of this. In the second case we should add error code numbers, unique for our errors, as we cannot use any numbers from mysql 5.5. For example: http://www.percona.com/docs/wiki/patches:slave_type_conversions_error_on_tru... MySQL has a tool "comp_err" that generates 1) errmsg.sys files 2) header file include/mysqld_error.h 3) header file include/mysqld_ername.h from the file errmsg.txt To keep error numbers consistent, we should add some fictive errors to errmsg.txt, because comp_err assigns error code numbers sequentially, without gaps. I propose patch to comp_err (see attachment error_pad.patch). This patch allows usage of a new syntax, with prefix "PADD_", for example: PADD_QUERY_CACHE_DISABLED 1651 eng "ER_QUERY_CACHE_DISABLED padding to 1651 error" ER_QUERY_CACHE_DISABLED eng "Query cache is disabled; restart the server with query_cache_type=1 to enable it" comp_err with my patch padds empty intervals (from last error code number to 1651) by error message "ER_QUERY_CACHE_DISABLED padding to 1651 error", i.e. and ER_QUERY_CACHE_DISABLED now has error code 1651 (as desired). I propose to use this patch for Percona's and Maria's errors, for example: PADD_PERCONA_NEW_ERROR_CODE 4000 end "Padd empty space to error code number 4000 (Percona error codes)" ...some percona error codes... PADD_MARIA_DB_NEW_ERROR_CODE 5000 eng "Padd empty space to error code number 5000 (MariaDB error codes)" ...some maria error codes... Patch only adds prefix "PADD_" and padds error in sys files. All other mysql code (load*.sys files, my_error, etc) works as old one. Please, let me know what you think of it. Best regards, Oleg.