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));
1246 MY_MYSQL *mysql; local
1252 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1254 RETURN_LONG(mysql_field_count(mysql->mysql));
1350 MY_MYSQL *mysql; local
1356 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1358 RETURN_STRING((mysql->mysql->host_info) ? mysql->mysql->host_info : "");
1360 RETURN_STRING((mysql->mysql->data->host_info) ? mysql->mysql->data->host_info : "");
1368 MY_MYSQL *mysql; local
1374 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1375 RETURN_LONG(mysql_get_proto_info(mysql->mysql));
1382 MY_MYSQL *mysql; local
1388 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1390 RETURN_STRING(mysql_get_server_info(mysql->mysql));
1397 MY_MYSQL *mysql; local
1403 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1405 RETURN_LONG(mysql_get_server_version(mysql->mysql));
1412 MY_MYSQL *mysql; local
1419 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1421 info = mysql_info(mysql->mysql);
1432 MY_MYSQL *mysql; local
1442 mysql = (MY_MYSQL *)ecalloc(1, sizeof(MY_MYSQL));
1445 if (!(mysql->mysql = mysql_init(NULL)))
1451 if (!(mysql->mysql = mysqlnd_init(MYSQLND_CLIENT_KNOWS_RSET_COPY_DATA, TRUE)))
1454 efree(mysql);
1459 mysqli_resource->ptr = (void *)mysql;
1480 MY_MYSQL *mysql; local
1487 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1488 rc = mysql_insert_id(mysql->mysql);
1496 MY_MYSQL *mysql; local
1509 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1511 if (mysql_kill(mysql->mysql, processid)) {
1512 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
1522 MY_MYSQL *mysql; local
1528 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1530 RETURN_BOOL(mysql_more_results(mysql->mysql));
1536 MY_MYSQL *mysql; local
1542 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1544 if (mysql_next_result(mysql->mysql)) {
1545 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
1690 MY_MYSQL *mysql; local
1701 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_INITIALIZED);
1727 ret = mysql_options(mysql->mysql, mysql_option, Z_STRVAL_P(mysql_value));
1731 ret = mysql_options(mysql->mysql, mysql_option, (char *)&l_value);
1745 MY_MYSQL *mysql; local
1752 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1753 rc = mysql_ping(mysql->mysql);
1754 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
1763 MY_MYSQL *mysql; local
1773 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1776 if (mysql->mysql->status == MYSQL_STATUS_GET_RESULT) {
1784 if ((stmt->stmt = mysql_stmt_init(mysql->mysql))) {
1794 memcpy(sqlstate, mysql->mysql->net.sqlstate, SQLSTATE_LENGTH+1);
1796 MYSQLND_ERROR_INFO error_info = *mysql->mysql->data->error_info;
1797 mysql->mysql->data->error_info->error_list.head = NULL;
1798 mysql->mysql->data->error_info->error_list.tail = NULL;
1799 mysql->mysql->data->error_info->error_list.count = 0;
1806 mysql->mysql->net.last_errno = last_errno;
1807 memcpy(mysql->mysql->net.last_error, last_error, MYSQL_ERRMSG_SIZE);
1808 memcpy(mysql->mysql->net.sqlstate, sqlstate, SQLSTATE_LENGTH+1);
1810 zend_llist_clean(&mysql->mysql->data->error_info->error_list);
1811 *mysql->mysql->data->error_info = error_info;
1826 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
1853 MY_MYSQL *mysql; local
1861 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1865 if (mysql_real_query(mysql->mysql, query, query_len)) {
1866 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
1870 if (!mysql_field_count(mysql->mysql)) {
1872 php_mysqli_report_index(query, mysqli_server_status(mysql->mysql));
1881 # define mysql_real_escape_string_quote(mysql, to, from, length, quote) \ argument
1882 mysql_real_escape_string(mysql, to, from, length)
1886 MY_MYSQL *mysql; local
1895 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1898 …ZSTR_LEN(newstr) = mysql_real_escape_string_quote(mysql->mysql, ZSTR_VAL(newstr), escapestr, escap…
1907 MY_MYSQL *mysql; local
1916 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1919 if (mysqli_commit_or_rollback_libmysql(mysql->mysql, FALSE, flags, name)) {
1921 if (FAIL == mysqlnd_rollback(mysql->mysql, flags, name)) {
1923 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
2120 MY_MYSQL *mysql; local
2128 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
2130 if (mysql_select_db(mysql->mysql, dbname)) {
2131 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
2141 MY_MYSQL *mysql; local
2147 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
2148 RETURN_STRING(mysql_sqlstate(mysql->mysql));
2155 MY_MYSQL *mysql; local
2163 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_INITIALIZED);
2171 mysql_ssl_set(mysql->mysql, ssl_parm[0], ssl_parm[1], ssl_parm[2], ssl_parm[3], ssl_parm[4]);
2180 MY_MYSQL *mysql; local
2191 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
2194 if ((stat = (char *)mysql_stat(mysql->mysql)))
2198 if (mysqlnd_stat(mysql->mysql, &stat) == PASS)
2212 MY_MYSQL *mysql; local
2219 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_INITIALIZED);
2221 RETURN_BOOL(!mysql_refresh(mysql->mysql, (uint8_t) options));
2223 RETURN_BOOL(!mysql_refresh(mysql->mysql, options));
2361 MY_MYSQL *mysql; local
2369 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
2373 if (!(stmt->stmt = mysql_stmt_init(mysql->mysql))) {
2498 MY_MYSQL *mysql; local
2508 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
2510 …LI_STORE_RESULT_COPY_DATA? mysqlnd_store_result_ofs(mysql->mysql) : mysqlnd_store_result(mysql->my…
2512 result = mysql_store_result(mysql->mysql);
2515 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
2519 php_mysqli_report_index("from previous query", mysqli_server_status(mysql->mysql));
2532 MY_MYSQL *mysql; local
2538 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
2540 RETURN_LONG((zend_long) mysql_thread_id(mysql->mysql));
2558 MY_MYSQL *mysql; local
2566 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
2568 if (!(result = mysql_use_result(mysql->mysql))) {
2569 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
2574 php_mysqli_report_index("from previous query", mysqli_server_status(mysql->mysql));
2586 MY_MYSQL *mysql; local
2592 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
2594 RETURN_LONG(mysql_warning_count(mysql->mysql));