summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorunknown <davi@mysql.com/endora.local>2008-02-28 14:55:46 -0300
committerunknown <davi@mysql.com/endora.local>2008-02-28 14:55:46 -0300
commit33a4e7609095388099bb3048778a5b5d164d26fa (patch)
tree403f098823cf42179ec9f51f5bd0ccab5fc77112 /libmysql
parent944f2599fedfaa7c9a4348a2fd505419eb59a5b6 (diff)
downloadmariadb-git-33a4e7609095388099bb3048778a5b5d164d26fa.tar.gz
Bug#34655 Compile error
Rename client_last_error to last_error and client_last_errno to last_errno to not break connectors which use the internal net structure for error handling. include/mysql_com.h: Rename client_last_error to last_error, client_last_errno to last_errno. include/mysql_h.ic: Rename client_last_error to last_error, client_last_errno to last_errno. libmysql/libmysql.c: Rename client_last_error to last_error, client_last_errno to last_errno. libmysql/manager.c: Rename client_last_error to last_error, client_last_errno to last_errno. libmysqld/lib_sql.cc: Rename client_last_error to last_error, client_last_errno to last_errno. libmysqld/libmysqld.c: Rename client_last_error to last_error, client_last_errno to last_errno. server-tools/instance-manager/mysql_connection.cc: Rename client_last_error to last_error, client_last_errno to last_errno. sql/log_event.cc: Rename client_last_error to last_error, client_last_errno to last_errno. sql-common/client.c: Rename client_last_error to last_error, client_last_errno to last_errno. sql/log_event_old.cc: Rename client_last_error to last_error, client_last_errno to last_errno. sql/net_serv.cc: Rename client_last_error to last_error, client_last_errno to last_errno. sql/repl_failsafe.cc: Rename client_last_error to last_error, client_last_errno to last_errno.
Diffstat (limited to 'libmysql')
-rw-r--r--libmysql/libmysql.c36
-rw-r--r--libmysql/manager.c2
2 files changed, 19 insertions, 19 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index 06eae528574..d79910a2ef4 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -440,11 +440,11 @@ static void expand_error(MYSQL* mysql, int error)
char tmp[MYSQL_ERRMSG_SIZE];
char *p;
uint err_length;
- strmake(tmp, mysql->net.client_last_error, MYSQL_ERRMSG_SIZE-1);
- p = strmake(mysql->net.client_last_error, ER(error), MYSQL_ERRMSG_SIZE-1);
- err_length= (uint) (p - mysql->net.client_last_error);
+ strmake(tmp, mysql->net.last_error, MYSQL_ERRMSG_SIZE-1);
+ p = strmake(mysql->net.last_error, ER(error), MYSQL_ERRMSG_SIZE-1);
+ err_length= (uint) (p - mysql->net.last_error);
strmake(p, tmp, MYSQL_ERRMSG_SIZE-1 - err_length);
- mysql->net.client_last_errno = error;
+ mysql->net.last_errno = error;
}
/*
@@ -870,10 +870,10 @@ my_bool handle_local_infile(MYSQL *mysql, const char *net_filename)
VOID(my_net_write(net,(const uchar*) "",0)); /* Server needs one packet */
net_flush(net);
strmov(net->sqlstate, unknown_sqlstate);
- net->client_last_errno=
+ net->last_errno=
(*options->local_infile_error)(li_ptr,
- net->client_last_error,
- sizeof(net->client_last_error)-1);
+ net->last_error,
+ sizeof(net->last_error)-1);
goto err;
}
@@ -900,10 +900,10 @@ my_bool handle_local_infile(MYSQL *mysql, const char *net_filename)
if (readcount < 0)
{
- net->client_last_errno=
+ net->last_errno=
(*options->local_infile_error)(li_ptr,
- net->client_last_error,
- sizeof(net->client_last_error)-1);
+ net->last_error,
+ sizeof(net->last_error)-1);
goto err;
}
@@ -1397,7 +1397,7 @@ const char *cli_read_statistics(MYSQL *mysql)
if (!mysql->net.read_pos[0])
{
set_mysql_error(mysql, CR_WRONG_HOST_INFO, unknown_sqlstate);
- return mysql->net.client_last_error;
+ return mysql->net.last_error;
}
return (char*) mysql->net.read_pos;
}
@@ -1408,7 +1408,7 @@ mysql_stat(MYSQL *mysql)
{
DBUG_ENTER("mysql_stat");
if (simple_command(mysql,COM_STATISTICS,0,0,0))
- DBUG_RETURN(mysql->net.client_last_error);
+ DBUG_RETURN(mysql->net.last_error);
DBUG_RETURN((*mysql->methods->read_statistics)(mysql));
}
@@ -1773,7 +1773,7 @@ static my_bool my_realloc_str(NET *net, ulong length)
if (res)
{
strmov(net->sqlstate, unknown_sqlstate);
- strmov(net->client_last_error, ER(net->client_last_errno));
+ strmov(net->last_error, ER(net->last_errno));
}
net->write_pos= net->buff+ buf_length;
}
@@ -1825,14 +1825,14 @@ void set_stmt_errmsg(MYSQL_STMT *stmt, NET *net)
{
DBUG_ENTER("set_stmt_errmsg");
DBUG_PRINT("enter", ("error: %d/%s '%s'",
- net->client_last_errno,
+ net->last_errno,
net->sqlstate,
- net->client_last_error));
+ net->last_error));
DBUG_ASSERT(stmt != 0);
- stmt->last_errno= net->client_last_errno;
- if (net->client_last_error && net->client_last_error[0])
- strmov(stmt->last_error, net->client_last_error);
+ stmt->last_errno= net->last_errno;
+ if (net->last_error && net->last_error[0])
+ strmov(stmt->last_error, net->last_error);
strmov(stmt->sqlstate, net->sqlstate);
DBUG_VOID_RETURN;
diff --git a/libmysql/manager.c b/libmysql/manager.c
index 27d35758f3e..53ffffa55c0 100644
--- a/libmysql/manager.c
+++ b/libmysql/manager.c
@@ -160,7 +160,7 @@ MYSQL_MANAGER* STDCALL mysql_manager_connect(MYSQL_MANAGER* con,
msg_len=strlen(msg_buf);
if (my_net_write(&con->net,(uchar*) msg_buf,msg_len) || net_flush(&con->net))
{
- con->last_errno=con->net.client_last_errno;
+ con->last_errno=con->net.last_errno;
strmov(con->last_error,"Write error on socket");
goto err;
}