summaryrefslogtreecommitdiff
path: root/sql/mini_client.cc
diff options
context:
space:
mode:
authorunknown <monty@work.mysql.com>2001-09-13 09:52:35 +0200
committerunknown <monty@work.mysql.com>2001-09-13 09:52:35 +0200
commitc96bf55b9c8641d4b1c2ece0c0314071bc1022df (patch)
tree1fb0fbca5b7a4edebe2c26a5ed0b272e92bc21f2 /sql/mini_client.cc
parent9e4206b990df875e063a07784c77cc39dc394654 (diff)
parentc88dd9b291cf7fe9086102d74d255f4b880d1486 (diff)
downloadmariadb-git-c96bf55b9c8641d4b1c2ece0c0314071bc1022df.tar.gz
Merge with 3.23.42
configure.in: Auto merged BitKeeper/deleted/.del-violite.c~d7b85be615595ace: Auto merged BitKeeper/deleted/.del-violite.c~984c09cffe14a11b: Auto merged client/Makefile.am: Auto merged client/mysql.cc: Auto merged client/mysqlbinlog.cc: Auto merged heap/hp_test2.c: Auto merged include/global.h: Auto merged include/my_pthread.h: Auto merged include/myisam.h: Auto merged libmysql/libmysql.c: Auto merged libmysql/net.c: Auto merged myisam/sort.c: Auto merged sql-bench/test-create.sh: Auto merged sql/handler.cc: Auto merged sql/handler.h: Auto merged sql/lock.cc: Auto merged sql/log_event.cc: Auto merged sql/mini_client.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/net_serv.cc: Auto merged mysql-test/t/merge.test: Auto merged sql/ha_innobase.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_table.cc: Auto merged support-files/mysql.spec.sh: Auto merged mysql-test/t/bdb.test: Auto merged Docs/manual.texi: merge myisam/myisampack.c: merge
Diffstat (limited to 'sql/mini_client.cc')
-rw-r--r--sql/mini_client.cc12
1 files changed, 3 insertions, 9 deletions
diff --git a/sql/mini_client.cc b/sql/mini_client.cc
index 994f788f423..09944959673 100644
--- a/sql/mini_client.cc
+++ b/sql/mini_client.cc
@@ -117,16 +117,10 @@ static MYSQL_DATA *mc_read_rows(MYSQL *mysql,MYSQL_FIELD *mysql_fields,
#define CLIENT_CAPABILITIES (CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG | CLIENT_LOCAL_FILES)
#if defined(MSDOS) || defined(__WIN__)
-#define ERRNO WSAGetLastError()
#define perror(A)
-#elif defined(OS2)
-#define ERRNO sock_errno()
-#define SOCKET_ERROR -1
#else
-#include <sys/errno.h>
-#define ERRNO errno
+#include <errno.h>
#define SOCKET_ERROR -1
-#define closesocket(A) close(A)
#endif
#ifdef __WIN__
@@ -370,7 +364,7 @@ mc_net_safe_read(MYSQL *mysql)
{
DBUG_PRINT("error",("Wrong connection or packet. fd: %s len: %d",
vio_description(net->vio),len));
- if (socket_errno != EINTR)
+ if (socket_errno != SOCKET_EINTR)
{
mc_end_server(mysql);
if(net->last_errno != ER_NET_PACKET_TOO_LARGE)
@@ -563,7 +557,7 @@ mc_mysql_connect(MYSQL *mysql,const char *host, const char *user,
if ((sock = socket(AF_UNIX,SOCK_STREAM,0)) == SOCKET_ERROR)
{
net->last_errno=CR_SOCKET_CREATE_ERROR;
- sprintf(net->last_error,ER(net->last_errno),ERRNO);
+ sprintf(net->last_error,ER(net->last_errno),socket_errno);
goto error;
}
net->vio = vio_new(sock, VIO_TYPE_SOCKET, TRUE);