|
|||||||||||
|
bk commit into 5.1 tree (kostja:1.2606)
From: <konstantin(at)mysql.com>
Date: Wed Oct 31 2007 - 16:48:49 EDT
ChangeSet@1.2606, 2007-10-31 23:48:41+03:00, kostja@bodhi.(none) +1 -0 Try to fix a Windows compilation warning. sql-common/client.c@1.145, 2007-10-31 23:48:37+03:00, kostja@bodhi.(none) +70 -55 Move a block of auxiliary functions to the beginning of the file, to avoid compilation warnings on Windows. Add comments, albeit trivial, while we're at it. diff -Nrup a/sql-common/client.c b/sql-common/client.c --- a/sql-common/client.c 2007-10-31 18:33:06 +03:00@@ -272,6 +272,76 @@ static int wait_for_data(my_socket fd, u } #endif /* defined(__WIN__) || defined(__NETWARE__) */ +/**
/*
mysql->info= 0;
-
-/*
- Set the internal error message to mysql handler
-*/
-
-void set_mysql_error(MYSQL *mysql, int errcode, const char *sqlstate)
-{
- NET *net;
- DBUG_ENTER("set_mysql_error");
- DBUG_PRINT("enter", ("error :%d '%s'", errcode, ER(errcode)));
- DBUG_ASSERT(mysql != 0);
-
- net= &mysql->net;
- net->last_errno= errcode;
- strmov(net->last_error, ER(errcode));
- strmov(net->sqlstate, sqlstate);
-
- DBUG_VOID_RETURN;
-}
-
-/**
- Clear possible error state of struct NET
-
- @param net clear the state of the argument
-*/
-
-void net_clear_error(NET *net)
-{
- net->last_errno= 0;
- net->last_error[0]= '\0';
- strmov(net->sqlstate, not_error_sqlstate);
-}
-
-
-static void set_mysql_extended_error(MYSQL *mysql, int errcode,
- const char *sqlstate,
- const char *format, ...)
-{
- NET *net;
- va_list args;
- DBUG_ENTER("set_mysql_extended_error");
- DBUG_PRINT("enter", ("error :%d '%s'", errcode, format));
- DBUG_ASSERT(mysql != 0);
-
- net= &mysql->net;
- net->last_errno= errcode;
- va_start(args, format);
- my_vsnprintf(net->last_error, sizeof(net->last_error)-1,
- format, args);
- va_end(args);
- strmov(net->sqlstate, sqlstate);
-
- DBUG_VOID_RETURN;
-}
-
/*
-- MySQL Code Commits Mailing List For list archives: http://lists.mysql.com/commits To unsubscribe: http://lists.mysql.com/commits?unsub=lists@pantek.comReceived on Wed Oct 31 16:49:13 2007 This archive was generated by hypermail 2.1.8 : Thu Jul 03 2008 - 11:14:48 EDT |
||||||||||
|
|||||||||||