Lines Matching refs:mysql

50 	MY_MYSQL			*mysql = NULL;  local
91 mysql = (MY_MYSQL*) mysqli_resource->ptr;
94 if (!mysql) {
95 mysql = (MY_MYSQL *) ecalloc(1, sizeof(MY_MYSQL));
107 MYSQLI_FETCH_RESOURCE_CONN(mysql, object, MYSQLI_STATUS_INITIALIZED);
132 if (mysql->mysql && mysqli_resource &&
136 php_mysqli_close(mysql, MYSQLI_CLOSE_IMPLICIT, mysqli_resource->status);
144 mysql->persistent = persistent = true;
150 mysql->hash_key = hash_key;
161 if (mysql->mysql) {
162 mysqli_close(mysql->mysql, MYSQLI_CLOSE_IMPLICIT);
165 mysql->mysql = zend_ptr_stack_pop(&plist->free_links);
171 if (!mysqli_change_user_silent(mysql->mysql, username, passwd, dbname, passwd_len)) {
173 if (!mysql_ping(mysql->mysql)) {
175 mysqlnd_restart_psession(mysql->mysql);
179 php_mysqli_set_error(mysql_errno(mysql->mysql), (char *) mysql_error(mysql->mysql));
183 if (mysql->mysql->data->vio->data->ssl) {
187 …ssl_key = mysql->mysql->data->vio->data->options.ssl_key ? estrdup(mysql->mysql->data->vio->data->…
188 …ssl_cert = mysql->mysql->data->vio->data->options.ssl_cert ? estrdup(mysql->mysql->data->vio->data…
189 …ssl_ca = mysql->mysql->data->vio->data->options.ssl_ca ? estrdup(mysql->mysql->data->vio->data->op…
190 …ssl_capath = mysql->mysql->data->vio->data->options.ssl_capath ? estrdup(mysql->mysql->data->vio->…
191 …ssl_cipher = mysql->mysql->data->vio->data->options.ssl_cipher ? estrdup(mysql->mysql->data->vio->…
194 mysqli_close(mysql->mysql, MYSQLI_CLOSE_IMPLICIT);
195 mysql->mysql = NULL;
220 if (!mysql->mysql) {
221 if (!(mysql->mysql = mysqlnd_init(MYSQLND_CLIENT_NO_FLAG, persistent))) {
229 mysql_ssl_set(mysql->mysql, ssl_key, ssl_cert, ssl_ca, ssl_capath, ssl_cipher);
251 if (mysqlnd_connect(mysql->mysql, hostname, username, passwd, passwd_len, dbname, dbname_len,
255 php_mysqli_set_error(mysql_errno(mysql->mysql), (char *) mysql_error(mysql->mysql));
256 php_mysqli_throw_sql_exception((char *)mysql_sqlstate(mysql->mysql), mysql_errno(mysql->mysql),
257 "%s", mysql_error(mysql->mysql));
260 mysqli_close(mysql->mysql, MYSQLI_CLOSE_DISCONNECTED);
261 mysql->mysql = NULL;
267 php_mysqli_set_error(mysql_errno(mysql->mysql), (char *) mysql_error(mysql->mysql));
270 mysql_options(mysql->mysql, MYSQL_OPT_LOCAL_INFILE, (char *)&allow_local_infile);
273 mysql_options(mysql->mysql, MYSQL_OPT_LOAD_DATA_LOCAL_DIR, MyG(local_infile_directory));
279 mysqli_resource->ptr = (void *)mysql;
290 mysql->multi_query = 0;
302 if (mysql->hash_key) {
303 zend_string_release_ex(mysql->hash_key, 0);
304 mysql->hash_key = NULL;
305 mysql->persistent = false;
308 efree(mysql);
450 MY_MYSQL *mysql; local
457 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
459 mysqlnd_get_connection_stats(mysql->mysql, return_value);
466 MY_MYSQL *mysql; local
472 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
477 …for (message = (MYSQLND_ERROR_LIST_ELEMENT *) zend_llist_get_first_ex(&mysql->mysql->data->error_i…
479 …message = (MYSQLND_ERROR_LIST_ELEMENT *) zend_llist_get_next_ex(&mysql->mysql->data->error_info->e…
532 MY_MYSQL *mysql; local
540 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
543 if (mysql_real_query(mysql->mysql, query, query_len)) {
544 MYSQLND_ERROR_INFO error_info = *mysql->mysql->data->error_info;
545 mysql->mysql->data->error_info->error_list.head = NULL;
546 mysql->mysql->data->error_info->error_list.tail = NULL;
547 mysql->mysql->data->error_info->error_list.count = 0;
548 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
551 zend_llist_clean(&mysql->mysql->data->error_info->error_list);
552 *mysql->mysql->data->error_info = error_info;
562 MY_MYSQL *mysql; local
585 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
591 if (mysqli_async_query(mysql->mysql, query, query_len)) {
592 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
595 mysql->async_result_fetch_type = resultmode & ~MYSQLI_ASYNC;
599 if (mysql_real_query(mysql->mysql, query, query_len)) {
600 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
604 if (!mysql_field_count(mysql->mysql)) {
607 php_mysqli_report_index(query, mysqli_server_status(mysql->mysql));
614 result = mysql_store_result(mysql->mysql);
617 result = mysql_use_result(mysql->mysql);
621 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
626 php_mysqli_report_index(query, mysqli_server_status(mysql->mysql));
652 MY_MYSQL *mysql; local
659 mysql = (MY_MYSQL*) my_res->ptr;
664 (*out_array)[current++] = mysql->mysql;
686 MY_MYSQL *mysql; local
693 mysql = (MY_MYSQL *) my_res->ptr;
694 if (mysql->mysql == *p) {
721 MY_MYSQL *mysql; local
723 mysql = (MY_MYSQL *)((MYSQLI_RESOURCE *)intern->ptr)->ptr;
724 if (mysql->mysql == *p) {
811 MY_MYSQL *mysql; local
820 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
822 if (FAIL == mysqlnd_reap_async_query(mysql->mysql)) {
823 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
827 if (!mysql_field_count(mysql->mysql)) {
835 switch (mysql->async_result_fetch_type) {
837 result = mysql_store_result(mysql->mysql);
840 result = mysql_use_result(mysql->mysql);
845 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
888 MY_MYSQL *mysql; local
896 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
898 if (mysql_warning_count(mysql->mysql)) {
899 w = php_get_warnings(mysql->mysql->data);
940 MY_MYSQL *mysql; local
948 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
950 if (mysql_set_character_set(mysql->mysql, cs_name)) {
951 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
961 MY_MYSQL *mysql; local
970 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
973 cs = mysql->mysql->data->charset;
1001 MY_MYSQL *mysql; local
1010 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1020 if (FAIL == mysqlnd_begin_transaction(mysql->mysql, flags, name)) {
1030 MY_MYSQL *mysql; local
1038 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1044 if (FAIL == mysqlnd_savepoint(mysql->mysql, name)) {
1054 MY_MYSQL *mysql; local
1062 MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
1067 if (FAIL == mysqlnd_release_savepoint(mysql->mysql, name)) {