diff options
author | bell@sanja.is.com.ua <> | 2004-11-12 15:36:31 +0200 |
---|---|---|
committer | bell@sanja.is.com.ua <> | 2004-11-12 15:36:31 +0200 |
commit | 1555469b646733f86692033bb20f500b7be29458 (patch) | |
tree | ab12f1be1300ed43430653785dd80f2a0e814d11 /sql/protocol.cc | |
parent | 232abd5f6ee8c1deb83533631441b8a5a91a800d (diff) | |
parent | 31f7811183b6dd197cb7643abbe1b56cec72b602 (diff) | |
download | mariadb-git-1555469b646733f86692033bb20f500b7be29458.tar.gz |
merge
Diffstat (limited to 'sql/protocol.cc')
-rw-r--r-- | sql/protocol.cc | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/sql/protocol.cc b/sql/protocol.cc index 2b0ae60f944..e0d256fbe87 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -53,14 +53,14 @@ bool Protocol_prep::net_store_data(const char *from, uint length) /* Send a error string to client */ -void send_error(THD *thd, uint sql_errno, const char *err) +void net_send_error(THD *thd, uint sql_errno, const char *err) { #ifndef EMBEDDED_LIBRARY uint length; char buff[MYSQL_ERRMSG_SIZE+2], *pos; #endif NET *net= &thd->net; - DBUG_ENTER("send_error"); + DBUG_ENTER("net_send_error"); DBUG_PRINT("enter",("sql_errno: %d err: %s", sql_errno, err ? err : net->last_error[0] ? net->last_error : "NULL")); @@ -70,9 +70,6 @@ void send_error(THD *thd, uint sql_errno, const char *err) { DBUG_VOID_RETURN; } -#ifndef EMBEDDED_LIBRARY /* TODO query cache in embedded library*/ - query_cache_abort(net); -#endif thd->query_error= 1; // needed to catch query errors during replication if (!err) { @@ -172,7 +169,7 @@ void send_warning(THD *thd, uint sql_errno, const char *err) */ void -net_printf(THD *thd, uint errcode, ...) +net_printf_error(THD *thd, uint errcode, ...) { va_list args; uint length,offset; @@ -185,7 +182,7 @@ net_printf(THD *thd, uint errcode, ...) #endif NET *net= &thd->net; - DBUG_ENTER("net_printf"); + DBUG_ENTER("net_printf_error"); DBUG_PRINT("enter",("message: %u",errcode)); if (thd->spcont && thd->spcont->find_handler(errcode, @@ -199,8 +196,8 @@ net_printf(THD *thd, uint errcode, ...) #endif va_start(args,errcode); /* - The following is needed to make net_printf() work with 0 argument for - errorcode and use the argument after that as the format string. This + The following is needed to make net_printf_error() work with 0 argument + for errorcode and use the argument after that as the format string. This is useful for rare errors that are not worth the hassle to put in errmsg.sys, but at the same time, the message is not fixed text */ @@ -627,7 +624,8 @@ bool Protocol::send_fields(List<Item> *list, uint flags) DBUG_RETURN(prepare_for_send(list)); err: - send_error(thd,ER_OUT_OF_RESOURCES); /* purecov: inspected */ + my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), + MYF(0)); /* purecov: inspected */ DBUG_RETURN(1); /* purecov: inspected */ } |