mirror of
https://github.com/php/php-src.git
synced 2025-01-26 13:44:22 +08:00
Pass tsrmls to all functions, which might need it in the future.
We are anyway breaking the internal ABI in 5.3.2 so this won't hurt and make us prepared for the future.
This commit is contained in:
parent
3247c2595d
commit
e50de7d982
@ -397,8 +397,7 @@ MYSQLND_METHOD(mysqlnd_conn, simple_command)(MYSQLND *conn, enum php_mysqlnd_ser
|
||||
|
||||
/* {{{ mysqlnd_conn::set_server_option */
|
||||
static enum_func_status
|
||||
MYSQLND_METHOD(mysqlnd_conn, set_server_option)(MYSQLND * const conn,
|
||||
enum_mysqlnd_server_option option TSRMLS_DC)
|
||||
MYSQLND_METHOD(mysqlnd_conn, set_server_option)(MYSQLND * const conn, enum_mysqlnd_server_option option TSRMLS_DC)
|
||||
{
|
||||
enum_func_status ret;
|
||||
char buffer[2];
|
||||
@ -1108,8 +1107,7 @@ MYSQLND_METHOD(mysqlnd_conn, list_fields)(MYSQLND *conn, const char *table, cons
|
||||
|
||||
/* {{{ mysqlnd_conn::list_method */
|
||||
MYSQLND_RES *
|
||||
MYSQLND_METHOD(mysqlnd_conn, list_method)(MYSQLND *conn, const char *query,
|
||||
const char *achtung_wild, char *par1 TSRMLS_DC)
|
||||
MYSQLND_METHOD(mysqlnd_conn, list_method)(MYSQLND *conn, const char *query, const char *achtung_wild, char *par1 TSRMLS_DC)
|
||||
{
|
||||
char *show_query = NULL;
|
||||
size_t show_query_len;
|
||||
@ -1145,7 +1143,7 @@ MYSQLND_METHOD(mysqlnd_conn, list_method)(MYSQLND *conn, const char *query,
|
||||
|
||||
/* {{{ mysqlnd_conn::errno */
|
||||
static unsigned int
|
||||
MYSQLND_METHOD(mysqlnd_conn, errno)(const MYSQLND * const conn)
|
||||
MYSQLND_METHOD(mysqlnd_conn, errno)(const MYSQLND * const conn TSRMLS_DC)
|
||||
{
|
||||
return conn->error_info.error_no;
|
||||
}
|
||||
@ -1154,7 +1152,7 @@ MYSQLND_METHOD(mysqlnd_conn, errno)(const MYSQLND * const conn)
|
||||
|
||||
/* {{{ mysqlnd_conn::error */
|
||||
static const char *
|
||||
MYSQLND_METHOD(mysqlnd_conn, error)(const MYSQLND * const conn)
|
||||
MYSQLND_METHOD(mysqlnd_conn, error)(const MYSQLND * const conn TSRMLS_DC)
|
||||
{
|
||||
return conn->error_info.error;
|
||||
}
|
||||
@ -1163,7 +1161,7 @@ MYSQLND_METHOD(mysqlnd_conn, error)(const MYSQLND * const conn)
|
||||
|
||||
/* {{{ mysqlnd_conn::sqlstate */
|
||||
static const char *
|
||||
MYSQLND_METHOD(mysqlnd_conn, sqlstate)(const MYSQLND * const conn)
|
||||
MYSQLND_METHOD(mysqlnd_conn, sqlstate)(const MYSQLND * const conn TSRMLS_DC)
|
||||
{
|
||||
return conn->error_info.sqlstate[0] ? conn->error_info.sqlstate:MYSQLND_SQLSTATE_NULL;
|
||||
}
|
||||
@ -1182,8 +1180,7 @@ PHPAPI ulong mysqlnd_old_escape_string(char *newstr, const char *escapestr, size
|
||||
|
||||
/* {{{ mysqlnd_conn::escape_string */
|
||||
static ulong
|
||||
MYSQLND_METHOD(mysqlnd_conn, escape_string)(const MYSQLND * const conn, char *newstr,
|
||||
const char *escapestr, size_t escapestr_len TSRMLS_DC)
|
||||
MYSQLND_METHOD(mysqlnd_conn, escape_string)(const MYSQLND * const conn, char *newstr, const char *escapestr, size_t escapestr_len TSRMLS_DC)
|
||||
{
|
||||
DBG_ENTER("mysqlnd_conn::escape_string");
|
||||
DBG_INF_FMT("conn=%llu", conn->thread_id);
|
||||
@ -1208,9 +1205,7 @@ MYSQLND_METHOD(mysqlnd_conn, dump_debug_info)(MYSQLND * const conn TSRMLS_DC)
|
||||
|
||||
/* {{{ mysqlnd_conn::select_db */
|
||||
static enum_func_status
|
||||
MYSQLND_METHOD(mysqlnd_conn, select_db)(MYSQLND * const conn,
|
||||
const char * const db,
|
||||
unsigned int db_len TSRMLS_DC)
|
||||
MYSQLND_METHOD(mysqlnd_conn, select_db)(MYSQLND * const conn, const char * const db, unsigned int db_len TSRMLS_DC)
|
||||
{
|
||||
enum_func_status ret;
|
||||
|
||||
@ -1529,7 +1524,7 @@ MYSQLND_METHOD_PRIVATE(mysqlnd_conn, set_state)(MYSQLND * const conn, enum mysql
|
||||
|
||||
/* {{{ mysqlnd_conn::field_count */
|
||||
static unsigned int
|
||||
MYSQLND_METHOD(mysqlnd_conn, field_count)(const MYSQLND * const conn)
|
||||
MYSQLND_METHOD(mysqlnd_conn, field_count)(const MYSQLND * const conn TSRMLS_DC)
|
||||
{
|
||||
return conn->field_count;
|
||||
}
|
||||
@ -1538,7 +1533,7 @@ MYSQLND_METHOD(mysqlnd_conn, field_count)(const MYSQLND * const conn)
|
||||
|
||||
/* {{{ mysqlnd_conn::insert_id */
|
||||
static uint64_t
|
||||
MYSQLND_METHOD(mysqlnd_conn, insert_id)(const MYSQLND * const conn)
|
||||
MYSQLND_METHOD(mysqlnd_conn, insert_id)(const MYSQLND * const conn TSRMLS_DC)
|
||||
{
|
||||
return conn->upsert_status.last_insert_id;
|
||||
}
|
||||
@ -1547,7 +1542,7 @@ MYSQLND_METHOD(mysqlnd_conn, insert_id)(const MYSQLND * const conn)
|
||||
|
||||
/* {{{ mysqlnd_conn::affected_rows */
|
||||
static uint64_t
|
||||
MYSQLND_METHOD(mysqlnd_conn, affected_rows)(const MYSQLND * const conn)
|
||||
MYSQLND_METHOD(mysqlnd_conn, affected_rows)(const MYSQLND * const conn TSRMLS_DC)
|
||||
{
|
||||
return conn->upsert_status.affected_rows;
|
||||
}
|
||||
@ -1556,7 +1551,7 @@ MYSQLND_METHOD(mysqlnd_conn, affected_rows)(const MYSQLND * const conn)
|
||||
|
||||
/* {{{ mysqlnd_conn::warning_count */
|
||||
static unsigned int
|
||||
MYSQLND_METHOD(mysqlnd_conn, warning_count)(const MYSQLND * const conn)
|
||||
MYSQLND_METHOD(mysqlnd_conn, warning_count)(const MYSQLND * const conn TSRMLS_DC)
|
||||
{
|
||||
return conn->upsert_status.warning_count;
|
||||
}
|
||||
@ -1565,7 +1560,7 @@ MYSQLND_METHOD(mysqlnd_conn, warning_count)(const MYSQLND * const conn)
|
||||
|
||||
/* {{{ mysqlnd_conn::info */
|
||||
static const char *
|
||||
MYSQLND_METHOD(mysqlnd_conn, info)(const MYSQLND * const conn)
|
||||
MYSQLND_METHOD(mysqlnd_conn, info)(const MYSQLND * const conn TSRMLS_DC)
|
||||
{
|
||||
return conn->last_message;
|
||||
}
|
||||
@ -1590,7 +1585,7 @@ PHPAPI unsigned int mysqlnd_get_client_version()
|
||||
|
||||
/* {{{ mysqlnd_conn::get_server_info */
|
||||
static const char *
|
||||
MYSQLND_METHOD(mysqlnd_conn, get_server_info)(const MYSQLND * const conn)
|
||||
MYSQLND_METHOD(mysqlnd_conn, get_server_info)(const MYSQLND * const conn TSRMLS_DC)
|
||||
{
|
||||
return conn->server_version;
|
||||
}
|
||||
@ -1599,7 +1594,7 @@ MYSQLND_METHOD(mysqlnd_conn, get_server_info)(const MYSQLND * const conn)
|
||||
|
||||
/* {{{ mysqlnd_conn::get_host_info */
|
||||
static const char *
|
||||
MYSQLND_METHOD(mysqlnd_conn, get_host_info)(const MYSQLND * const conn)
|
||||
MYSQLND_METHOD(mysqlnd_conn, get_host_info)(const MYSQLND * const conn TSRMLS_DC)
|
||||
{
|
||||
return conn->host_info;
|
||||
}
|
||||
@ -1608,7 +1603,7 @@ MYSQLND_METHOD(mysqlnd_conn, get_host_info)(const MYSQLND * const conn)
|
||||
|
||||
/* {{{ mysqlnd_conn::get_proto_info */
|
||||
static unsigned int
|
||||
MYSQLND_METHOD(mysqlnd_conn, get_proto_info)(const MYSQLND *const conn)
|
||||
MYSQLND_METHOD(mysqlnd_conn, get_proto_info)(const MYSQLND *const conn TSRMLS_DC)
|
||||
{
|
||||
return conn->protocol_version;
|
||||
}
|
||||
@ -1617,7 +1612,7 @@ MYSQLND_METHOD(mysqlnd_conn, get_proto_info)(const MYSQLND *const conn)
|
||||
|
||||
/* {{{ mysqlnd_conn::charset_name */
|
||||
static const char *
|
||||
MYSQLND_METHOD(mysqlnd_conn, charset_name)(const MYSQLND * const conn)
|
||||
MYSQLND_METHOD(mysqlnd_conn, charset_name)(const MYSQLND * const conn TSRMLS_DC)
|
||||
{
|
||||
return conn->charset->name;
|
||||
}
|
||||
@ -1626,7 +1621,7 @@ MYSQLND_METHOD(mysqlnd_conn, charset_name)(const MYSQLND * const conn)
|
||||
|
||||
/* {{{ mysqlnd_conn::thread_id */
|
||||
static uint64_t
|
||||
MYSQLND_METHOD(mysqlnd_conn, thread_id)(const MYSQLND * const conn)
|
||||
MYSQLND_METHOD(mysqlnd_conn, thread_id)(const MYSQLND * const conn TSRMLS_DC)
|
||||
{
|
||||
return conn->thread_id;
|
||||
}
|
||||
@ -1635,7 +1630,7 @@ MYSQLND_METHOD(mysqlnd_conn, thread_id)(const MYSQLND * const conn)
|
||||
|
||||
/* {{{ mysqlnd_conn::get_server_version */
|
||||
static unsigned long
|
||||
MYSQLND_METHOD(mysqlnd_conn, get_server_version)(const MYSQLND * const conn)
|
||||
MYSQLND_METHOD(mysqlnd_conn, get_server_version)(const MYSQLND * const conn TSRMLS_DC)
|
||||
{
|
||||
long major, minor, patch;
|
||||
char *p;
|
||||
|
@ -162,7 +162,7 @@ PHPAPI enum_func_status _mysqlnd_poll(MYSQLND **r_array, MYSQLND **e_array, MYSQ
|
||||
#define mysqlnd_num_rows(result) ((result)->stored_data? (result)->stored_data->row_count:0)
|
||||
#define mysqlnd_num_fields(result) (result)->field_count
|
||||
|
||||
#define mysqlnd_fetch_lengths(result) ((result)->m.fetch_lengths? (result)->m.fetch_lengths((result)):NULL)
|
||||
#define mysqlnd_fetch_lengths(result) ((result)->m.fetch_lengths? (result)->m.fetch_lengths((result) TSRMLS_CC) : NULL)
|
||||
|
||||
#define mysqlnd_field_seek(result, ofs) (result)->m.seek_field((result), (ofs))
|
||||
#define mysqlnd_field_tell(result) ((result)->meta? (result)->meta->current_field:0)
|
||||
@ -192,31 +192,32 @@ PHPAPI enum_func_status _mysqlnd_poll(MYSQLND **r_array, MYSQLND **e_array, MYSQ
|
||||
/*****************************************************************************************************/
|
||||
|
||||
/* Errors */
|
||||
#define mysqlnd_errno(conn) (conn)->m->get_error_no((conn))
|
||||
#define mysqlnd_error(conn) (conn)->m->get_error_str((conn))
|
||||
#define mysqlnd_sqlstate(conn) (conn)->m->get_sqlstate((conn))
|
||||
#define mysqlnd_errno(conn) (conn)->m->get_error_no((conn) TSRMLS_CC)
|
||||
#define mysqlnd_error(conn) (conn)->m->get_error_str((conn) TSRMLS_CC)
|
||||
#define mysqlnd_sqlstate(conn) (conn)->m->get_sqlstate((conn) TSRMLS_CC)
|
||||
|
||||
/* Charset */
|
||||
#define mysqlnd_character_set_name(conn) (conn)->m->charset_name((conn))
|
||||
#define mysqlnd_character_set_name(conn) (conn)->m->charset_name((conn) TSRMLS_CC)
|
||||
|
||||
/* Simple metadata */
|
||||
#define mysqlnd_field_count(conn) (conn)->m->get_field_count((conn))
|
||||
#define mysqlnd_insert_id(conn) (conn)->m->get_last_insert_id((conn))
|
||||
#define mysqlnd_affected_rows(conn) (conn)->m->get_affected_rows((conn))
|
||||
#define mysqlnd_warning_count(conn) (conn)->m->get_warning_count((conn))
|
||||
#define mysqlnd_info(conn) (conn)->m->get_last_message((conn))
|
||||
#define mysqlnd_get_server_info(conn) (conn)->m->get_server_information((conn))
|
||||
#define mysqlnd_get_host_info(conn) (conn)->m->get_host_information((conn))
|
||||
#define mysqlnd_get_proto_info(conn) (conn)->m->get_protocol_information((conn))
|
||||
#define mysqlnd_thread_id(conn) (conn)->m->get_thread_id((conn))
|
||||
#define mysqlnd_field_count(conn) (conn)->m->get_field_count((conn) TSRMLS_CC)
|
||||
#define mysqlnd_insert_id(conn) (conn)->m->get_last_insert_id((conn) TSRMLS_CC)
|
||||
#define mysqlnd_affected_rows(conn) (conn)->m->get_affected_rows((conn) TSRMLS_CC)
|
||||
#define mysqlnd_warning_count(conn) (conn)->m->get_warning_count((conn) TSRMLS_CC)
|
||||
#define mysqlnd_info(conn) (conn)->m->get_last_message((conn) TSRMLS_CC)
|
||||
#define mysqlnd_get_server_info(conn) (conn)->m->get_server_information((conn) TSRMLS_CC)
|
||||
#define mysqlnd_get_host_info(conn) (conn)->m->get_host_information((conn) TSRMLS_CC)
|
||||
#define mysqlnd_get_proto_info(conn) (conn)->m->get_protocol_information((conn) TSRMLS_CC)
|
||||
#define mysqlnd_thread_id(conn) (conn)->m->get_thread_id((conn) TSRMLS_CC)
|
||||
|
||||
#define mysqlnd_num_rows(result) (result)->m.num_rows((result))
|
||||
#define mysqlnd_num_fields(result) (result)->m.num_fields((result))
|
||||
#define mysqlnd_num_rows(result) (result)->m.num_rows((result) TSRMLS_CC)
|
||||
#define mysqlnd_num_fields(result) (result)->m.num_fields((result) TSRMLS_CC)
|
||||
|
||||
PHPAPI unsigned long * mysqlnd_fetch_lengths(MYSQLND_RES * const result);
|
||||
#define mysqlnd_fetch_lengths(result) _mysqlnd_fetch_lengths((result) TSRMLS_CC)
|
||||
PHPAPI unsigned long * _mysqlnd_fetch_lengths(MYSQLND_RES * const result TSRMLS_DC);
|
||||
|
||||
#define mysqlnd_field_seek(result, ofs) (result)->m.seek_field((result), (ofs))
|
||||
#define mysqlnd_field_tell(result) (result)->m.field_tell((result))
|
||||
#define mysqlnd_field_seek(result, ofs) (result)->m.seek_field((result), (ofs) TSRMLS_CC)
|
||||
#define mysqlnd_field_tell(result) (result)->m.field_tell((result) TSRMLS_CC)
|
||||
#define mysqlnd_fetch_field(result) (result)->m.fetch_field((result) TSRMLS_CC)
|
||||
#define mysqlnd_fetch_field_direct(result,fnr) (result)->m.fetch_field_direct((result), (fnr) TSRMLS_CC)
|
||||
#define mysqlnd_fetch_fields(result) (result)->m.fetch_fields((result) TSRMLS_CC)
|
||||
@ -226,15 +227,15 @@ PHPAPI const char * mysqlnd_get_client_info();
|
||||
PHPAPI unsigned int mysqlnd_get_client_version();
|
||||
|
||||
/* PS */
|
||||
#define mysqlnd_stmt_insert_id(stmt) (stmt)->m->get_last_insert_id((stmt))
|
||||
#define mysqlnd_stmt_affected_rows(stmt) (stmt)->m->get_affected_rows((stmt))
|
||||
#define mysqlnd_stmt_num_rows(stmt) (stmt)->m->get_num_rows((stmt))
|
||||
#define mysqlnd_stmt_param_count(stmt) (stmt)->m->get_param_count((stmt))
|
||||
#define mysqlnd_stmt_field_count(stmt) (stmt)->m->get_field_count((stmt))
|
||||
#define mysqlnd_stmt_warning_count(stmt) (stmt)->m->get_warning_count((stmt))
|
||||
#define mysqlnd_stmt_errno(stmt) (stmt)->m->get_error_no((stmt))
|
||||
#define mysqlnd_stmt_error(stmt) (stmt)->m->get_error_str((stmt))
|
||||
#define mysqlnd_stmt_sqlstate(stmt) (stmt)->m->get_sqlstate((stmt))
|
||||
#define mysqlnd_stmt_insert_id(stmt) (stmt)->m->get_last_insert_id((stmt) TSRMLS_CC)
|
||||
#define mysqlnd_stmt_affected_rows(stmt) (stmt)->m->get_affected_rows((stmt) TSRMLS_CC)
|
||||
#define mysqlnd_stmt_num_rows(stmt) (stmt)->m->get_num_rows((stmt) TSRMLS_CC)
|
||||
#define mysqlnd_stmt_param_count(stmt) (stmt)->m->get_param_count((stmt) TSRMLS_CC)
|
||||
#define mysqlnd_stmt_field_count(stmt) (stmt)->m->get_field_count((stmt) TSRMLS_CC)
|
||||
#define mysqlnd_stmt_warning_count(stmt) (stmt)->m->get_warning_count((stmt) TSRMLS_CC)
|
||||
#define mysqlnd_stmt_errno(stmt) (stmt)->m->get_error_no((stmt) TSRMLS_CC)
|
||||
#define mysqlnd_stmt_error(stmt) (stmt)->m->get_error_str((stmt) TSRMLS_CC)
|
||||
#define mysqlnd_stmt_sqlstate(stmt) (stmt)->m->get_sqlstate((stmt) TSRMLS_CC)
|
||||
#endif /* MYSQLND_USE_OPTIMISATIONS */
|
||||
/*****************************************************************************************************/
|
||||
|
||||
@ -263,7 +264,7 @@ PHPAPI void mysqlnd_set_local_infile_handler(MYSQLND * const conn, const char *
|
||||
#define mysqlnd_kill(conn, pid) (conn)->m->kill_connection((conn), (pid) TSRMLS_CC)
|
||||
#define mysqlnd_refresh(conn, options) (conn)->m->refresh_server((conn), (options) TSRMLS_CC)
|
||||
#define mysqlnd_shutdown(conn, level) (conn)->m->shutdown_server((conn), (level) TSRMLS_CC)
|
||||
#define mysqlnd_get_server_version(conn) (conn)->m->get_server_version((conn))
|
||||
#define mysqlnd_get_server_version(conn) (conn)->m->get_server_version((conn) TSRMLS_CC)
|
||||
#define mysqlnd_set_character_set(conn, cs) (conn)->m->set_charset((conn), (cs) TSRMLS_CC)
|
||||
#define mysqlnd_stat(conn, msg, msg_len) (conn)->m->get_server_statistics((conn), (msg), (msg_len) TSRMLS_CC)
|
||||
#define mysqlnd_options(conn, opt, value) (conn)->m->set_client_option((conn), (opt), (value) TSRMLS_CC)
|
||||
|
@ -304,8 +304,7 @@ mysqlnd_stmt_prepare_read_eof(MYSQLND_STMT *stmt TSRMLS_DC)
|
||||
|
||||
/* {{{ mysqlnd_stmt::prepare */
|
||||
static enum_func_status
|
||||
MYSQLND_METHOD(mysqlnd_stmt, prepare)(MYSQLND_STMT * const stmt, const char * const query,
|
||||
unsigned int query_len TSRMLS_DC)
|
||||
MYSQLND_METHOD(mysqlnd_stmt, prepare)(MYSQLND_STMT * const stmt, const char * const query, unsigned int query_len TSRMLS_DC)
|
||||
{
|
||||
MYSQLND_STMT *stmt_to_prepare = stmt;
|
||||
|
||||
@ -625,8 +624,7 @@ MYSQLND_METHOD(mysqlnd_stmt, execute)(MYSQLND_STMT * const stmt TSRMLS_DC)
|
||||
|
||||
/* {{{ mysqlnd_fetch_stmt_row_buffered */
|
||||
enum_func_status
|
||||
mysqlnd_fetch_stmt_row_buffered(MYSQLND_RES *result, void *param, unsigned int flags,
|
||||
zend_bool *fetched_anything TSRMLS_DC)
|
||||
mysqlnd_fetch_stmt_row_buffered(MYSQLND_RES *result, void *param, unsigned int flags, zend_bool *fetched_anything TSRMLS_DC)
|
||||
{
|
||||
MYSQLND_STMT *stmt = (MYSQLND_STMT *) param;
|
||||
MYSQLND_RES_BUFFERED *set = result->stored_data;
|
||||
@ -721,8 +719,7 @@ mysqlnd_fetch_stmt_row_buffered(MYSQLND_RES *result, void *param, unsigned int f
|
||||
|
||||
/* {{{ mysqlnd_stmt_fetch_row_unbuffered */
|
||||
static enum_func_status
|
||||
mysqlnd_stmt_fetch_row_unbuffered(MYSQLND_RES *result, void *param, unsigned int flags,
|
||||
zend_bool *fetched_anything TSRMLS_DC)
|
||||
mysqlnd_stmt_fetch_row_unbuffered(MYSQLND_RES *result, void *param, unsigned int flags, zend_bool *fetched_anything TSRMLS_DC)
|
||||
{
|
||||
enum_func_status ret;
|
||||
MYSQLND_STMT *stmt = (MYSQLND_STMT *) param;
|
||||
@ -885,8 +882,7 @@ MYSQLND_METHOD(mysqlnd_stmt, use_result)(MYSQLND_STMT *stmt TSRMLS_DC)
|
||||
|
||||
/* {{{ mysqlnd_fetch_row_cursor */
|
||||
enum_func_status
|
||||
mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES *result, void *param, unsigned int flags,
|
||||
zend_bool *fetched_anything TSRMLS_DC)
|
||||
mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES *result, void *param, unsigned int flags, zend_bool *fetched_anything TSRMLS_DC)
|
||||
{
|
||||
enum_func_status ret;
|
||||
MYSQLND_STMT *stmt = (MYSQLND_STMT *) param;
|
||||
@ -1027,8 +1023,7 @@ mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES *result, void *param, unsigned int fla
|
||||
|
||||
/* {{{ mysqlnd_stmt::fetch */
|
||||
static enum_func_status
|
||||
MYSQLND_METHOD(mysqlnd_stmt, fetch)(MYSQLND_STMT * const stmt,
|
||||
zend_bool * const fetched_anything TSRMLS_DC)
|
||||
MYSQLND_METHOD(mysqlnd_stmt, fetch)(MYSQLND_STMT * const stmt, zend_bool * const fetched_anything TSRMLS_DC)
|
||||
{
|
||||
enum_func_status ret;
|
||||
DBG_ENTER("mysqlnd_stmt::fetch");
|
||||
@ -1245,8 +1240,7 @@ MYSQLND_METHOD(mysqlnd_stmt, send_long_data)(MYSQLND_STMT * const stmt, unsigned
|
||||
|
||||
/* {{{ mysqlnd_stmt::bind_parameters */
|
||||
static enum_func_status
|
||||
MYSQLND_METHOD(mysqlnd_stmt, bind_parameters)(MYSQLND_STMT * const stmt,
|
||||
MYSQLND_PARAM_BIND * const param_bind TSRMLS_DC)
|
||||
MYSQLND_METHOD(mysqlnd_stmt, bind_parameters)(MYSQLND_STMT * const stmt, MYSQLND_PARAM_BIND * const param_bind TSRMLS_DC)
|
||||
{
|
||||
DBG_ENTER("mysqlnd_stmt::bind_param");
|
||||
DBG_INF_FMT("stmt=%lu param_count=%u", stmt->stmt_id, stmt->param_count);
|
||||
@ -1512,7 +1506,7 @@ MYSQLND_METHOD(mysqlnd_stmt, set_result_bind_dtor)(MYSQLND_STMT * const stmt,
|
||||
|
||||
/* {{{ mysqlnd_stmt::insert_id */
|
||||
static uint64_t
|
||||
MYSQLND_METHOD(mysqlnd_stmt, insert_id)(const MYSQLND_STMT * const stmt)
|
||||
MYSQLND_METHOD(mysqlnd_stmt, insert_id)(const MYSQLND_STMT * const stmt TSRMLS_DC)
|
||||
{
|
||||
return stmt->upsert_status.last_insert_id;
|
||||
}
|
||||
@ -1521,7 +1515,7 @@ MYSQLND_METHOD(mysqlnd_stmt, insert_id)(const MYSQLND_STMT * const stmt)
|
||||
|
||||
/* {{{ mysqlnd_stmt::affected_rows */
|
||||
static uint64_t
|
||||
MYSQLND_METHOD(mysqlnd_stmt, affected_rows)(const MYSQLND_STMT * const stmt)
|
||||
MYSQLND_METHOD(mysqlnd_stmt, affected_rows)(const MYSQLND_STMT * const stmt TSRMLS_DC)
|
||||
{
|
||||
return stmt->upsert_status.affected_rows;
|
||||
}
|
||||
@ -1530,7 +1524,7 @@ MYSQLND_METHOD(mysqlnd_stmt, affected_rows)(const MYSQLND_STMT * const stmt)
|
||||
|
||||
/* {{{ mysqlnd_stmt::num_rows */
|
||||
static uint64_t
|
||||
MYSQLND_METHOD(mysqlnd_stmt, num_rows)(const MYSQLND_STMT * const stmt)
|
||||
MYSQLND_METHOD(mysqlnd_stmt, num_rows)(const MYSQLND_STMT * const stmt TSRMLS_DC)
|
||||
{
|
||||
return stmt->result? mysqlnd_num_rows(stmt->result):0;
|
||||
}
|
||||
@ -1539,7 +1533,7 @@ MYSQLND_METHOD(mysqlnd_stmt, num_rows)(const MYSQLND_STMT * const stmt)
|
||||
|
||||
/* {{{ mysqlnd_stmt::warning_count */
|
||||
static unsigned int
|
||||
MYSQLND_METHOD(mysqlnd_stmt, warning_count)(const MYSQLND_STMT * const stmt)
|
||||
MYSQLND_METHOD(mysqlnd_stmt, warning_count)(const MYSQLND_STMT * const stmt TSRMLS_DC)
|
||||
{
|
||||
return stmt->upsert_status.warning_count;
|
||||
}
|
||||
@ -1548,7 +1542,7 @@ MYSQLND_METHOD(mysqlnd_stmt, warning_count)(const MYSQLND_STMT * const stmt)
|
||||
|
||||
/* {{{ mysqlnd_stmt::field_count */
|
||||
static unsigned int
|
||||
MYSQLND_METHOD(mysqlnd_stmt, field_count)(const MYSQLND_STMT * const stmt)
|
||||
MYSQLND_METHOD(mysqlnd_stmt, field_count)(const MYSQLND_STMT * const stmt TSRMLS_DC)
|
||||
{
|
||||
return stmt->field_count;
|
||||
}
|
||||
@ -1557,7 +1551,7 @@ MYSQLND_METHOD(mysqlnd_stmt, field_count)(const MYSQLND_STMT * const stmt)
|
||||
|
||||
/* {{{ mysqlnd_stmt::param_count */
|
||||
static unsigned int
|
||||
MYSQLND_METHOD(mysqlnd_stmt, param_count)(const MYSQLND_STMT * const stmt)
|
||||
MYSQLND_METHOD(mysqlnd_stmt, param_count)(const MYSQLND_STMT * const stmt TSRMLS_DC)
|
||||
{
|
||||
return stmt->param_count;
|
||||
}
|
||||
@ -1566,7 +1560,7 @@ MYSQLND_METHOD(mysqlnd_stmt, param_count)(const MYSQLND_STMT * const stmt)
|
||||
|
||||
/* {{{ mysqlnd_stmt::errno */
|
||||
static unsigned int
|
||||
MYSQLND_METHOD(mysqlnd_stmt, errno)(const MYSQLND_STMT * const stmt)
|
||||
MYSQLND_METHOD(mysqlnd_stmt, errno)(const MYSQLND_STMT * const stmt TSRMLS_DC)
|
||||
{
|
||||
return stmt->error_info.error_no;
|
||||
}
|
||||
@ -1575,7 +1569,7 @@ MYSQLND_METHOD(mysqlnd_stmt, errno)(const MYSQLND_STMT * const stmt)
|
||||
|
||||
/* {{{ mysqlnd_stmt::error */
|
||||
static const char *
|
||||
MYSQLND_METHOD(mysqlnd_stmt, error)(const MYSQLND_STMT * const stmt)
|
||||
MYSQLND_METHOD(mysqlnd_stmt, error)(const MYSQLND_STMT * const stmt TSRMLS_DC)
|
||||
{
|
||||
return stmt->error_info.error;
|
||||
}
|
||||
@ -1584,7 +1578,7 @@ MYSQLND_METHOD(mysqlnd_stmt, error)(const MYSQLND_STMT * const stmt)
|
||||
|
||||
/* {{{ mysqlnd_stmt::sqlstate */
|
||||
static const char *
|
||||
MYSQLND_METHOD(mysqlnd_stmt, sqlstate)(const MYSQLND_STMT * const stmt)
|
||||
MYSQLND_METHOD(mysqlnd_stmt, sqlstate)(const MYSQLND_STMT * const stmt TSRMLS_DC)
|
||||
{
|
||||
return stmt->error_info.sqlstate[0] ? stmt->error_info.sqlstate:MYSQLND_SQLSTATE_NULL;
|
||||
}
|
||||
@ -1602,7 +1596,7 @@ MYSQLND_METHOD(mysqlnd_stmt, data_seek)(const MYSQLND_STMT * const stmt, uint64_
|
||||
|
||||
/* {{{ mysqlnd_stmt::param_metadata */
|
||||
static MYSQLND_RES *
|
||||
MYSQLND_METHOD(mysqlnd_stmt, param_metadata)(MYSQLND_STMT * const stmt)
|
||||
MYSQLND_METHOD(mysqlnd_stmt, param_metadata)(MYSQLND_STMT * const stmt TSRMLS_DC)
|
||||
{
|
||||
if (!stmt->param_count) {
|
||||
return NULL;
|
||||
|
@ -542,7 +542,7 @@ mysqlnd_query_read_result_set_header(MYSQLND *conn, MYSQLND_STMT *stmt TSRMLS_DC
|
||||
completeness.
|
||||
*/
|
||||
static
|
||||
unsigned long * mysqlnd_fetch_lengths_buffered(MYSQLND_RES * const result)
|
||||
unsigned long * mysqlnd_fetch_lengths_buffered(MYSQLND_RES * const result TSRMLS_DC)
|
||||
{
|
||||
unsigned int i;
|
||||
zval **previous_row;
|
||||
@ -573,7 +573,7 @@ unsigned long * mysqlnd_fetch_lengths_buffered(MYSQLND_RES * const result)
|
||||
|
||||
/* {{{ mysqlnd_fetch_lengths_unbuffered */
|
||||
static
|
||||
unsigned long * mysqlnd_fetch_lengths_unbuffered(MYSQLND_RES * const result)
|
||||
unsigned long * mysqlnd_fetch_lengths_unbuffered(MYSQLND_RES * const result TSRMLS_DC)
|
||||
{
|
||||
return result->lengths;
|
||||
}
|
||||
@ -581,9 +581,9 @@ unsigned long * mysqlnd_fetch_lengths_unbuffered(MYSQLND_RES * const result)
|
||||
|
||||
#if !defined(MYSQLND_USE_OPTIMISATIONS) || MYSQLND_USE_OPTIMISATIONS == 0
|
||||
/* {{{ mysqlnd_res::fetch_lengths */
|
||||
PHPAPI unsigned long * mysqlnd_fetch_lengths(MYSQLND_RES * const result)
|
||||
PHPAPI unsigned long * _mysqlnd_fetch_lengths(MYSQLND_RES * const result TSRMLS_DC)
|
||||
{
|
||||
return result->m.fetch_lengths? result->m.fetch_lengths(result):NULL;
|
||||
return result->m.fetch_lengths? result->m.fetch_lengths(result TSRMLS_CC) : NULL;
|
||||
}
|
||||
/* }}} */
|
||||
#endif
|
||||
@ -698,8 +698,7 @@ mysqlnd_fetch_row_unbuffered_c(MYSQLND_RES *result TSRMLS_DC)
|
||||
|
||||
/* {{{ mysqlnd_fetch_row_unbuffered */
|
||||
static enum_func_status
|
||||
mysqlnd_fetch_row_unbuffered(MYSQLND_RES *result, void *param, unsigned int flags,
|
||||
zend_bool *fetched_anything TSRMLS_DC)
|
||||
mysqlnd_fetch_row_unbuffered(MYSQLND_RES *result, void *param, unsigned int flags, zend_bool *fetched_anything TSRMLS_DC)
|
||||
{
|
||||
enum_func_status ret;
|
||||
zval *row = (zval *) param;
|
||||
@ -948,8 +947,7 @@ mysqlnd_fetch_row_buffered_c(MYSQLND_RES *result TSRMLS_DC)
|
||||
|
||||
/* {{{ mysqlnd_fetch_row_buffered */
|
||||
static enum_func_status
|
||||
mysqlnd_fetch_row_buffered(MYSQLND_RES *result, void *param, unsigned int flags,
|
||||
zend_bool *fetched_anything TSRMLS_DC)
|
||||
mysqlnd_fetch_row_buffered(MYSQLND_RES *result, void *param, unsigned int flags, zend_bool *fetched_anything TSRMLS_DC)
|
||||
{
|
||||
unsigned int i;
|
||||
zval *row = (zval *) param;
|
||||
@ -1267,7 +1265,7 @@ MYSQLND_METHOD(mysqlnd_res, data_seek)(MYSQLND_RES *result, uint64_t row TSRMLS_
|
||||
|
||||
/* {{{ mysqlnd_res::num_rows */
|
||||
static uint64_t
|
||||
MYSQLND_METHOD(mysqlnd_res, num_rows)(const MYSQLND_RES * const result)
|
||||
MYSQLND_METHOD(mysqlnd_res, num_rows)(const MYSQLND_RES * const result TSRMLS_DC)
|
||||
{
|
||||
/* Be compatible with libmysql. We count row_count, but will return 0 */
|
||||
return result->stored_data? result->stored_data->row_count:0;
|
||||
@ -1277,7 +1275,7 @@ MYSQLND_METHOD(mysqlnd_res, num_rows)(const MYSQLND_RES * const result)
|
||||
|
||||
/* {{{ mysqlnd_res::num_fields */
|
||||
static unsigned int
|
||||
MYSQLND_METHOD(mysqlnd_res, num_fields)(const MYSQLND_RES * const result)
|
||||
MYSQLND_METHOD(mysqlnd_res, num_fields)(const MYSQLND_RES * const result TSRMLS_DC)
|
||||
{
|
||||
return result->field_count;
|
||||
}
|
||||
@ -1314,8 +1312,7 @@ MYSQLND_METHOD(mysqlnd_res, fetch_field)(MYSQLND_RES * const result TSRMLS_DC)
|
||||
|
||||
/* {{{ mysqlnd_res::fetch_field_direct */
|
||||
static const MYSQLND_FIELD *
|
||||
MYSQLND_METHOD(mysqlnd_res, fetch_field_direct)(MYSQLND_RES * const result,
|
||||
MYSQLND_FIELD_OFFSET fieldnr TSRMLS_DC)
|
||||
MYSQLND_METHOD(mysqlnd_res, fetch_field_direct)(MYSQLND_RES * const result, MYSQLND_FIELD_OFFSET fieldnr TSRMLS_DC)
|
||||
{
|
||||
DBG_ENTER("mysqlnd_res::fetch_field_direct");
|
||||
if (result->meta) {
|
||||
@ -1362,8 +1359,7 @@ MYSQLND_METHOD(mysqlnd_res, fetch_fields)(MYSQLND_RES * const result TSRMLS_DC)
|
||||
|
||||
/* {{{ mysqlnd_res::field_seek */
|
||||
static MYSQLND_FIELD_OFFSET
|
||||
MYSQLND_METHOD(mysqlnd_res, field_seek)(MYSQLND_RES * const result,
|
||||
MYSQLND_FIELD_OFFSET field_offset)
|
||||
MYSQLND_METHOD(mysqlnd_res, field_seek)(MYSQLND_RES * const result, MYSQLND_FIELD_OFFSET field_offset TSRMLS_DC)
|
||||
{
|
||||
MYSQLND_FIELD_OFFSET return_value = 0;
|
||||
if (result->meta) {
|
||||
@ -1377,9 +1373,9 @@ MYSQLND_METHOD(mysqlnd_res, field_seek)(MYSQLND_RES * const result,
|
||||
|
||||
/* {{{ mysqlnd_res::field_tell */
|
||||
static MYSQLND_FIELD_OFFSET
|
||||
MYSQLND_METHOD(mysqlnd_res, field_tell)(const MYSQLND_RES * const result)
|
||||
MYSQLND_METHOD(mysqlnd_res, field_tell)(const MYSQLND_RES * const result TSRMLS_DC)
|
||||
{
|
||||
return result->meta? result->meta->m->field_tell(result->meta):0;
|
||||
return result->meta? result->meta->m->field_tell(result->meta TSRMLS_CC) : 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@ -1451,8 +1447,7 @@ MYSQLND_METHOD(mysqlnd_res, fetch_row_c)(MYSQLND_RES *result TSRMLS_DC)
|
||||
|
||||
/* {{{ mysqlnd_res::fetch_all */
|
||||
static void
|
||||
MYSQLND_METHOD(mysqlnd_res, fetch_all)(MYSQLND_RES *result, unsigned int flags,
|
||||
zval *return_value TSRMLS_DC ZEND_FILE_LINE_DC)
|
||||
MYSQLND_METHOD(mysqlnd_res, fetch_all)(MYSQLND_RES *result, unsigned int flags, zval *return_value TSRMLS_DC ZEND_FILE_LINE_DC)
|
||||
{
|
||||
zval *row;
|
||||
ulong i = 0;
|
||||
@ -1487,8 +1482,7 @@ MYSQLND_METHOD(mysqlnd_res, fetch_all)(MYSQLND_RES *result, unsigned int flags,
|
||||
|
||||
/* {{{ mysqlnd_res::fetch_field_data */
|
||||
static void
|
||||
MYSQLND_METHOD(mysqlnd_res, fetch_field_data)(MYSQLND_RES *result, unsigned int offset,
|
||||
zval *return_value TSRMLS_DC)
|
||||
MYSQLND_METHOD(mysqlnd_res, fetch_field_data)(MYSQLND_RES *result, unsigned int offset, zval *return_value TSRMLS_DC)
|
||||
{
|
||||
zval row;
|
||||
zval **entry;
|
||||
|
@ -138,8 +138,7 @@ zend_bool mysqlnd_unicode_is_key_numeric(UChar *key, size_t length, long *idx)
|
||||
|
||||
/* {{{ mysqlnd_res_meta::read_metadata */
|
||||
static enum_func_status
|
||||
MYSQLND_METHOD(mysqlnd_res_meta, read_metadata)(MYSQLND_RES_METADATA * const meta,
|
||||
MYSQLND *conn TSRMLS_DC)
|
||||
MYSQLND_METHOD(mysqlnd_res_meta, read_metadata)(MYSQLND_RES_METADATA * const meta, MYSQLND *conn TSRMLS_DC)
|
||||
{
|
||||
unsigned int i = 0;
|
||||
MYSQLND_PACKET_RES_FIELD * field_packet;
|
||||
@ -303,8 +302,7 @@ MYSQLND_METHOD(mysqlnd_res_meta, free)(MYSQLND_RES_METADATA *meta, zend_bool per
|
||||
|
||||
/* {{{ mysqlnd_res::clone_metadata */
|
||||
static MYSQLND_RES_METADATA *
|
||||
MYSQLND_METHOD(mysqlnd_res_meta, clone_metadata)(const MYSQLND_RES_METADATA * const meta,
|
||||
zend_bool persistent TSRMLS_DC)
|
||||
MYSQLND_METHOD(mysqlnd_res_meta, clone_metadata)(const MYSQLND_RES_METADATA * const meta, zend_bool persistent TSRMLS_DC)
|
||||
{
|
||||
unsigned int i;
|
||||
/* +1 is to have empty marker at the end */
|
||||
@ -393,8 +391,7 @@ MYSQLND_METHOD(mysqlnd_res_meta, fetch_field)(MYSQLND_RES_METADATA * const meta
|
||||
|
||||
/* {{{ mysqlnd_res_meta::fetch_field_direct */
|
||||
static const MYSQLND_FIELD *
|
||||
MYSQLND_METHOD(mysqlnd_res_meta, fetch_field_direct)(const MYSQLND_RES_METADATA * const meta,
|
||||
MYSQLND_FIELD_OFFSET fieldnr TSRMLS_DC)
|
||||
MYSQLND_METHOD(mysqlnd_res_meta, fetch_field_direct)(const MYSQLND_RES_METADATA * const meta, MYSQLND_FIELD_OFFSET fieldnr TSRMLS_DC)
|
||||
{
|
||||
DBG_ENTER("mysqlnd_res_meta::fetch_field_direct");
|
||||
DBG_INF_FMT("fieldnr=%d", fieldnr);
|
||||
@ -418,7 +415,7 @@ MYSQLND_METHOD(mysqlnd_res_meta, fetch_fields)(MYSQLND_RES_METADATA * const meta
|
||||
|
||||
/* {{{ mysqlnd_res_meta::field_tell */
|
||||
static MYSQLND_FIELD_OFFSET
|
||||
MYSQLND_METHOD(mysqlnd_res_meta, field_tell)(const MYSQLND_RES_METADATA * const meta)
|
||||
MYSQLND_METHOD(mysqlnd_res_meta, field_tell)(const MYSQLND_RES_METADATA * const meta TSRMLS_DC)
|
||||
{
|
||||
return meta->current_field;
|
||||
}
|
||||
|
@ -267,13 +267,13 @@ struct st_mysqlnd_packet_chg_user_resp;
|
||||
struct st_mysqlnd_protocol_methods
|
||||
{
|
||||
struct st_mysqlnd_packet_greet * (*get_greet_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC);
|
||||
struct st_mysqlnd_packet_auth * (*get_auth_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC);
|
||||
struct st_mysqlnd_packet_auth * (*get_auth_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC);
|
||||
struct st_mysqlnd_packet_ok * (*get_ok_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC);
|
||||
struct st_mysqlnd_packet_command * (*get_command_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC);
|
||||
struct st_mysqlnd_packet_eof * (*get_eof_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC);
|
||||
struct st_mysqlnd_packet_rset_header *(*get_rset_header_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC);
|
||||
struct st_mysqlnd_packet_command * (*get_command_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC);
|
||||
struct st_mysqlnd_packet_eof * (*get_eof_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC);
|
||||
struct st_mysqlnd_packet_rset_header * (*get_rset_header_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC);
|
||||
struct st_mysqlnd_packet_res_field * (*get_result_field_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC);
|
||||
struct st_mysqlnd_packet_row * (*get_row_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC);
|
||||
struct st_mysqlnd_packet_row * (*get_row_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC);
|
||||
struct st_mysqlnd_packet_stats * (*get_stats_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC);
|
||||
struct st_mysqlnd_packet_prepare_response *(*get_prepare_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC);
|
||||
struct st_mysqlnd_packet_chg_user_resp*(*get_change_user_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC);
|
||||
@ -305,27 +305,27 @@ struct st_mysqlnd_conn_methods
|
||||
enum_func_status (*server_dump_debug_information)(MYSQLND * const conn TSRMLS_DC);
|
||||
enum_func_status (*change_user)(MYSQLND * const conn, const char * user, const char * passwd, const char * db, zend_bool silent TSRMLS_DC);
|
||||
|
||||
unsigned int (*get_error_no)(const MYSQLND * const conn);
|
||||
const char * (*get_error_str)(const MYSQLND * const conn);
|
||||
const char * (*get_sqlstate)(const MYSQLND * const conn);
|
||||
uint64_t (*get_thread_id)(const MYSQLND * const conn);
|
||||
unsigned int (*get_error_no)(const MYSQLND * const conn TSRMLS_DC);
|
||||
const char * (*get_error_str)(const MYSQLND * const conn TSRMLS_DC);
|
||||
const char * (*get_sqlstate)(const MYSQLND * const conn TSRMLS_DC);
|
||||
uint64_t (*get_thread_id)(const MYSQLND * const conn TSRMLS_DC);
|
||||
void (*get_statistics)(const MYSQLND * const conn, zval *return_value TSRMLS_DC ZEND_FILE_LINE_DC);
|
||||
|
||||
unsigned long (*get_server_version)(const MYSQLND * const conn);
|
||||
const char * (*get_server_information)(const MYSQLND * const conn);
|
||||
unsigned long (*get_server_version)(const MYSQLND * const conn TSRMLS_DC);
|
||||
const char * (*get_server_information)(const MYSQLND * const conn TSRMLS_DC);
|
||||
enum_func_status (*get_server_statistics)(MYSQLND *conn, char **message, unsigned int * message_len TSRMLS_DC);
|
||||
const char * (*get_host_information)(const MYSQLND * const conn);
|
||||
unsigned int (*get_protocol_information)(const MYSQLND * const conn);
|
||||
const char * (*get_last_message)(const MYSQLND * const conn);
|
||||
const char * (*charset_name)(const MYSQLND * const conn);
|
||||
const char * (*get_host_information)(const MYSQLND * const conn TSRMLS_DC);
|
||||
unsigned int (*get_protocol_information)(const MYSQLND * const conn TSRMLS_DC);
|
||||
const char * (*get_last_message)(const MYSQLND * const conn TSRMLS_DC);
|
||||
const char * (*charset_name)(const MYSQLND * const conn TSRMLS_DC);
|
||||
MYSQLND_RES * (*list_fields)(MYSQLND *conn, const char *table, const char *achtung_wild TSRMLS_DC);
|
||||
MYSQLND_RES * (*list_method)(MYSQLND *conn, const char *query, const char *achtung_wild, char *par1 TSRMLS_DC);
|
||||
|
||||
uint64_t (*get_last_insert_id)(const MYSQLND * const conn);
|
||||
uint64_t (*get_affected_rows)(const MYSQLND * const conn);
|
||||
unsigned int (*get_warning_count)(const MYSQLND * const conn);
|
||||
uint64_t (*get_last_insert_id)(const MYSQLND * const conn TSRMLS_DC);
|
||||
uint64_t (*get_affected_rows)(const MYSQLND * const conn TSRMLS_DC);
|
||||
unsigned int (*get_warning_count)(const MYSQLND * const conn TSRMLS_DC);
|
||||
|
||||
unsigned int (*get_field_count)(const MYSQLND * const conn);
|
||||
unsigned int (*get_field_count)(const MYSQLND * const conn TSRMLS_DC);
|
||||
|
||||
enum_func_status (*set_server_option)(MYSQLND * const conn, enum_mysqlnd_server_option option TSRMLS_DC);
|
||||
enum_func_status (*set_client_option)(MYSQLND * const conn, enum_mysqlnd_option option, const char * const value TSRMLS_DC);
|
||||
@ -361,18 +361,18 @@ struct st_mysqlnd_res_methods
|
||||
MYSQLND_ROW_C (*fetch_row_c)(MYSQLND_RES *result TSRMLS_DC);
|
||||
void (*fetch_all)(MYSQLND_RES *result, unsigned int flags, zval *return_value TSRMLS_DC ZEND_FILE_LINE_DC);
|
||||
void (*fetch_field_data)(MYSQLND_RES *result, unsigned int offset, zval *return_value TSRMLS_DC);
|
||||
uint64_t (*num_rows)(const MYSQLND_RES * const result);
|
||||
unsigned int (*num_fields)(const MYSQLND_RES * const result);
|
||||
uint64_t (*num_rows)(const MYSQLND_RES * const result TSRMLS_DC);
|
||||
unsigned int (*num_fields)(const MYSQLND_RES * const result TSRMLS_DC);
|
||||
enum_func_status (*skip_result)(MYSQLND_RES * const result TSRMLS_DC);
|
||||
enum_func_status (*seek_data)(MYSQLND_RES * result, uint64_t row TSRMLS_DC);
|
||||
MYSQLND_FIELD_OFFSET (*seek_field)(MYSQLND_RES * const result, MYSQLND_FIELD_OFFSET field_offset);
|
||||
MYSQLND_FIELD_OFFSET (*field_tell)(const MYSQLND_RES * const result);
|
||||
MYSQLND_FIELD_OFFSET (*seek_field)(MYSQLND_RES * const result, MYSQLND_FIELD_OFFSET field_offset TSRMLS_DC);
|
||||
MYSQLND_FIELD_OFFSET (*field_tell)(const MYSQLND_RES * const result TSRMLS_DC);
|
||||
const MYSQLND_FIELD *(*fetch_field)(MYSQLND_RES * const result TSRMLS_DC);
|
||||
const MYSQLND_FIELD *(*fetch_field_direct)(MYSQLND_RES * const result, MYSQLND_FIELD_OFFSET fieldnr TSRMLS_DC);
|
||||
const MYSQLND_FIELD *(*fetch_fields)(MYSQLND_RES * const result TSRMLS_DC);
|
||||
|
||||
enum_func_status (*read_result_metadata)(MYSQLND_RES *result, MYSQLND *conn TSRMLS_DC);
|
||||
unsigned long * (*fetch_lengths)(MYSQLND_RES * const result);
|
||||
enum_func_status (*read_result_metadata)(MYSQLND_RES *result, MYSQLND * conn TSRMLS_DC);
|
||||
unsigned long * (*fetch_lengths)(MYSQLND_RES * const result TSRMLS_DC);
|
||||
enum_func_status (*store_result_fetch_data)(MYSQLND * const conn, MYSQLND_RES *result, MYSQLND_RES_METADATA *meta, zend_bool binary_protocol, zend_bool to_cache TSRMLS_DC);
|
||||
void (*initialize_result_set_rest)(MYSQLND_RES * const result TSRMLS_DC);
|
||||
|
||||
@ -397,7 +397,7 @@ struct st_mysqlnd_res_meta_methods
|
||||
const MYSQLND_FIELD * (*fetch_field)(MYSQLND_RES_METADATA * const meta TSRMLS_DC);
|
||||
const MYSQLND_FIELD * (*fetch_field_direct)(const MYSQLND_RES_METADATA * const meta, MYSQLND_FIELD_OFFSET fieldnr TSRMLS_DC);
|
||||
const MYSQLND_FIELD * (*fetch_fields)(MYSQLND_RES_METADATA * const meta TSRMLS_DC);
|
||||
MYSQLND_FIELD_OFFSET (*field_tell)(const MYSQLND_RES_METADATA * const meta);
|
||||
MYSQLND_FIELD_OFFSET (*field_tell)(const MYSQLND_RES_METADATA * const meta TSRMLS_DC);
|
||||
enum_func_status (*read_metadata)(MYSQLND_RES_METADATA * const meta, MYSQLND *conn TSRMLS_DC);
|
||||
MYSQLND_RES_METADATA * (*clone_metadata)(const MYSQLND_RES_METADATA * const meta, zend_bool persistent TSRMLS_DC);
|
||||
void (*free_metadata)(MYSQLND_RES_METADATA *meta, zend_bool persistent TSRMLS_DC);
|
||||
@ -428,22 +428,21 @@ struct st_mysqlnd_stmt_methods
|
||||
enum_func_status (*bind_result)(MYSQLND_STMT * const stmt, MYSQLND_RESULT_BIND * const result_bind TSRMLS_DC);
|
||||
enum_func_status (*bind_one_result)(MYSQLND_STMT * const stmt, unsigned int param_no TSRMLS_DC);
|
||||
void (*set_result_bind_dtor)(MYSQLND_STMT * const stmt, void (*result_bind_dtor)(MYSQLND_RESULT_BIND * TSRMLS_DC) TSRMLS_DC);
|
||||
enum_func_status (*send_long_data)(MYSQLND_STMT * const stmt, unsigned int param_num,
|
||||
const char * const data, unsigned long length TSRMLS_DC);
|
||||
MYSQLND_RES * (*get_parameter_metadata)(MYSQLND_STMT * const stmt);
|
||||
enum_func_status (*send_long_data)(MYSQLND_STMT * const stmt, unsigned int param_num, const char * const data, unsigned long length TSRMLS_DC);
|
||||
MYSQLND_RES * (*get_parameter_metadata)(MYSQLND_STMT * const stmt TSRMLS_DC);
|
||||
MYSQLND_RES * (*get_result_metadata)(MYSQLND_STMT * const stmt TSRMLS_DC);
|
||||
|
||||
uint64_t (*get_last_insert_id)(const MYSQLND_STMT * const stmt);
|
||||
uint64_t (*get_affected_rows)(const MYSQLND_STMT * const stmt);
|
||||
uint64_t (*get_num_rows)(const MYSQLND_STMT * const stmt);
|
||||
uint64_t (*get_last_insert_id)(const MYSQLND_STMT * const stmt TSRMLS_DC);
|
||||
uint64_t (*get_affected_rows)(const MYSQLND_STMT * const stmt TSRMLS_DC);
|
||||
uint64_t (*get_num_rows)(const MYSQLND_STMT * const stmt TSRMLS_DC);
|
||||
|
||||
unsigned int (*get_param_count)(const MYSQLND_STMT * const stmt);
|
||||
unsigned int (*get_field_count)(const MYSQLND_STMT * const stmt);
|
||||
unsigned int (*get_warning_count)(const MYSQLND_STMT * const stmt);
|
||||
unsigned int (*get_param_count)(const MYSQLND_STMT * const stmt TSRMLS_DC);
|
||||
unsigned int (*get_field_count)(const MYSQLND_STMT * const stmt TSRMLS_DC);
|
||||
unsigned int (*get_warning_count)(const MYSQLND_STMT * const stmt TSRMLS_DC);
|
||||
|
||||
unsigned int (*get_error_no)(const MYSQLND_STMT * const stmt);
|
||||
const char * (*get_error_str)(const MYSQLND_STMT * const stmt);
|
||||
const char * (*get_sqlstate)(const MYSQLND_STMT * const stmt);
|
||||
unsigned int (*get_error_no)(const MYSQLND_STMT * const stmt TSRMLS_DC);
|
||||
const char * (*get_error_str)(const MYSQLND_STMT * const stmt TSRMLS_DC);
|
||||
const char * (*get_sqlstate)(const MYSQLND_STMT * const stmt TSRMLS_DC);
|
||||
|
||||
enum_func_status (*get_attribute)(const MYSQLND_STMT * const stmt, enum mysqlnd_stmt_attr attr_type, void * const value TSRMLS_DC);
|
||||
enum_func_status (*set_attribute)(MYSQLND_STMT * const stmt, enum mysqlnd_stmt_attr attr_type, const void * const value TSRMLS_DC);
|
||||
|
@ -462,7 +462,7 @@ static int pdo_mysql_get_attribute(pdo_dbh_t *dbh, long attr, zval *return_value
|
||||
case PDO_ATTR_SERVER_INFO: {
|
||||
char *tmp;
|
||||
#if PDO_USE_MYSQLND
|
||||
int tmp_len;
|
||||
unsigned int tmp_len;
|
||||
|
||||
if (mysqlnd_stat(H->server, &tmp, &tmp_len) == PASS) {
|
||||
ZVAL_STRINGL(return_value, tmp, tmp_len, 0);
|
||||
|
@ -120,7 +120,7 @@ static int pdo_mysql_stmt_dtor(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void pdo_mysql_stmt_set_row_count(pdo_stmt_t *stmt) /* {{{ */
|
||||
static void pdo_mysql_stmt_set_row_count(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
long row_count;
|
||||
pdo_mysql_stmt *S = stmt->driver_data;
|
||||
@ -237,7 +237,7 @@ static int pdo_mysql_stmt_execute_prepared_libmysql(pdo_stmt_t *stmt TSRMLS_DC)
|
||||
}
|
||||
}
|
||||
|
||||
pdo_mysql_stmt_set_row_count(stmt);
|
||||
pdo_mysql_stmt_set_row_count(stmt TSRMLS_CC);
|
||||
PDO_DBG_RETURN(1);
|
||||
}
|
||||
/* }}} */
|
||||
@ -280,7 +280,7 @@ static int pdo_mysql_stmt_execute_prepared_mysqlnd(pdo_stmt_t *stmt TSRMLS_DC) /
|
||||
}
|
||||
}
|
||||
|
||||
pdo_mysql_stmt_set_row_count(stmt);
|
||||
pdo_mysql_stmt_set_row_count(stmt TSRMLS_CC);
|
||||
PDO_DBG_RETURN(1);
|
||||
}
|
||||
/* }}} */
|
||||
|
Loading…
Reference in New Issue
Block a user