1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-08 14:02:17 +03:00

More 10.2-integ fixes:

- renamed my_net functions (ma_net)
- fixed wrong types in ma_schannel.c
- fixed wrong parameter in client_plugin when building load string
This commit is contained in:
Georg Richter
2016-02-17 10:00:53 +01:00
parent 7287229676
commit d303cf76a7
10 changed files with 74 additions and 75 deletions

View File

@@ -201,8 +201,8 @@ my_bool mysql_handle_local_infile(MYSQL *conn, const char *filename)
if (!(conn->options.client_flag & CLIENT_LOCAL_FILES)) {
my_set_error(conn, CR_UNKNOWN_ERROR, SQLSTATE_UNKNOWN, "Load data local infile forbidden");
/* write empty packet to server */
my_net_write(&conn->net, "", 0);
net_flush(&conn->net);
ma_net_write(&conn->net, "", 0);
ma_net_flush(&conn->net);
goto infile_error;
}
@@ -218,15 +218,15 @@ my_bool mysql_handle_local_infile(MYSQL *conn, const char *filename)
tmp_errno= conn->options.local_infile_error(info, tmp_buf, sizeof(tmp_buf));
my_set_error(conn, tmp_errno, SQLSTATE_UNKNOWN, tmp_buf);
my_net_write(&conn->net, "", 0);
net_flush(&conn->net);
ma_net_write(&conn->net, "", 0);
ma_net_flush(&conn->net);
goto infile_error;
}
/* read data */
while ((bufread= conn->options.local_infile_read(info, (char *)buf, buflen)) > 0)
{
if (my_net_write(&conn->net, (char *)buf, bufread))
if (ma_net_write(&conn->net, (char *)buf, bufread))
{
my_set_error(conn, CR_SERVER_LOST, SQLSTATE_UNKNOWN, NULL);
goto infile_error;
@@ -234,7 +234,7 @@ my_bool mysql_handle_local_infile(MYSQL *conn, const char *filename)
}
/* send empty packet for eof */
if (my_net_write(&conn->net, "", 0) || net_flush(&conn->net))
if (ma_net_write(&conn->net, "", 0) || ma_net_flush(&conn->net))
{
my_set_error(conn, CR_SERVER_LOST, SQLSTATE_UNKNOWN, NULL);
goto infile_error;