Lines Matching refs:mysql

52 	MY_MYSQL			*mysql = NULL;  local
93 mysql = (MY_MYSQL*) mysqli_resource->ptr;
96 if (!mysql) {
97 mysql = (MY_MYSQL *) ecalloc(1, sizeof(MY_MYSQL));
109 MYSQLI_FETCH_RESOURCE_CONN(mysql, object, MYSQLI_STATUS_INITIALIZED);
134 if (mysql->mysql && mysqli_resource &&
138 php_mysqli_close(mysql, MYSQLI_CLOSE_IMPLICIT, mysqli_resource->status);
146 mysql->persistent = persistent = true;
152 mysql->hash_key = hash_key;
163 if (mysql->mysql) {
164 mysqli_close(mysql->mysql, MYSQLI_CLOSE_IMPLICIT);
167 mysql->mysql = zend_ptr_stack_pop(&plist->free_links);
173 if (!mysqli_change_user_silent(mysql->mysql, username, passwd, dbname, passwd_len)) {
175 if (!mysql_ping(mysql->mysql)) {
177 mysqlnd_restart_psession(mysql->mysql);
181 php_mysqli_set_error(mysql_errno(mysql->mysql), (char *) mysql_error(mysql->mysql));
185 if (mysql->mysql->data->vio->data->ssl) {
189 …ssl_key = mysql->mysql->data->vio->data->options.ssl_key ? estrdup(mysql->mysql->data->vio->data->…
190 …ssl_cert = mysql->mysql->data->vio->data->options.ssl_cert ? estrdup(mysql->mysql->data->vio->data…
191 …ssl_ca = mysql->mysql->data->vio->data->options.ssl_ca ? estrdup(mysql->mysql->data->vio->data->op…
192 …ssl_capath = mysql->mysql->data->vio->data->options.ssl_capath ? estrdup(mysql->mysql->data->vio->…
193 …ssl_cipher = mysql->mysql->data->vio->data->options.ssl_cipher ? estrdup(mysql->mysql->data->vio->…
196 mysqli_close(mysql->mysql, MYSQLI_CLOSE_IMPLICIT);
197 mysql->mysql = NULL;
222 if (!mysql->mysql) {
223 if (!(mysql->mysql = mysqlnd_init(MYSQLND_CLIENT_NO_FLAG, persistent))) {
231 mysql_ssl_set(mysql->mysql, ssl_key, ssl_cert, ssl_ca, ssl_capath, ssl_cipher);
253 if (mysqlnd_connect(mysql->mysql, hostname, username, passwd, passwd_len, dbname, dbname_len,
257 php_mysqli_set_error(mysql_errno(mysql->mysql), (char *) mysql_error(mysql->mysql));
258 php_mysqli_throw_sql_exception((char *)mysql_sqlstate(mysql->mysql), mysql_errno(mysql->mysql),
259 "%s", mysql_error(mysql->mysql));
262 mysqli_close(mysql->mysql, MYSQLI_CLOSE_DISCONNECTED);
263 mysql->mysql = NULL;
269 php_mysqli_set_error(mysql_errno(mysql->mysql), (char *) mysql_error(mysql->mysql));
272 mysql_options(mysql->mysql, MYSQL_OPT_LOCAL_INFILE, (char *)&allow_local_infile);
275 mysql_options(mysql->mysql, MYSQL_OPT_LOAD_DATA_LOCAL_DIR, MyG(local_infile_directory));
281 mysqli_resource->ptr = (void *)mysql;
292 mysql->multi_query = 0;
304 if (mysql->hash_key) {
305 zend_string_release_ex(mysql->hash_key, 0);
306 mysql->hash_key = NULL;
307 mysql->persistent = false;
310 efree(mysql);
452 MY_MYSQL *mysql; local
459 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
461 mysqlnd_get_connection_stats(mysql->mysql, return_value);
468 MY_MYSQL *mysql; local
474 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
479 …for (message = (MYSQLND_ERROR_LIST_ELEMENT *) zend_llist_get_first_ex(&mysql->mysql->data->error_i…
481 …message = (MYSQLND_ERROR_LIST_ELEMENT *) zend_llist_get_next_ex(&mysql->mysql->data->error_info->e…
534 MY_MYSQL *mysql; local
542 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
545 if (mysql_real_query(mysql->mysql, query, query_len)) {
546 MYSQLND_ERROR_INFO error_info = *mysql->mysql->data->error_info;
547 mysql->mysql->data->error_info->error_list.head = NULL;
548 mysql->mysql->data->error_info->error_list.tail = NULL;
549 mysql->mysql->data->error_info->error_list.count = 0;
550 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
553 zend_llist_clean(&mysql->mysql->data->error_info->error_list);
554 *mysql->mysql->data->error_info = error_info;
564 MY_MYSQL *mysql; local
587 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
593 if (mysqli_async_query(mysql->mysql, query, query_len)) {
594 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
597 mysql->async_result_fetch_type = resultmode & ~MYSQLI_ASYNC;
601 if (mysql_real_query(mysql->mysql, query, query_len)) {
602 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
606 if (!mysql_field_count(mysql->mysql)) {
609 php_mysqli_report_index(query, mysqli_server_status(mysql->mysql));
616 result = mysql_store_result(mysql->mysql);
619 result = mysql_use_result(mysql->mysql);
623 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
628 php_mysqli_report_index(query, mysqli_server_status(mysql->mysql));
656 MY_MYSQL *mysql; local
663 mysql = (MY_MYSQL*) my_res->ptr;
668 (*out_array)[current++] = mysql->mysql;
691 MY_MYSQL *mysql; local
698 mysql = (MY_MYSQL *) my_res->ptr;
699 if (mysql->mysql == *p) {
728 MY_MYSQL *mysql; local
730 mysql = (MY_MYSQL *)((MYSQLI_RESOURCE *)intern->ptr)->ptr;
731 if (mysql->mysql == *p) {
822 MY_MYSQL *mysql; local
831 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
833 if (FAIL == mysqlnd_reap_async_query(mysql->mysql)) {
834 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
838 if (!mysql_field_count(mysql->mysql)) {
846 switch (mysql->async_result_fetch_type) {
848 result = mysql_store_result(mysql->mysql);
851 result = mysql_use_result(mysql->mysql);
856 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
899 MY_MYSQL *mysql; local
907 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
909 if (mysql_warning_count(mysql->mysql)) {
910 w = php_get_warnings(mysql->mysql->data);
951 MY_MYSQL *mysql; local
959 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
961 if (mysql_set_character_set(mysql->mysql, cs_name)) {
962 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
972 MY_MYSQL *mysql; local
981 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
984 cs = mysql->mysql->data->charset;
1012 MY_MYSQL *mysql; local
1021 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1031 if (FAIL == mysqlnd_begin_transaction(mysql->mysql, flags, name)) {
1041 MY_MYSQL *mysql; local
1049 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1055 if (FAIL == mysqlnd_savepoint(mysql->mysql, name)) {
1065 MY_MYSQL *mysql; local
1073 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1078 if (FAIL == mysqlnd_release_savepoint(mysql->mysql, name)) {