Error Code Compatibility

Percona Server with XtraDB has error code incompatibilities with MySQL 5.6. It is important to maintain compatibility in the error codes used by the servers. For example, scripts that may be run on both servers could contain references to error codes.

The reasons for the current incompatibilities are:

  • Percona Server with XtraDB contains features that have been backported from MyQL 5.6. Some of the MySQL 5.6 features added new error codes.
  • Some Percona Server with XtraDB features have added new error codes.

The solution to the first problem is to preserve MySQL 5.6 error codes in the Percona Server. An example of where this has been done is Percona Server feature Query Cache Enhancements. This feature adds error ER_QUERY_CACHE_DISABLED to the Percona Server, which is defined as error code 1651 in MySQL 5.6.

After migrating Percona Server / XtraDB to MySQL 5.6, users might experience troubles because of this.

The solution to the second problem is to insure that unique error codes are chosen, when adding new ones to Percona Server, that will never be duplicated during MySQL development.

For example, MySQL has a tool comp_err that generates:

  • errmsg.sys files
  • header file include/mysqld_error.h
  • 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.

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 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...

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.

Version-Specific Information

Percona Server
Call Us
+1-888-316-9775 (USA - Sales)
+1-208-473-2904 (USA - Sales)
+44-208-133-0309 (UK - Sales)
0-800-051-8984 (UK - Sales)
0-800-181-0665 (GER - Sales)
+1-877-862-4316 (Emergency)
+1-855-55TRAIN (Training)
+1-925-271-5054 (Training)

Table Of Contents

Previous topic

Too Many Connections Warning

Next topic

Handle Corrupted Tables

This Page



© Copyright Percona LLC and/or its affiliates 2009-2014.
Except where otherwise noted, this documentation is licensed under the following license:
CC Attribution-ShareAlike 2.0 Generic
Created using Sphinx 1.2.2.
This documentation is developed in Launchpad as part of the Percona Server source code.
If you spotted innacuracies, errors, don't understood it or you think something is missing or should be improved, please file a bug.
]]>