diff options
author | Andrey Hristov <andrey@php.net> | 2015-10-02 14:23:15 +0200 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 2015-11-12 16:19:16 +0100 |
commit | 6051a477762c030dfdc7f2bf4cfecd2a54d0ab2a (patch) | |
tree | dbdd6287003b7d9a4c2858eb8b848b9fa0f86c8d /ext/mysqlnd/mysqlnd_ps.c | |
parent | 0f38d479e16f41ce401094dc4658030832f23937 (diff) | |
download | php-git-6051a477762c030dfdc7f2bf4cfecd2a54d0ab2a.tar.gz |
MNDR
- Rename simple_command* to send_command
Diffstat (limited to 'ext/mysqlnd/mysqlnd_ps.c')
-rw-r--r-- | ext/mysqlnd/mysqlnd_ps.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/ext/mysqlnd/mysqlnd_ps.c b/ext/mysqlnd/mysqlnd_ps.c index 767ba34ab0..3bc03fbe2f 100644 --- a/ext/mysqlnd/mysqlnd_ps.c +++ b/ext/mysqlnd/mysqlnd_ps.c @@ -417,7 +417,7 @@ MYSQLND_METHOD(mysqlnd_stmt, prepare)(MYSQLND_STMT * const s, const char * const stmt_to_prepare = s_to_prepare->data; } - if (FAIL == stmt_to_prepare->conn->m->simple_command(stmt_to_prepare->conn, COM_STMT_PREPARE, (const zend_uchar *) query, query_len, PROT_LAST, FALSE, TRUE) || + if (FAIL == stmt_to_prepare->conn->m->send_command(stmt_to_prepare->conn, COM_STMT_PREPARE, (const zend_uchar *) query, query_len, PROT_LAST, FALSE, TRUE) || FAIL == mysqlnd_stmt_read_prepare_response(s_to_prepare)) { goto fail; @@ -723,9 +723,9 @@ MYSQLND_METHOD(mysqlnd_stmt, send_execute)(MYSQLND_STMT * const s, enum_mysqlnd_ ret = s->m->generate_execute_request(s, &request, &request_len, &free_request); if (ret == PASS) { /* support for buffer types should be added here ! */ - ret = stmt->conn->m->simple_command(stmt->conn, COM_STMT_EXECUTE, request, request_len, - PROT_LAST /* we will handle the response packet*/, - FALSE, FALSE); + ret = stmt->conn->m->send_command(stmt->conn, COM_STMT_EXECUTE, request, request_len, + PROT_LAST /* we will handle the response packet*/, + FALSE, FALSE); } else { SET_STMT_ERROR(stmt, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, "Couldn't generate the request. Possibly OOM."); } @@ -1057,9 +1057,9 @@ mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES * result, void * param, unsigned int f int4store(buf, stmt->stmt_id); int4store(buf + STMT_ID_LENGTH, 1); /* for now fetch only one row */ - if (FAIL == stmt->conn->m->simple_command(stmt->conn, COM_STMT_FETCH, buf, sizeof(buf), - PROT_LAST /* we will handle the response packet*/, - FALSE, TRUE)) { + if (FAIL == stmt->conn->m->send_command(stmt->conn, COM_STMT_FETCH, buf, sizeof(buf), + PROT_LAST /* we will handle the response packet*/, + FALSE, TRUE)) { COPY_CLIENT_ERROR(*stmt->error_info, *stmt->conn->error_info); DBG_RETURN(FAIL); } @@ -1264,9 +1264,9 @@ MYSQLND_METHOD(mysqlnd_stmt, reset)(MYSQLND_STMT * const s) int4store(cmd_buf, stmt->stmt_id); if (CONN_GET_STATE(conn) == CONN_READY && - FAIL == (ret = conn->m->simple_command(conn, COM_STMT_RESET, cmd_buf, - sizeof(cmd_buf), PROT_OK_PACKET, - FALSE, TRUE))) { + FAIL == (ret = conn->m->send_command(conn, COM_STMT_RESET, cmd_buf, + sizeof(cmd_buf), PROT_OK_PACKET, + FALSE, TRUE))) { COPY_CLIENT_ERROR(*stmt->error_info, *conn->error_info); } *stmt->upsert_status = *conn->upsert_status; @@ -1362,7 +1362,7 @@ MYSQLND_METHOD(mysqlnd_stmt, send_long_data)(MYSQLND_STMT * const s, unsigned in XXX: Unfortunately we have to allocate additional buffer to be able the additional data, which is like a header inside the payload. This should be optimised, but it will be a pervasive change, so - conn->m->simple_command() will accept not a buffer, but actually MYSQLND_STRING* + conn->m->send_command() will accept not a buffer, but actually MYSQLND_STRING* terminated by NULL, to send. If the strings are not big, we can collapse them on the buffer every connection has, but otherwise we will just send them one by one to the wire. @@ -1379,7 +1379,7 @@ MYSQLND_METHOD(mysqlnd_stmt, send_long_data)(MYSQLND_STMT * const s, unsigned in memcpy(cmd_buf + STMT_ID_LENGTH + 2, data, length); /* COM_STMT_SEND_LONG_DATA doesn't send an OK packet*/ - ret = conn->m->simple_command(conn, cmd, cmd_buf, packet_len, PROT_LAST , FALSE, TRUE); + ret = conn->m->send_command(conn, cmd, cmd_buf, packet_len, PROT_LAST , FALSE, TRUE); mnd_efree(cmd_buf); if (FAIL == ret) { COPY_CLIENT_ERROR(*stmt->error_info, *conn->error_info); @@ -2199,9 +2199,9 @@ MYSQLND_METHOD_PRIVATE(mysqlnd_stmt, net_close)(MYSQLND_STMT * const s, zend_boo int4store(cmd_buf, stmt->stmt_id); if (CONN_GET_STATE(conn) == CONN_READY && - FAIL == conn->m->simple_command(conn, COM_STMT_CLOSE, cmd_buf, sizeof(cmd_buf), - PROT_LAST /* COM_STMT_CLOSE doesn't send an OK packet*/, - FALSE, TRUE)) { + FAIL == conn->m->send_command(conn, COM_STMT_CLOSE, cmd_buf, sizeof(cmd_buf), + PROT_LAST /* COM_STMT_CLOSE doesn't send an OK packet*/, + FALSE, TRUE)) { COPY_CLIENT_ERROR(*stmt->error_info, *conn->error_info); DBG_RETURN(FAIL); } |