Lines Matching refs:H

44 	pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data;  in _pdo_mysql_error()  local
57 einfo = &H->einfo; in _pdo_mysql_error()
63 einfo->errcode = mysql_errno(H->server); in _pdo_mysql_error()
76 if (mysql_more_results(H->server)) { in _pdo_mysql_error()
100 einfo->errmsg = pestrdup(mysql_error(H->server), dbh->is_persistent); in _pdo_mysql_error()
111 strcpy(*pdo_err, mysql_sqlstate(H->server)); in _pdo_mysql_error()
126 pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data; in pdo_mysql_fetch_error_func() local
127 pdo_mysql_error_info *einfo = &H->einfo; in pdo_mysql_fetch_error_func()
135 einfo = &H->einfo; in pdo_mysql_fetch_error_func()
150 pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data; in mysql_handle_closer() local
154 if (H) { in mysql_handle_closer()
155 if (H->server) { in mysql_handle_closer()
156 mysql_close(H->server); in mysql_handle_closer()
157 H->server = NULL; in mysql_handle_closer()
159 if (H->einfo.errmsg) { in mysql_handle_closer()
160 pefree(H->einfo.errmsg, dbh->is_persistent); in mysql_handle_closer()
161 H->einfo.errmsg = NULL; in mysql_handle_closer()
163 pefree(H, dbh->is_persistent); in mysql_handle_closer()
172 pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data; in mysql_handle_preparer() local
182 S->H = H; in mysql_handle_preparer()
186 if (H->emulate_prepare) { in mysql_handle_preparer()
190 server_version = mysql_get_server_version(H->server); in mysql_handle_preparer()
206 if (!(S->stmt = mysql_stmt_init(H->server))) { in mysql_handle_preparer()
220 if (mysql_errno(H->server) == 1295) { in mysql_handle_preparer()
260 pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data; in mysql_handle_doer() local
265 if (mysql_real_query(H->server, ZSTR_VAL(sql), ZSTR_LEN(sql))) { in mysql_handle_doer()
269 my_ulonglong c = mysql_affected_rows(H->server); in mysql_handle_doer()
272 PDO_DBG_RETURN(H->einfo.errcode ? -1 : 0); in mysql_handle_doer()
277 while (mysql_more_results(H->server)) { in mysql_handle_doer()
278 if (mysql_next_result(H->server)) { in mysql_handle_doer()
282 result = mysql_store_result(H->server); in mysql_handle_doer()
296 pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data; in pdo_mysql_last_insert_id() local
298 PDO_DBG_RETURN(zend_u64_to_str(mysql_insert_id(H->server))); in pdo_mysql_last_insert_id()
310 pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data; in mysql_handle_quoter() local
318 if (H->assume_national_character_set_strings) { in mysql_handle_quoter()
338 …quotedlen = mysql_real_escape_string_quote(H->server, quoted + 2, ZSTR_VAL(unquoted), ZSTR_LEN(unq… in mysql_handle_quoter()
344 …quotedlen = mysql_real_escape_string_quote(H->server, quoted + 8, ZSTR_VAL(unquoted), ZSTR_LEN(unq… in mysql_handle_quoter()
349 …quotedlen = mysql_real_escape_string_quote(H->server, quoted + 1, ZSTR_VAL(unquoted), ZSTR_LEN(unq… in mysql_handle_quoter()
479 pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data; in pdo_mysql_set_attribute() local
480 …if (mysql_options(H->server, MYSQLND_OPT_INT_AND_FLOAT_NATIVE, (const char *) &int_and_float_nativ… in pdo_mysql_set_attribute()
510 pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data; local
521 ZVAL_STRING(return_value, (char *)mysql_get_server_info(H->server));
525 ZVAL_STRING(return_value, (char *)mysql_get_host_info(H->server));
531 if (mysqlnd_stat(H->server, &tmp) == PASS) {
535 if ((tmp = (char *)mysql_stat(H->server))) {
550 …ZVAL_LONG(return_value, H->assume_national_character_set_strings ? PDO_PARAM_STR_NATL : PDO_PARAM_…
554 ZVAL_BOOL(return_value, H->buffered);
559 ZVAL_BOOL(return_value, H->emulate_prepare);
564 ZVAL_LONG(return_value, H->max_buffer_size);
569 ZVAL_BOOL(return_value, H->local_infile);
577 local_infile_directory = H->server->data->options->local_infile_directory;
579 mysql_get_option(H->server, MYSQL_OPT_LOAD_DATA_LOCAL_DIR, &local_infile_directory);
591 ZVAL_BOOL(return_value, H->fetch_table_names);
605 pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data; local
610 if (mysql_ping(H->server)) {
624 pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data; local
625 if (H->server) {
626 mysqlnd_end_psession(H->server);
641 pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data; local
643 PDO_DBG_RETURN((pdo_mysql_get_server_status(H->server) & SERVER_STATUS_IN_TRANS) != 0);
678 pdo_mysql_db_handle *H; local
719 H = pecalloc(1, sizeof(pdo_mysql_db_handle), dbh->is_persistent);
721 H->einfo.errcode = 0;
722 H->einfo.errmsg = NULL;
727 if (!(H->server = pdo_mysql_init(dbh->is_persistent))) {
733 mysqlnd_restart_psession(H->server);
737 dbh->driver_data = H;
747 H->max_buffer_size = 1024*1024;
750 H->assume_national_character_set_strings = 0;
751 H->buffered = H->emulate_prepare = 1;
762 H->buffered = pdo_attr_lval(driver_options, PDO_MYSQL_ATTR_USE_BUFFERED_QUERY, 1);
764 H->emulate_prepare = pdo_attr_lval(driver_options,
765 PDO_MYSQL_ATTR_DIRECT_QUERY, H->emulate_prepare);
766 H->emulate_prepare = pdo_attr_lval(driver_options,
767 PDO_ATTR_EMULATE_PREPARES, H->emulate_prepare);
769 H->assume_national_character_set_strings = pdo_attr_lval(driver_options,
773H->max_buffer_size = pdo_attr_lval(driver_options, PDO_MYSQL_ATTR_MAX_BUFFER_SIZE, H->max_buffer_s…
784 if (mysql_options(H->server, MYSQL_OPT_CONNECT_TIMEOUT, (const char *)&connect_timeout)) {
790 H->local_infile = 1;
793 H->local_infile = 0;
801 …if (mysql_options(H->server, MYSQL_OPT_LOAD_DATA_LOCAL_DIR, (const char *)ZSTR_VAL(local_infile_di…
816 mysql_options(H->server, MYSQL_OPT_RECONNECT, (const char*)&reconnect);
821 if (mysql_options(H->server, MYSQL_INIT_COMMAND, (const char *)ZSTR_VAL(init_cmd))) {
831 if (mysql_options(H->server, MYSQL_READ_DEFAULT_FILE, (const char *)ZSTR_VAL(default_file))) {
841 if (mysql_options(H->server, MYSQL_READ_DEFAULT_GROUP, (const char *)ZSTR_VAL(default_group))) {
851 if (mysql_options(H->server, MYSQL_OPT_COMPRESS, 0)) {
864 mysql_ssl_set(H->server,
891 if (mysql_options(H->server, MYSQL_SERVER_PUBLIC_KEY, ZSTR_VAL(public_key))) {
915 unsigned int local_infile = H->local_infile;
916 if (mysql_options(H->server, MYSQL_OPT_LOCAL_INFILE, (const char *)&local_infile)) {
923 …if (mysql_options(H->server, MYSQLND_OPT_INT_AND_FLOAT_NATIVE, (const char *) &int_and_float_nativ…
929 if (vars[0].optval && mysql_options(H->server, MYSQL_SET_CHARSET_NAME, vars[0].optval)) {
966 …if (mysqlnd_connect(H->server, host, dbh->username, dbh->password, password_len, dbname, dbname_le…
969 …if (mysql_real_connect(H->server, host, dbh->username, dbh->password, dbname, port, unix_socket, c…
979 H->attached = 1;