Lines Matching refs:mysql

141 	MY_MYSQL 		*mysql;  in PHP_FUNCTION()  local
149 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
151 rc = mysql_affected_rows(mysql->mysql); in PHP_FUNCTION()
162 MY_MYSQL *mysql; in PHP_FUNCTION() local
169 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
171 if (mysql_autocommit(mysql->mysql, (my_bool)automode)) { in PHP_FUNCTION()
172 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
569 MY_MYSQL *mysql; in PHP_FUNCTION() local
581 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
584 mysql_get_character_set_info(mysql->mysql, &old_charset); in PHP_FUNCTION()
588 rc = mysqlnd_change_user_ex(mysql->mysql, user, password, dbname, false, (size_t) password_len); in PHP_FUNCTION()
590 rc = mysql_change_user(mysql->mysql, user, password, dbname); in PHP_FUNCTION()
592 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION()
598 if (mysql_get_server_version(mysql->mysql) < 50123L) { in PHP_FUNCTION()
604 rc = mysql_set_character_set(mysql->mysql, old_charset.csname); in PHP_FUNCTION()
615 MY_MYSQL *mysql; in PHP_FUNCTION() local
622 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); in PHP_FUNCTION()
623 RETURN_STRING(mysql_character_set_name(mysql->mysql)); in PHP_FUNCTION()
628 void php_mysqli_close(MY_MYSQL * mysql, int close_type, int resource_status) in php_mysqli_close() argument
634 if (!mysql->persistent) { in php_mysqli_close()
635 mysqli_close(mysql->mysql, close_type); in php_mysqli_close()
638 if ((le = zend_hash_find_ptr(&EG(persistent_list), mysql->hash_key)) != NULL) { in php_mysqli_close()
642 mysqlnd_end_psession(mysql->mysql); in php_mysqli_close()
647 mysqli_commit_or_rollback_libmysql(mysql->mysql, false, TRANS_COR_NO_OPT, NULL)) in php_mysqli_close()
649 FAIL == mysqlnd_rollback(mysql->mysql, TRANS_COR_NO_OPT, NULL)) in php_mysqli_close()
652 mysqli_close(mysql->mysql, close_type); in php_mysqli_close()
654 zend_ptr_stack_push(&plist->free_links, mysql->mysql); in php_mysqli_close()
660 mysql->persistent = false; in php_mysqli_close()
662 mysql->mysql = NULL; in php_mysqli_close()
664 php_clear_mysql(mysql); in php_mysqli_close()
672 MY_MYSQL *mysql; in PHP_FUNCTION() local
678 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_INITIALIZED); in PHP_FUNCTION()
680 …php_mysqli_close(mysql, MYSQLI_CLOSE_EXPLICIT, ((MYSQLI_RESOURCE *)(Z_MYSQLI_P(mysql_link))->ptr)-… in PHP_FUNCTION()
684 efree(mysql); in PHP_FUNCTION()
692 MY_MYSQL *mysql; local
701 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
704 if (mysqli_commit_or_rollback_libmysql(mysql->mysql, true, flags, name)) {
706 if (FAIL == mysqlnd_commit(mysql->mysql, flags, name)) {
708 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
769 MY_MYSQL *mysql; local
775 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
777 RETURN_BOOL(!mysql_dump_debug_info(mysql->mysql));
784 MY_MYSQL *mysql; local
790 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
791 RETURN_LONG(mysql_errno(mysql->mysql));
798 MY_MYSQL *mysql; local
804 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
805 RETURN_STRING(mysql_error(mysql->mysql));
1288 MY_MYSQL *mysql; local
1294 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1296 RETURN_LONG(mysql_field_count(mysql->mysql));
1396 MY_MYSQL *mysql; local
1402 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1404 RETURN_STRING((mysql->mysql->host_info) ? mysql->mysql->host_info : "");
1406 RETURN_STRING((mysql->mysql->data->host_info) ? mysql->mysql->data->host_info : "");
1414 MY_MYSQL *mysql; local
1420 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1421 RETURN_LONG(mysql_get_proto_info(mysql->mysql));
1428 MY_MYSQL *mysql; local
1434 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1436 RETURN_STRING(mysql_get_server_info(mysql->mysql));
1443 MY_MYSQL *mysql; local
1449 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1451 RETURN_LONG(mysql_get_server_version(mysql->mysql));
1458 MY_MYSQL *mysql; local
1465 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1467 info = mysql_info(mysql->mysql);
1478 MY_MYSQL *mysql; local
1488 mysql = (MY_MYSQL *)ecalloc(1, sizeof(MY_MYSQL));
1491 if (!(mysql->mysql = mysql_init(NULL)))
1497 if (!(mysql->mysql = mysqlnd_init(MYSQLND_CLIENT_NO_FLAG, true)))
1500 efree(mysql);
1505 mysqli_resource->ptr = (void *)mysql;
1526 MY_MYSQL *mysql; local
1533 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1534 rc = mysql_insert_id(mysql->mysql);
1542 MY_MYSQL *mysql; local
1555 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1557 if (mysql_kill(mysql->mysql, processid)) {
1558 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
1568 MY_MYSQL *mysql; local
1574 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1576 RETURN_BOOL(mysql_more_results(mysql->mysql));
1582 MY_MYSQL *mysql; local
1588 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1590 if (mysql_next_result(mysql->mysql)) {
1591 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
1737 MY_MYSQL *mysql; local
1748 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_INITIALIZED);
1774 if ((ret = mysql_options(mysql->mysql, mysql_option, Z_STRVAL_P(mysql_value)))) {
1775 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
1780 if ((ret = mysql_options(mysql->mysql, mysql_option, (char *)&l_value))) {
1781 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
1796 MY_MYSQL *mysql; local
1803 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1804 rc = mysql_ping(mysql->mysql);
1805 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
1814 MY_MYSQL *mysql; local
1824 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1827 if (mysql->mysql->status == MYSQL_STATUS_GET_RESULT) {
1835 if ((stmt->stmt = mysql_stmt_init(mysql->mysql))) {
1845 memcpy(sqlstate, mysql->mysql->net.sqlstate, SQLSTATE_LENGTH+1);
1847 MYSQLND_ERROR_INFO error_info = *mysql->mysql->data->error_info;
1848 mysql->mysql->data->error_info->error_list.head = NULL;
1849 mysql->mysql->data->error_info->error_list.tail = NULL;
1850 mysql->mysql->data->error_info->error_list.count = 0;
1857 mysql->mysql->net.last_errno = last_errno;
1858 memcpy(mysql->mysql->net.last_error, last_error, MYSQL_ERRMSG_SIZE);
1859 memcpy(mysql->mysql->net.sqlstate, sqlstate, SQLSTATE_LENGTH+1);
1861 zend_llist_clean(&mysql->mysql->data->error_info->error_list);
1862 *mysql->mysql->data->error_info = error_info;
1877 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
1904 MY_MYSQL *mysql; local
1912 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1916 if (mysql_real_query(mysql->mysql, query, query_len)) {
1917 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
1921 if (!mysql_field_count(mysql->mysql)) {
1923 php_mysqli_report_index(query, mysqli_server_status(mysql->mysql));
1932 # define mysql_real_escape_string_quote(mysql, to, from, length, quote) \ argument
1933 mysql_real_escape_string(mysql, to, from, length)
1937 MY_MYSQL *mysql; local
1946 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1949 …ZSTR_LEN(newstr) = mysql_real_escape_string_quote(mysql->mysql, ZSTR_VAL(newstr), escapestr, escap…
1958 MY_MYSQL *mysql; local
1967 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1970 if (mysqli_commit_or_rollback_libmysql(mysql->mysql, false, flags, name)) {
1972 if (FAIL == mysqlnd_rollback(mysql->mysql, flags, name)) {
1974 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
2171 MY_MYSQL *mysql; local
2179 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
2181 if (mysql_select_db(mysql->mysql, dbname)) {
2182 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
2192 MY_MYSQL *mysql; local
2198 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
2199 RETURN_STRING(mysql_sqlstate(mysql->mysql));
2206 MY_MYSQL *mysql; local
2214 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_INITIALIZED);
2222 mysql_ssl_set(mysql->mysql, ssl_parm[0], ssl_parm[1], ssl_parm[2], ssl_parm[3], ssl_parm[4]);
2231 MY_MYSQL *mysql; local
2242 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
2245 if ((stat = (char *)mysql_stat(mysql->mysql)))
2249 if (mysqlnd_stat(mysql->mysql, &stat) == PASS)
2263 MY_MYSQL *mysql; local
2270 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_INITIALIZED);
2272 RETURN_BOOL(!mysql_refresh(mysql->mysql, (uint8_t) options));
2274 RETURN_BOOL(!mysql_refresh(mysql->mysql, options));
2412 MY_MYSQL *mysql; local
2420 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
2424 if (!(stmt->stmt = mysql_stmt_init(mysql->mysql))) {
2549 MY_MYSQL *mysql; local
2559 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
2560 result = mysql_store_result(mysql->mysql);
2562 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
2566 php_mysqli_report_index("from previous query", mysqli_server_status(mysql->mysql));
2579 MY_MYSQL *mysql; local
2585 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
2587 RETURN_LONG((zend_long) mysql_thread_id(mysql->mysql));
2605 MY_MYSQL *mysql; local
2613 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
2615 if (!(result = mysql_use_result(mysql->mysql))) {
2616 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
2621 php_mysqli_report_index("from previous query", mysqli_server_status(mysql->mysql));
2633 MY_MYSQL *mysql; local
2639 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
2641 RETURN_LONG(mysql_warning_count(mysql->mysql));