Lines Matching refs:mysql

36 	MY_MYSQL 		*mysql;  in PHP_FUNCTION()  local
44 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
46 rc = mysql_affected_rows(mysql->mysql); in PHP_FUNCTION()
57 MY_MYSQL *mysql; in PHP_FUNCTION() local
64 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
66 if (mysql_autocommit(mysql->mysql, (my_bool)automode)) { in PHP_FUNCTION()
67 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
201 MY_MYSQL *mysql; in PHP_FUNCTION() local
209 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
211 …enum_func_status rc = mysqlnd_change_user_ex(mysql->mysql, user, password, dbname, false, (size_t)… in PHP_FUNCTION()
212 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
221 MY_MYSQL *mysql; in PHP_FUNCTION() local
228 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
229 RETURN_STRING(mysql_character_set_name(mysql->mysql)); in PHP_FUNCTION()
234 void php_mysqli_close(MY_MYSQL * mysql, int close_type, int resource_status) in php_mysqli_close() argument
240 if (!mysql->persistent) { in php_mysqli_close()
241 mysqli_close(mysql->mysql, close_type); in php_mysqli_close()
244 if ((le = zend_hash_find_ptr(&EG(persistent_list), mysql->hash_key)) != NULL) { in php_mysqli_close()
247 mysqlnd_end_psession(mysql->mysql); in php_mysqli_close()
250 FAIL == mysqlnd_rollback(mysql->mysql, TRANS_COR_NO_OPT, NULL)) in php_mysqli_close()
252 mysqli_close(mysql->mysql, close_type); in php_mysqli_close()
254 zend_ptr_stack_push(&plist->free_links, mysql->mysql); in php_mysqli_close()
260 mysql->persistent = false; in php_mysqli_close()
262 mysql->mysql = NULL; in php_mysqli_close()
264 php_clear_mysql(mysql); in php_mysqli_close()
272 MY_MYSQL *mysql; in PHP_FUNCTION() local
278 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_INITIALIZED); in PHP_FUNCTION()
280 …php_mysqli_close(mysql, MYSQLI_CLOSE_EXPLICIT, ((MYSQLI_RESOURCE *)(Z_MYSQLI_P(mysql_link))->ptr)-… in PHP_FUNCTION()
284 efree(mysql); in PHP_FUNCTION()
292 MY_MYSQL *mysql; in PHP_FUNCTION() local
301 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
303 if (FAIL == mysqlnd_commit(mysql->mysql, flags, name)) { in PHP_FUNCTION()
304 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
365 MY_MYSQL *mysql; in PHP_FUNCTION() local
371 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
373 RETURN_BOOL(!mysql_dump_debug_info(mysql->mysql)); in PHP_FUNCTION()
380 MY_MYSQL *mysql; in PHP_FUNCTION() local
386 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
387 RETURN_LONG(mysql_errno(mysql->mysql)); in PHP_FUNCTION()
394 MY_MYSQL *mysql; in PHP_FUNCTION() local
400 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
401 RETURN_STRING(mysql_error(mysql->mysql)); in PHP_FUNCTION()
466 void close_stmt_and_copy_errors(MY_STMT *stmt, MY_MYSQL *mysql) in close_stmt_and_copy_errors() argument
475 uint64_t affected_rows = mysql->mysql->data->upsert_status->affected_rows; in close_stmt_and_copy_errors()
482 zend_llist_clean(&mysql->mysql->data->error_info->error_list); in close_stmt_and_copy_errors()
483 *mysql->mysql->data->error_info = error_info; in close_stmt_and_copy_errors()
484 mysql->mysql->data->upsert_status->affected_rows = affected_rows; in close_stmt_and_copy_errors()
489 MY_MYSQL *mysql; in PHP_FUNCTION() local
501 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
505 if (!(stmt->stmt = mysql_stmt_init(mysql->mysql))) { in PHP_FUNCTION()
506 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
514 close_stmt_and_copy_errors(stmt, mysql); in PHP_FUNCTION()
563 close_stmt_and_copy_errors(stmt, mysql); in PHP_FUNCTION()
576 close_stmt_and_copy_errors(stmt, mysql); in PHP_FUNCTION()
582 close_stmt_and_copy_errors(stmt, mysql); in PHP_FUNCTION()
594 close_stmt_and_copy_errors(stmt, mysql); in PHP_FUNCTION()
603 close_stmt_and_copy_errors(stmt, mysql); in PHP_FUNCTION()
784 MY_MYSQL *mysql; in PHP_FUNCTION() local
790 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
792 RETURN_LONG(mysql_field_count(mysql->mysql)); in PHP_FUNCTION()
892 MY_MYSQL *mysql; in PHP_FUNCTION() local
898 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
899 RETURN_STRING((mysql->mysql->data->host_info) ? mysql->mysql->data->host_info : ""); in PHP_FUNCTION()
906 MY_MYSQL *mysql; in PHP_FUNCTION() local
912 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
913 RETURN_LONG(mysql_get_proto_info(mysql->mysql)); in PHP_FUNCTION()
920 MY_MYSQL *mysql; in PHP_FUNCTION() local
926 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
928 RETURN_STRING(mysql_get_server_info(mysql->mysql)); in PHP_FUNCTION()
935 MY_MYSQL *mysql; in PHP_FUNCTION() local
941 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
943 RETURN_LONG(mysql_get_server_version(mysql->mysql)); in PHP_FUNCTION()
950 MY_MYSQL *mysql; in PHP_FUNCTION() local
957 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
959 info = mysql_info(mysql->mysql); in PHP_FUNCTION()
970 MY_MYSQL *mysql; in php_mysqli_init() local
980 mysql = (MY_MYSQL *)ecalloc(1, sizeof(MY_MYSQL)); in php_mysqli_init()
986 if (!(mysql->mysql = mysqlnd_init(MYSQLND_CLIENT_NO_FLAG, true))) in php_mysqli_init()
988 efree(mysql); in php_mysqli_init()
993 mysqli_resource->ptr = (void *)mysql; in php_mysqli_init()
1014 MY_MYSQL *mysql; in PHP_FUNCTION() local
1021 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
1022 rc = mysql_insert_id(mysql->mysql); in PHP_FUNCTION()
1030 MY_MYSQL *mysql; in PHP_FUNCTION() local
1043 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
1045 if (mysql_kill(mysql->mysql, processid)) { in PHP_FUNCTION()
1046 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
1056 MY_MYSQL *mysql; in PHP_FUNCTION() local
1062 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
1064 RETURN_BOOL(mysql_more_results(mysql->mysql)); in PHP_FUNCTION()
1070 MY_MYSQL *mysql; in PHP_FUNCTION() local
1076 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
1078 if (mysql_next_result(mysql->mysql)) { in PHP_FUNCTION()
1079 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
1190 MY_MYSQL *mysql; in PHP_FUNCTION() local
1201 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_INITIALIZED); in PHP_FUNCTION()
1220 if ((ret = mysql_options(mysql->mysql, mysql_option, Z_STRVAL_P(mysql_value)))) { in PHP_FUNCTION()
1221 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
1226 if ((ret = mysql_options(mysql->mysql, mysql_option, (char *)&l_value))) { in PHP_FUNCTION()
1227 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
1242 MY_MYSQL *mysql; in PHP_FUNCTION() local
1249 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
1250 rc = mysql_ping(mysql->mysql); in PHP_FUNCTION()
1251 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
1260 MY_MYSQL *mysql; in PHP_FUNCTION() local
1270 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
1274 if ((stmt->stmt = mysql_stmt_init(mysql->mysql))) { in PHP_FUNCTION()
1277 MYSQLND_ERROR_INFO error_info = *mysql->mysql->data->error_info; in PHP_FUNCTION()
1278 mysql->mysql->data->error_info->error_list.head = NULL; in PHP_FUNCTION()
1279 mysql->mysql->data->error_info->error_list.tail = NULL; in PHP_FUNCTION()
1280 mysql->mysql->data->error_info->error_list.count = 0; in PHP_FUNCTION()
1285 zend_llist_clean(&mysql->mysql->data->error_info->error_list); in PHP_FUNCTION()
1286 *mysql->mysql->data->error_info = error_info; in PHP_FUNCTION()
1298 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
1322 MY_MYSQL *mysql; in PHP_FUNCTION() local
1330 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
1334 if (mysql_real_query(mysql->mysql, query, query_len)) { in PHP_FUNCTION()
1335 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
1339 if (!mysql_field_count(mysql->mysql)) { in PHP_FUNCTION()
1341 php_mysqli_report_index(query, mysqli_server_status(mysql->mysql)); in PHP_FUNCTION()
1349 # define mysql_real_escape_string_quote(mysql, to, from, length, quote) \ argument
1350 mysql_real_escape_string(mysql, to, from, length)
1353 MY_MYSQL *mysql; in PHP_FUNCTION() local
1362 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
1365 …ZSTR_LEN(newstr) = mysql_real_escape_string_quote(mysql->mysql, ZSTR_VAL(newstr), escapestr, escap… in PHP_FUNCTION()
1374 MY_MYSQL *mysql; in PHP_FUNCTION() local
1383 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
1386 if (FAIL == mysqlnd_rollback(mysql->mysql, flags, name)) { in PHP_FUNCTION()
1387 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
1584 MY_MYSQL *mysql; in PHP_FUNCTION() local
1592 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
1594 if (mysql_select_db(mysql->mysql, dbname)) { in PHP_FUNCTION()
1595 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
1605 MY_MYSQL *mysql; in PHP_FUNCTION() local
1611 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
1612 RETURN_STRING(mysql_sqlstate(mysql->mysql)); in PHP_FUNCTION()
1619 MY_MYSQL *mysql; in PHP_FUNCTION() local
1627 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_INITIALIZED); in PHP_FUNCTION()
1635 mysql_ssl_set(mysql->mysql, ssl_parm[0], ssl_parm[1], ssl_parm[2], ssl_parm[3], ssl_parm[4]); in PHP_FUNCTION()
1644 MY_MYSQL *mysql; in PHP_FUNCTION() local
1651 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
1653 if (mysqlnd_stat(mysql->mysql, &stat) == PASS) in PHP_FUNCTION()
1666 MY_MYSQL *mysql; in PHP_FUNCTION() local
1673 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_INITIALIZED); in PHP_FUNCTION()
1674 RETURN_BOOL(!mysql_refresh(mysql->mysql, (uint8_t) options)); in PHP_FUNCTION()
1794 MY_MYSQL *mysql; in PHP_FUNCTION() local
1802 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
1806 if (!(stmt->stmt = mysql_stmt_init(mysql->mysql))) { in PHP_FUNCTION()
1903 MY_MYSQL *mysql; in PHP_FUNCTION() local
1921 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
1922 result = mysql_store_result(mysql->mysql); in PHP_FUNCTION()
1924 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
1928 php_mysqli_report_index("from previous query", mysqli_server_status(mysql->mysql)); in PHP_FUNCTION()
1941 MY_MYSQL *mysql; in PHP_FUNCTION() local
1947 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
1949 RETURN_LONG((zend_long) mysql_thread_id(mysql->mysql)); in PHP_FUNCTION()
1967 MY_MYSQL *mysql; in PHP_FUNCTION() local
1975 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
1977 if (!(result = mysql_use_result(mysql->mysql))) { in PHP_FUNCTION()
1978 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
1983 php_mysqli_report_index("from previous query", mysqli_server_status(mysql->mysql)); in PHP_FUNCTION()
1995 MY_MYSQL *mysql; in PHP_FUNCTION() local
2001 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
2003 RETURN_LONG(mysql_warning_count(mysql->mysql)); in PHP_FUNCTION()