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
316 if (H->assume_national_character_set_strings) { in mysql_handle_quoter()
332 …quotedlen = mysql_real_escape_string_quote(H->server, quoted + 2, ZSTR_VAL(unquoted), ZSTR_LEN(unq… in mysql_handle_quoter()
338 …quotedlen = mysql_real_escape_string_quote(H->server, quoted + 1, ZSTR_VAL(unquoted), ZSTR_LEN(unq… in mysql_handle_quoter()
468 pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data; in pdo_mysql_set_attribute() local
469 …if (mysql_options(H->server, MYSQLND_OPT_INT_AND_FLOAT_NATIVE, (const char *) &int_and_float_nativ… in pdo_mysql_set_attribute()
499 pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data; local
510 ZVAL_STRING(return_value, (char *)mysql_get_server_info(H->server));
514 ZVAL_STRING(return_value, (char *)mysql_get_host_info(H->server));
520 if (mysqlnd_stat(H->server, &tmp) == PASS) {
524 if ((tmp = (char *)mysql_stat(H->server))) {
539 …ZVAL_LONG(return_value, H->assume_national_character_set_strings ? PDO_PARAM_STR_NATL : PDO_PARAM_…
543 ZVAL_LONG(return_value, H->buffered);
548 ZVAL_LONG(return_value, H->emulate_prepare);
553 ZVAL_LONG(return_value, H->max_buffer_size);
558 ZVAL_BOOL(return_value, H->local_infile);
566 local_infile_directory = H->server->data->options->local_infile_directory;
568 mysql_get_option(H->server, MYSQL_OPT_LOAD_DATA_LOCAL_DIR, &local_infile_directory);
590 pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data; local
595 if (mysql_ping(H->server)) {
609 pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data; local
610 if (H->server) {
611 mysqlnd_end_psession(H->server);
626 pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data; local
628 PDO_DBG_RETURN((pdo_mysql_get_server_status(H->server) & SERVER_STATUS_IN_TRANS) != 0);
662 pdo_mysql_db_handle *H; local
703 H = pecalloc(1, sizeof(pdo_mysql_db_handle), dbh->is_persistent);
705 H->einfo.errcode = 0;
706 H->einfo.errmsg = NULL;
711 if (!(H->server = pdo_mysql_init(dbh->is_persistent))) {
717 mysqlnd_restart_psession(H->server);
721 dbh->driver_data = H;
731 H->max_buffer_size = 1024*1024;
734 H->assume_national_character_set_strings = 0;
735 H->buffered = H->emulate_prepare = 1;
746 H->buffered = pdo_attr_lval(driver_options, PDO_MYSQL_ATTR_USE_BUFFERED_QUERY, 1);
748 H->emulate_prepare = pdo_attr_lval(driver_options,
749 PDO_MYSQL_ATTR_DIRECT_QUERY, H->emulate_prepare);
750 H->emulate_prepare = pdo_attr_lval(driver_options,
751 PDO_ATTR_EMULATE_PREPARES, H->emulate_prepare);
753 H->assume_national_character_set_strings = pdo_attr_lval(driver_options,
757 …H->max_buffer_size = pdo_attr_lval(driver_options, PDO_MYSQL_ATTR_MAX_BUFFER_SIZE, H->max_buffer_s…
768 if (mysql_options(H->server, MYSQL_OPT_CONNECT_TIMEOUT, (const char *)&connect_timeout)) {
774 H->local_infile = 1;
777 H->local_infile = 0;
785 …if (mysql_options(H->server, MYSQL_OPT_LOAD_DATA_LOCAL_DIR, (const char *)ZSTR_VAL(local_infile_di…
800 mysql_options(H->server, MYSQL_OPT_RECONNECT, (const char*)&reconnect);
805 if (mysql_options(H->server, MYSQL_INIT_COMMAND, (const char *)ZSTR_VAL(init_cmd))) {
815 if (mysql_options(H->server, MYSQL_READ_DEFAULT_FILE, (const char *)ZSTR_VAL(default_file))) {
825 if (mysql_options(H->server, MYSQL_READ_DEFAULT_GROUP, (const char *)ZSTR_VAL(default_group))) {
835 if (mysql_options(H->server, MYSQL_OPT_COMPRESS, 0)) {
848 mysql_ssl_set(H->server,
875 if (mysql_options(H->server, MYSQL_SERVER_PUBLIC_KEY, ZSTR_VAL(public_key))) {
899 unsigned int local_infile = H->local_infile;
900 if (mysql_options(H->server, MYSQL_OPT_LOCAL_INFILE, (const char *)&local_infile)) {
907 …if (mysql_options(H->server, MYSQLND_OPT_INT_AND_FLOAT_NATIVE, (const char *) &int_and_float_nativ…
913 if (vars[0].optval && mysql_options(H->server, MYSQL_SET_CHARSET_NAME, vars[0].optval)) {
950 …if (mysqlnd_connect(H->server, host, dbh->username, dbh->password, password_len, dbname, dbname_le…
953 …if (mysql_real_connect(H->server, host, dbh->username, dbh->password, dbname, port, unix_socket, c…
963 H->attached = 1;