[Maria-developers] help creating error messages
hi guys, how could i create a new error / warning message in mariadb? 1) how to add the message text to error list (there's a list, right?) 2) how to return (send) a error to client 3) how to add a message to 'warning list' and after get it with SHOW WARNINGS maybe some example or point lines / files that i should read thanks guys :) -- Roberto Spadim
Hi, Roberto! On Jul 09, Roberto Spadim wrote:
hi guys, how could i create a new error / warning message in mariadb? 1) how to add the message text to error list (there's a list, right?)
in sql/share/errmsg-utf8.txt at the end, where mariadb-specific error messages are
2) how to return (send) a error to client
my_error or my_printf_error
3) how to add a message to 'warning list' and after get it with SHOW WARNINGS
push_warning or push_warning_printf Regards, Sergei
thanks sergei!!
i will put this in my 'source code manual'
2013/7/10 Sergei Golubchik
Hi, Roberto!
On Jul 09, Roberto Spadim wrote:
hi guys, how could i create a new error / warning message in mariadb? 1) how to add the message text to error list (there's a list, right?)
in sql/share/errmsg-utf8.txt at the end, where mariadb-specific error messages are
2) how to return (send) a error to client
my_error or my_printf_error
3) how to add a message to 'warning list' and after get it with SHOW WARNINGS
push_warning or push_warning_printf
Regards, Sergei
-- Roberto Spadim SPAEmpresarial
other doubt...
there's no plugin to read this file right? could i create a error_messages
plugin? it will read the err file and return something like:
||Language|error code|error text||
|en_US|1234|hello|
where could i read all error codes? i was reading unireg there's some
macros, but they are locale specific, there's some 'all locales' variable?
or some function that could read this errors codes / messages?
thanks again
2013/7/10 Roberto Spadim
thanks sergei!! i will put this in my 'source code manual'
2013/7/10 Sergei Golubchik
Hi, Roberto!
On Jul 09, Roberto Spadim wrote:
hi guys, how could i create a new error / warning message in mariadb? 1) how to add the message text to error list (there's a list, right?)
in sql/share/errmsg-utf8.txt at the end, where mariadb-specific error messages are
2) how to return (send) a error to client
my_error or my_printf_error
3) how to add a message to 'warning list' and after get it with SHOW WARNINGS
push_warning or push_warning_printf
Regards, Sergei
-- Roberto Spadim SPAEmpresarial
-- Roberto Spadim SPAEmpresarial
Hi, Roberto! On Jul 10, Roberto Spadim wrote:
other doubt... there's no plugin to read this file right? could i create a error_messages plugin? it will read the err file and return something like: ||Language|error code|error text|| |en_US|1234|hello|
What do you want to achieve? To have a list of all error messages in the information_schema table? What for?
where could i read all error codes? i was reading unireg there's some
include/mysqld_error.h
macros, but they are locale specific, there's some 'all locales' variable? or some function that could read this errors codes / messages?
ER() returns the error code in the current language. ER_DEFAULT() - in the default one. Regards, Sergei
nice
well today i'm using perror to understand errors, but sometimes i don't
have perror in my computer or the sql error isn't clear
is error at information schema usefull? or maybe we should improve error
messages?
i don't remember all error i got now that isn't clear and i used perror to
understand, but with time i can comment about each error that isn't clear
2013/7/16 Sergei Golubchik
Hi, Roberto!
On Jul 10, Roberto Spadim wrote:
other doubt... there's no plugin to read this file right? could i create a error_messages plugin? it will read the err file and return something like: ||Language|error code|error text|| |en_US|1234|hello|
What do you want to achieve? To have a list of all error messages in the information_schema table? What for?
where could i read all error codes? i was reading unireg there's some
include/mysqld_error.h
macros, but they are locale specific, there's some 'all locales' variable? or some function that could read this errors codes / messages?
ER() returns the error code in the current language. ER_DEFAULT() - in the default one.
Regards, Sergei
-- Roberto Spadim SPAEmpresarial
participants (2)
-
Roberto Spadim
-
Sergei Golubchik