[Maria-developers] MariaDB/MySQL error code issue
Hi, For merging MySQL into MariaDB, we need to work out what to do about error code. The problem occurs as (different) new error messages are added in both MySQL and MariaDB. When we then merge from MySQL, we get conflicts between the error numbers. If we do not handle this somehow, it means that error numbers for a given error message will be different, either between MySQL and MariaDB, or alternatively between one version of MariaDB and another (depending on how conflicts are resolved). The problem with error code changing is that this makes it much harder for applications to check error codes and handle errors as it want in a portable way between MySQL and MariaDB. I think we have these options: 1. Cooperate with MySQL@Oracle, so that whenever we add an error code in MariaDB, the corresponding code is also reserved in MySQL (even if not used), and vice versa. 2. Create different "namespaces" for error codes added to MariaDB and MySQL, eg. new MariaDB codes are assigned with some offset to MySQL codes, so we avoid conflicts. 3. Keep MariaDB error code numbers stable, re-assign MySQL error code numbers when merging from MySQL (I rather dislike this as well because it introduces incompatibility with MySQL). 4. Keep MySQL error code numbers when merging from MySQL, so that MariaDB-only errors will fluctuate between releases (I really dislike this option). It seems option (4) is the best option. Is someone from MySQL/Oracle willing to work on getting such a procedure running? Failing that, it seems (3) is the best option. In this case, we need (at least) to assign a suitable error code range to new MariaDB errors and change the source code to be able to handle this (eg. maybe we need a sql/share/errmsg-mariadb.txt or something). We will also need to handle the error codes already assigned to virtual columns, which I think already conflict with new MySQL error codes. I would suggest doing a one-time incompatible change to map them into the MariaDB range. So, any hope for getting solution (4) working with MySQL@Oracle? And failing that, any opinions on how to proceed? Thanks, - Kristian.
Kristian Nielsen <knielsen@knielsen-hq.org> writes:
It seems option (4) is the best option. Is someone from MySQL/Oracle willing
Sorry, I meant "option (*1*) is the best option" of course.
Failing that, it seems (3) is the best option. In this case, we need (at
And here (*2*)
So, any hope for getting solution (4) working with MySQL@Oracle? And failing
(*1*) BTW, option (1) will also benefit MySQL@Oracle if we get to the point where more stuff from MariaDB gets into MySQL, something that I am still hoping will happen sooner or later. - Kristian.
http://www.percona.com/docs/wiki/percona-server:features:error_pad 2011/4/18 Kristian Nielsen <knielsen@knielsen-hq.org>
Kristian Nielsen <knielsen@knielsen-hq.org> writes:
It seems option (4) is the best option. Is someone from MySQL/Oracle willing
Sorry, I meant "option (*1*) is the best option" of course.
Failing that, it seems (3) is the best option. In this case, we need (at
And here (*2*)
So, any hope for getting solution (4) working with MySQL@Oracle? And failing
(*1*)
BTW, option (1) will also benefit MySQL@Oracle if we get to the point where more stuff from MariaDB gets into MySQL, something that I am still hoping will happen sooner or later.
- Kristian.
-- MySQL Internals Mailing List For list archives: http://lists.mysql.com/internals To unsubscribe: http://lists.mysql.com/internals?unsub=oleg.tsarev@percona.com
-- Oleg Tsarev, Software Engineer, Percona Inc.
I mean, we (Percona) already solved tris trouble about error code compatibles. We have same error number for all errors, indepent from version of mysql 5.1, 5.5, or distribution (CE, Percona, MariaDB) 2011/4/18 Oleg Tsarev <oleg.tsarev@percona.com>
http://www.percona.com/docs/wiki/percona-server:features:error_pad
2011/4/18 Kristian Nielsen <knielsen@knielsen-hq.org>
Kristian Nielsen <knielsen@knielsen-hq.org> writes:
It seems option (4) is the best option. Is someone from MySQL/Oracle willing
Sorry, I meant "option (*1*) is the best option" of course.
Failing that, it seems (3) is the best option. In this case, we need (at
And here (*2*)
So, any hope for getting solution (4) working with MySQL@Oracle? And failing
(*1*)
BTW, option (1) will also benefit MySQL@Oracle if we get to the point where more stuff from MariaDB gets into MySQL, something that I am still hoping will happen sooner or later.
- Kristian.
-- MySQL Internals Mailing List For list archives: http://lists.mysql.com/internals To unsubscribe: http://lists.mysql.com/internals?unsub=oleg.tsarev@percona.com
-- Oleg Tsarev, Software Engineer, Percona Inc.
-- Oleg Tsarev, Software Engineer, Percona Inc.
We (Percona) already solved tris trouble about error code compatibles. We have same error number for all errors, indepent from version of mysql 5.1, 5.5, or distribution (CE, Percona, MariaDB) See patch description: http://www.percona.com/docs/wiki/percona-server:features:error_pad 2011/4/18 Kristian Nielsen <knielsen@knielsen-hq.org>
Kristian Nielsen <knielsen@knielsen-hq.org> writes:
It seems option (4) is the best option. Is someone from MySQL/Oracle willing
Sorry, I meant "option (*1*) is the best option" of course.
Failing that, it seems (3) is the best option. In this case, we need (at
And here (*2*)
So, any hope for getting solution (4) working with MySQL@Oracle? And failing
(*1*)
BTW, option (1) will also benefit MySQL@Oracle if we get to the point where more stuff from MariaDB gets into MySQL, something that I am still hoping will happen sooner or later.
- Kristian.
-- MySQL Internals Mailing List For list archives: http://lists.mysql.com/internals To unsubscribe: http://lists.mysql.com/internals?unsub=oleg.tsarev@percona.com
-- Oleg Tsarev, Software Engineer, Percona Inc.
18 апр. 2011, в 12:40, Kristian Nielsen написал(а):
Hi,
For merging MySQL into MariaDB, we need to work out what to do about error code.
The problem occurs as (different) new error messages are added in both MySQL and MariaDB. When we then merge from MySQL, we get conflicts between the error numbers.
If we do not handle this somehow, it means that error numbers for a given error message will be different, either between MySQL and MariaDB, or alternatively between one version of MariaDB and another (depending on how conflicts are resolved).
The problem with error code changing is that this makes it much harder for applications to check error codes and handle errors as it want in a portable way between MySQL and MariaDB.
I think we have these options:
1. Cooperate with MySQL@Oracle, so that whenever we add an error code in MariaDB, the corresponding code is also reserved in MySQL (even if not used), and vice versa.
2. Create different "namespaces" for error codes added to MariaDB and MySQL, eg. new MariaDB codes are assigned with some offset to MySQL codes, so we avoid conflicts.
3. Keep MariaDB error code numbers stable, re-assign MySQL error code numbers when merging from MySQL (I rather dislike this as well because it introduces incompatibility with MySQL).
4. Keep MySQL error code numbers when merging from MySQL, so that MariaDB-only errors will fluctuate between releases (I really dislike this option).
5. Add interface of translation NAME <-> CODE as we do it for our test suite files where one can use ER_* names instead of numbers. I agre that it is might be not the best solution but I think it should be listed, because the name constants is something which we do not change but only add. [skip]
Hi, Kristian! On Apr 18, Kristian Nielsen wrote:
For merging MySQL into MariaDB, we need to work out what to do about error code.
I think we have these options:
1. Cooperate with MySQL@Oracle, so that whenever we add an error code in MariaDB, the corresponding code is also reserved in MySQL (even if not used), and vice versa.
I don't believe this will ever happen. I personally wouldn't even bother considering it as an option.
2. Create different "namespaces" for error codes added to MariaDB and MySQL, eg. new MariaDB codes are assigned with some offset to MySQL codes, so we avoid conflicts.
That's what we should do, I suppose. Regards, Sergei
participants (4)
-
Kristian Nielsen
-
Oleg Tsarev
-
Oleksandr Byelkin
-
Sergei Golubchik