mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
MNDR:
- make MYSQLND_ERROR_INFO a class
This commit is contained in:
parent
fb1b5abe31
commit
4bb784cd0d
13 changed files with 396 additions and 349 deletions
|
@ -176,7 +176,7 @@ mysqlnd_handle_local_infile(MYSQLND_CONN_DATA * conn, const char * filename, zen
|
|||
*is_warning = TRUE;
|
||||
/* error occurred */
|
||||
tmp_error_no = infile.local_infile_error(info, tmp_buf, sizeof(tmp_buf));
|
||||
SET_CLIENT_ERROR(*conn->error_info, tmp_error_no, UNKNOWN_SQLSTATE, tmp_buf);
|
||||
SET_CLIENT_ERROR(conn->error_info, tmp_error_no, UNKNOWN_SQLSTATE, tmp_buf);
|
||||
/* write empty packet to server */
|
||||
ret = net->data->m.send_ex(net, empty_packet, 0, conn->stats, conn->error_info);
|
||||
goto infile_error;
|
||||
|
@ -186,14 +186,14 @@ mysqlnd_handle_local_infile(MYSQLND_CONN_DATA * conn, const char * filename, zen
|
|||
while ((bufsize = infile.local_infile_read (info, buf + MYSQLND_HEADER_SIZE, buflen - MYSQLND_HEADER_SIZE)) > 0) {
|
||||
if ((ret = net->data->m.send_ex(net, buf, bufsize, conn->stats, conn->error_info)) == 0) {
|
||||
DBG_ERR_FMT("Error during read : %d %s %s", CR_SERVER_LOST, UNKNOWN_SQLSTATE, lost_conn);
|
||||
SET_CLIENT_ERROR(*conn->error_info, CR_SERVER_LOST, UNKNOWN_SQLSTATE, lost_conn);
|
||||
SET_CLIENT_ERROR(conn->error_info, CR_SERVER_LOST, UNKNOWN_SQLSTATE, lost_conn);
|
||||
goto infile_error;
|
||||
}
|
||||
}
|
||||
|
||||
/* send empty packet for eof */
|
||||
if ((ret = net->data->m.send_ex(net, empty_packet, 0, conn->stats, conn->error_info)) == 0) {
|
||||
SET_CLIENT_ERROR(*conn->error_info, CR_SERVER_LOST, UNKNOWN_SQLSTATE, lost_conn);
|
||||
SET_CLIENT_ERROR(conn->error_info, CR_SERVER_LOST, UNKNOWN_SQLSTATE, lost_conn);
|
||||
goto infile_error;
|
||||
}
|
||||
|
||||
|
@ -204,7 +204,7 @@ mysqlnd_handle_local_infile(MYSQLND_CONN_DATA * conn, const char * filename, zen
|
|||
*is_warning = TRUE;
|
||||
DBG_ERR_FMT("Bufsize < 0, warning, %d %s %s", CR_SERVER_LOST, UNKNOWN_SQLSTATE, lost_conn);
|
||||
tmp_error_no = infile.local_infile_error(info, tmp_buf, sizeof(tmp_buf));
|
||||
SET_CLIENT_ERROR(*conn->error_info, tmp_error_no, UNKNOWN_SQLSTATE, tmp_buf);
|
||||
SET_CLIENT_ERROR(conn->error_info, tmp_error_no, UNKNOWN_SQLSTATE, tmp_buf);
|
||||
goto infile_error;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue