Lines Matching refs:mysql
39 MY_MYSQL *mysql; in PHP_FUNCTION() local
47 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
49 rc = mysql_affected_rows(mysql->mysql); in PHP_FUNCTION()
60 MY_MYSQL *mysql; in PHP_FUNCTION() local
67 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
69 if (mysql_autocommit(mysql->mysql, (my_bool)automode)) { in PHP_FUNCTION()
70 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
209 MY_MYSQL *mysql; in PHP_FUNCTION() local
218 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
220 rc = mysqlnd_change_user_ex(mysql->mysql, user, password, dbname, false, (size_t) password_len); in PHP_FUNCTION()
221 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
234 MY_MYSQL *mysql; in PHP_FUNCTION() local
241 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
242 RETURN_STRING(mysql_character_set_name(mysql->mysql)); in PHP_FUNCTION()
247 void php_mysqli_close(MY_MYSQL * mysql, int close_type, int resource_status) in php_mysqli_close() argument
253 if (!mysql->persistent) { in php_mysqli_close()
254 mysqli_close(mysql->mysql, close_type); in php_mysqli_close()
257 if ((le = zend_hash_find_ptr(&EG(persistent_list), mysql->hash_key)) != NULL) { in php_mysqli_close()
260 mysqlnd_end_psession(mysql->mysql); in php_mysqli_close()
263 FAIL == mysqlnd_rollback(mysql->mysql, TRANS_COR_NO_OPT, NULL)) in php_mysqli_close()
265 mysqli_close(mysql->mysql, close_type); in php_mysqli_close()
267 zend_ptr_stack_push(&plist->free_links, mysql->mysql); in php_mysqli_close()
273 mysql->persistent = false; in php_mysqli_close()
275 mysql->mysql = NULL; in php_mysqli_close()
277 php_clear_mysql(mysql); in php_mysqli_close()
285 MY_MYSQL *mysql; in PHP_FUNCTION() local
291 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_INITIALIZED); in PHP_FUNCTION()
293 …php_mysqli_close(mysql, MYSQLI_CLOSE_EXPLICIT, ((MYSQLI_RESOURCE *)(Z_MYSQLI_P(mysql_link))->ptr)-… in PHP_FUNCTION()
297 efree(mysql); in PHP_FUNCTION()
305 MY_MYSQL *mysql; in PHP_FUNCTION() local
314 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
316 if (FAIL == mysqlnd_commit(mysql->mysql, flags, name)) { in PHP_FUNCTION()
317 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
378 MY_MYSQL *mysql; in PHP_FUNCTION() local
384 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
386 RETURN_BOOL(!mysql_dump_debug_info(mysql->mysql)); in PHP_FUNCTION()
393 MY_MYSQL *mysql; in PHP_FUNCTION() local
399 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
400 RETURN_LONG(mysql_errno(mysql->mysql)); in PHP_FUNCTION()
407 MY_MYSQL *mysql; in PHP_FUNCTION() local
413 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
414 RETURN_STRING(mysql_error(mysql->mysql)); in PHP_FUNCTION()
479 void close_stmt_and_copy_errors(MY_STMT *stmt, MY_MYSQL *mysql) in close_stmt_and_copy_errors() argument
488 uint64_t affected_rows = mysql->mysql->data->upsert_status->affected_rows; in close_stmt_and_copy_errors()
495 zend_llist_clean(&mysql->mysql->data->error_info->error_list); in close_stmt_and_copy_errors()
496 *mysql->mysql->data->error_info = error_info; in close_stmt_and_copy_errors()
497 mysql->mysql->data->upsert_status->affected_rows = affected_rows; in close_stmt_and_copy_errors()
502 MY_MYSQL *mysql; in PHP_FUNCTION() local
514 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
518 if (!(stmt->stmt = mysql_stmt_init(mysql->mysql))) { in PHP_FUNCTION()
519 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
527 close_stmt_and_copy_errors(stmt, mysql); in PHP_FUNCTION()
576 close_stmt_and_copy_errors(stmt, mysql); in PHP_FUNCTION()
589 close_stmt_and_copy_errors(stmt, mysql); in PHP_FUNCTION()
595 close_stmt_and_copy_errors(stmt, mysql); in PHP_FUNCTION()
607 close_stmt_and_copy_errors(stmt, mysql); in PHP_FUNCTION()
616 close_stmt_and_copy_errors(stmt, mysql); in PHP_FUNCTION()
797 MY_MYSQL *mysql; in PHP_FUNCTION() local
803 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
805 RETURN_LONG(mysql_field_count(mysql->mysql)); in PHP_FUNCTION()
905 MY_MYSQL *mysql; in PHP_FUNCTION() local
911 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
912 RETURN_STRING((mysql->mysql->data->host_info) ? mysql->mysql->data->host_info : ""); in PHP_FUNCTION()
919 MY_MYSQL *mysql; in PHP_FUNCTION() local
925 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
926 RETURN_LONG(mysql_get_proto_info(mysql->mysql)); in PHP_FUNCTION()
933 MY_MYSQL *mysql; in PHP_FUNCTION() local
939 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
941 RETURN_STRING(mysql_get_server_info(mysql->mysql)); in PHP_FUNCTION()
948 MY_MYSQL *mysql; in PHP_FUNCTION() local
954 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
956 RETURN_LONG(mysql_get_server_version(mysql->mysql)); in PHP_FUNCTION()
963 MY_MYSQL *mysql; in PHP_FUNCTION() local
970 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
972 info = mysql_info(mysql->mysql); in PHP_FUNCTION()
983 MY_MYSQL *mysql; in php_mysqli_init() local
993 mysql = (MY_MYSQL *)ecalloc(1, sizeof(MY_MYSQL)); in php_mysqli_init()
999 if (!(mysql->mysql = mysqlnd_init(MYSQLND_CLIENT_NO_FLAG, true))) in php_mysqli_init()
1001 efree(mysql); in php_mysqli_init()
1006 mysqli_resource->ptr = (void *)mysql; in php_mysqli_init()
1027 MY_MYSQL *mysql; in PHP_FUNCTION() local
1034 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
1035 rc = mysql_insert_id(mysql->mysql); in PHP_FUNCTION()
1043 MY_MYSQL *mysql; in PHP_FUNCTION() local
1056 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
1058 if (mysql_kill(mysql->mysql, processid)) { in PHP_FUNCTION()
1059 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
1069 MY_MYSQL *mysql; in PHP_FUNCTION() local
1075 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
1077 RETURN_BOOL(mysql_more_results(mysql->mysql)); in PHP_FUNCTION()
1083 MY_MYSQL *mysql; in PHP_FUNCTION() local
1089 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
1091 if (mysql_next_result(mysql->mysql)) { in PHP_FUNCTION()
1092 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
1228 MY_MYSQL *mysql; in PHP_FUNCTION() local
1239 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_INITIALIZED); in PHP_FUNCTION()
1258 if ((ret = mysql_options(mysql->mysql, mysql_option, Z_STRVAL_P(mysql_value)))) { in PHP_FUNCTION()
1259 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
1264 if ((ret = mysql_options(mysql->mysql, mysql_option, (char *)&l_value))) { in PHP_FUNCTION()
1265 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
1280 MY_MYSQL *mysql; in PHP_FUNCTION() local
1287 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
1288 rc = mysql_ping(mysql->mysql); in PHP_FUNCTION()
1289 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
1298 MY_MYSQL *mysql; in PHP_FUNCTION() local
1308 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
1312 if ((stmt->stmt = mysql_stmt_init(mysql->mysql))) { in PHP_FUNCTION()
1315 MYSQLND_ERROR_INFO error_info = *mysql->mysql->data->error_info; in PHP_FUNCTION()
1316 mysql->mysql->data->error_info->error_list.head = NULL; in PHP_FUNCTION()
1317 mysql->mysql->data->error_info->error_list.tail = NULL; in PHP_FUNCTION()
1318 mysql->mysql->data->error_info->error_list.count = 0; in PHP_FUNCTION()
1323 zend_llist_clean(&mysql->mysql->data->error_info->error_list); in PHP_FUNCTION()
1324 *mysql->mysql->data->error_info = error_info; in PHP_FUNCTION()
1336 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
1360 MY_MYSQL *mysql; in PHP_FUNCTION() local
1368 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
1372 if (mysql_real_query(mysql->mysql, query, query_len)) { in PHP_FUNCTION()
1373 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
1377 if (!mysql_field_count(mysql->mysql)) { in PHP_FUNCTION()
1379 php_mysqli_report_index(query, mysqli_server_status(mysql->mysql)); in PHP_FUNCTION()
1387 # define mysql_real_escape_string_quote(mysql, to, from, length, quote) \ argument
1388 mysql_real_escape_string(mysql, to, from, length)
1391 MY_MYSQL *mysql; in PHP_FUNCTION() local
1400 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
1403 …ZSTR_LEN(newstr) = mysql_real_escape_string_quote(mysql->mysql, ZSTR_VAL(newstr), escapestr, escap… in PHP_FUNCTION()
1412 MY_MYSQL *mysql; in PHP_FUNCTION() local
1421 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
1424 if (FAIL == mysqlnd_rollback(mysql->mysql, flags, name)) { in PHP_FUNCTION()
1425 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
1622 MY_MYSQL *mysql; in PHP_FUNCTION() local
1630 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
1632 if (mysql_select_db(mysql->mysql, dbname)) { in PHP_FUNCTION()
1633 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
1643 MY_MYSQL *mysql; in PHP_FUNCTION() local
1649 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
1650 RETURN_STRING(mysql_sqlstate(mysql->mysql)); in PHP_FUNCTION()
1657 MY_MYSQL *mysql; in PHP_FUNCTION() local
1665 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_INITIALIZED); in PHP_FUNCTION()
1673 mysql_ssl_set(mysql->mysql, ssl_parm[0], ssl_parm[1], ssl_parm[2], ssl_parm[3], ssl_parm[4]); in PHP_FUNCTION()
1682 MY_MYSQL *mysql; in PHP_FUNCTION() local
1689 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
1691 if (mysqlnd_stat(mysql->mysql, &stat) == PASS) in PHP_FUNCTION()
1704 MY_MYSQL *mysql; in PHP_FUNCTION() local
1711 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_INITIALIZED); in PHP_FUNCTION()
1712 RETURN_BOOL(!mysql_refresh(mysql->mysql, (uint8_t) options)); in PHP_FUNCTION()
1844 MY_MYSQL *mysql; in PHP_FUNCTION() local
1852 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
1856 if (!(stmt->stmt = mysql_stmt_init(mysql->mysql))) { in PHP_FUNCTION()
1953 MY_MYSQL *mysql; in PHP_FUNCTION() local
1963 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
1964 result = mysql_store_result(mysql->mysql); in PHP_FUNCTION()
1966 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
1970 php_mysqli_report_index("from previous query", mysqli_server_status(mysql->mysql)); in PHP_FUNCTION()
1983 MY_MYSQL *mysql; in PHP_FUNCTION() local
1989 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
1991 RETURN_LONG((zend_long) mysql_thread_id(mysql->mysql)); in PHP_FUNCTION()
2009 MY_MYSQL *mysql; in PHP_FUNCTION() local
2017 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
2019 if (!(result = mysql_use_result(mysql->mysql))) { in PHP_FUNCTION()
2020 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
2025 php_mysqli_report_index("from previous query", mysqli_server_status(mysql->mysql)); in PHP_FUNCTION()
2037 MY_MYSQL *mysql; in PHP_FUNCTION() local
2043 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
2045 RETURN_LONG(mysql_warning_count(mysql->mysql)); in PHP_FUNCTION()