summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <holyfoot/hf@mysql.com/hfmain.(none)>2008-02-27 12:42:43 +0400
committerunknown <holyfoot/hf@mysql.com/hfmain.(none)>2008-02-27 12:42:43 +0400
commita4b0a2cf67356c0f8f80b5291b3c1f4f8327cb97 (patch)
tree59053e19fde04a14b780f67eb9ed983bf57e3d3b /sql
parent4d794c233419658cd79b416a3ce45d0b1efea688 (diff)
downloadmariadb-git-a4b0a2cf67356c0f8f80b5291b3c1f4f8327cb97.tar.gz
Bug #25097 mysql_server_init fails silently if no errmsg.sys is present.
There was no way to return an error from the client library if no MYSQL connections was established. So here i added variables to store that king of errors and made functions like mysql_error(NULL) to return these. client/mysql.cc: Bug #25097 mysql_server_init fails silently if no errmsg.sys is present. Show the error message on std_error include/sql_common.h: Bug #25097 mysql_server_init fails silently if no errmsg.sys is present. cant_connect_sqlstate constant declared libmysql/libmysql.c: Bug #25097 mysql_server_init fails silently if no errmsg.sys is present. mysql_sqlstate(NULL) returns 'unknown_sqlstate' libmysqld/lib_sql.cc: Bug #25097 mysql_server_init fails silently if no errmsg.sys is present. EMBEDDED_SERVER version of the vprint_msg_to_log() implemented sql-common/client.c: Bug #25097 mysql_server_init fails silently if no errmsg.sys is present. mysql_server_last_errno and mysql_server_last_error introduced to store errors not related to particular connections. mysql_error(NULL) and mysql_errno(NULL) now returns these mysql_server_last_error and errno respectively sql/log.cc: Bug #25097 mysql_server_init fails silently if no errmsg.sys is present. EMBEDDED_LIBRARY implementation of the vprint_msg_to_log() moved to lib_sql.cc
Diffstat (limited to 'sql')
-rw-r--r--sql/log.cc7
1 files changed, 1 insertions, 6 deletions
diff --git a/sql/log.cc b/sql/log.cc
index e66d965c613..d1da900e1b5 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -2454,12 +2454,7 @@ static void print_buffer_to_nt_eventlog(enum loglevel level, char *buff,
void
*/
-#ifdef EMBEDDED_LIBRARY
-void vprint_msg_to_log(enum loglevel level __attribute__((unused)),
- const char *format __attribute__((unused)),
- va_list argsi __attribute__((unused)))
-{}
-#else /*!EMBEDDED_LIBRARY*/
+#ifndef EMBEDDED_LIBRARY
static void print_buffer_to_file(enum loglevel level, const char *buffer)
{
time_t skr;