stmt 51 ext/interbase/ibase_query.c isc_stmt_handle stmt; stmt 63 ext/interbase/ibase_query.c isc_stmt_handle stmt; stmt 119 ext/interbase/ibase_query.c static void _php_ibase_free_stmt_handle(ibase_db_link *link, isc_stmt_handle stmt) /* {{{ */ stmt 123 ext/interbase/ibase_query.c if (stmt) { stmt 129 ext/interbase/ibase_query.c if (isc_dsql_free_statement(IB_STATUS, &stmt, DSQL_drop)) { stmt 148 ext/interbase/ibase_query.c _php_ibase_free_stmt_handle(ib_result->link, ib_result->stmt); stmt 169 ext/interbase/ibase_query.c _php_ibase_free_stmt_handle(ib_query->link, ib_query->stmt); stmt 331 ext/interbase/ibase_query.c ib_query->stmt = 0; stmt 340 ext/interbase/ibase_query.c if (isc_dsql_allocate_statement(IB_STATUS, &link->handle, &ib_query->stmt)) { stmt 349 ext/interbase/ibase_query.c if (isc_dsql_prepare(IB_STATUS, &ib_query->trans->handle, &ib_query->stmt, stmt 356 ext/interbase/ibase_query.c if (isc_dsql_sql_info(IB_STATUS, &ib_query->stmt, sizeof(info_type), stmt 368 ext/interbase/ibase_query.c if (isc_dsql_describe(IB_STATUS, &ib_query->stmt, SQLDA_CURRENT_VERSION, ib_query->out_sqlda)) { stmt 378 ext/interbase/ibase_query.c if (isc_dsql_describe_bind(IB_STATUS, &ib_query->stmt, SQLDA_CURRENT_VERSION, ib_query->in_sqlda)) { stmt 389 ext/interbase/ibase_query.c if (isc_dsql_describe_bind(IB_STATUS, &ib_query->stmt, stmt 953 ext/interbase/ibase_query.c res->stmt = ib_query->stmt; stmt 983 ext/interbase/ibase_query.c &ib_query->stmt, SQLDA_CURRENT_VERSION, in_sqlda, out_sqlda); stmt 986 ext/interbase/ibase_query.c &ib_query->stmt, SQLDA_CURRENT_VERSION, in_sqlda); stmt 1004 ext/interbase/ibase_query.c if (isc_dsql_sql_info(IB_STATUS, &ib_query->stmt, sizeof(info_count), stmt 1189 ext/interbase/ibase_query.c ib_query.stmt = 0; /* keep stmt when free query */ stmt 1275 ext/interbase/ibase_query.c if (isc_dsql_sql_info(IB_STATUS, &ib_result->stmt, sizeof(info_count), info_count, sizeof(result), result)) { stmt 1495 ext/interbase/ibase_query.c if (isc_dsql_fetch(IB_STATUS, &ib_result->stmt, 1, ib_result->out_sqlda)) { stmt 1701 ext/interbase/ibase_query.c if (isc_dsql_set_cursor_name(IB_STATUS, &ib_result->stmt, name_arg, 0)) { stmt 1817 ext/interbase/ibase_query.c if (isc_dsql_free_statement(IB_STATUS, &ib_query->stmt, DSQL_close)) { stmt 1840 ext/interbase/ibase_query.c result->stmt = 0; stmt 154 ext/mysqli/mysqli.c void php_clear_stmt_bind(MY_STMT *stmt) stmt 156 ext/mysqli/mysqli.c if (stmt->stmt) { stmt 157 ext/mysqli/mysqli.c if (mysqli_stmt_close(stmt->stmt, TRUE)) { stmt 169 ext/mysqli/mysqli.c php_free_stmt_bind_buffer(stmt->param, FETCH_SIMPLE); stmt 171 ext/mysqli/mysqli.c php_free_stmt_bind_buffer(stmt->result, FETCH_RESULT); stmt 173 ext/mysqli/mysqli.c if (!Z_ISUNDEF(stmt->link_handle)) { stmt 174 ext/mysqli/mysqli.c zval_ptr_dtor(&stmt->link_handle); stmt 177 ext/mysqli/mysqli.c if (stmt->query) { stmt 178 ext/mysqli/mysqli.c efree(stmt->query); stmt 180 ext/mysqli/mysqli.c efree(stmt); stmt 246 ext/mysqli/mysqli.c MY_STMT *stmt = (MY_STMT *)my_res->ptr; stmt 247 ext/mysqli/mysqli.c php_clear_stmt_bind(stmt); stmt 1050 ext/mysqli/mysqli.c MY_STMT *stmt; stmt 1063 ext/mysqli/mysqli.c stmt = (MY_STMT *)ecalloc(1,sizeof(MY_STMT)); stmt 1065 ext/mysqli/mysqli.c stmt->stmt = mysql_stmt_init(mysql->mysql); stmt 1073 ext/mysqli/mysqli.c stmt = (MY_STMT *)ecalloc(1,sizeof(MY_STMT)); stmt 1075 ext/mysqli/mysqli.c if ((stmt->stmt = mysql_stmt_init(mysql->mysql))) { stmt 1076 ext/mysqli/mysqli.c mysql_stmt_prepare(stmt->stmt, (char *)statement, statement_len); stmt 1084 ext/mysqli/mysqli.c if (!stmt->stmt) { stmt 1085 ext/mysqli/mysqli.c efree(stmt); stmt 1089 ext/mysqli/mysqli.c ZVAL_COPY(&stmt->link_handle, mysql_link); stmt 1093 ext/mysqli/mysqli.c mysqli_resource->ptr = (void *)stmt; stmt 185 ext/mysqli/mysqli_api.c int mysqli_stmt_bind_param_do_bind(MY_STMT *stmt, unsigned int argc, unsigned int num_vars, stmt 193 ext/mysqli/mysqli_api.c if (stmt->param.var_cnt) { stmt 194 ext/mysqli/mysqli_api.c php_free_stmt_bind_buffer(stmt->param, FETCH_SIMPLE); stmt 197 ext/mysqli/mysqli_api.c stmt->param.is_null = ecalloc(num_vars, sizeof(char)); stmt 213 ext/mysqli/mysqli_api.c bind[ofs].is_null = &stmt->param.is_null[ofs]; stmt 223 ext/mysqli/mysqli_api.c bind[ofs].is_null = &stmt->param.is_null[ofs]; stmt 234 ext/mysqli/mysqli_api.c bind[ofs].is_null = &stmt->param.is_null[ofs]; stmt 244 ext/mysqli/mysqli_api.c rc = mysql_stmt_bind_param(stmt->stmt, bind); stmt 248 ext/mysqli/mysqli_api.c efree(stmt->param.is_null); stmt 250 ext/mysqli/mysqli_api.c stmt->param.var_cnt = num_vars; stmt 251 ext/mysqli/mysqli_api.c stmt->param.vars = safe_emalloc(num_vars, sizeof(zval), 0); stmt 254 ext/mysqli/mysqli_api.c ZVAL_COPY(&stmt->param.vars[i], &args[i+start]); stmt 256 ext/mysqli/mysqli_api.c ZVAL_UNDEF(&stmt->param.vars[i]); stmt 266 ext/mysqli/mysqli_api.c int mysqli_stmt_bind_param_do_bind(MY_STMT *stmt, unsigned int argc, unsigned int num_vars, stmt 277 ext/mysqli/mysqli_api.c params = mysqlnd_stmt_alloc_param_bind(stmt->stmt); stmt 304 ext/mysqli/mysqli_api.c mysqlnd_stmt_free_param_bind(stmt->stmt, params); stmt 310 ext/mysqli/mysqli_api.c ret = mysqlnd_stmt_bind_param(stmt->stmt, params); stmt 326 ext/mysqli/mysqli_api.c MY_STMT *stmt; stmt 343 ext/mysqli/mysqli_api.c MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_VALID); stmt 363 ext/mysqli/mysqli_api.c if (types_len != mysql_stmt_param_count(stmt->stmt)) { stmt 374 ext/mysqli/mysqli_api.c rc = mysqli_stmt_bind_param_do_bind(stmt, argc, num_vars, args, start, types); stmt 375 ext/mysqli/mysqli_api.c MYSQLI_REPORT_STMT_ERROR(stmt->stmt); stmt 390 ext/mysqli/mysqli_api.c mysqli_stmt_bind_result_do_bind(MY_STMT *stmt, zval *args, unsigned int argc) stmt 399 ext/mysqli/mysqli_api.c if (stmt->result.var_cnt) { stmt 400 ext/mysqli/mysqli_api.c php_free_stmt_bind_buffer(stmt->result, FETCH_RESULT); stmt 407 ext/mysqli/mysqli_api.c stmt->result.buf = (VAR_BUFFER *) p; stmt 408 ext/mysqli/mysqli_api.c stmt->result.is_null = p + var_cnt * sizeof(VAR_BUFFER); stmt 414 ext/mysqli/mysqli_api.c col_type = (stmt->stmt->fields) ? stmt->stmt->fields[ofs].type : MYSQL_TYPE_STRING; stmt 418 ext/mysqli/mysqli_api.c stmt->result.buf[ofs].type = IS_DOUBLE; stmt 419 ext/mysqli/mysqli_api.c stmt->result.buf[ofs].buflen = sizeof(float); stmt 421 ext/mysqli/mysqli_api.c stmt->result.buf[ofs].val = (char *)emalloc(sizeof(float)); stmt 423 ext/mysqli/mysqli_api.c bind[ofs].buffer = stmt->result.buf[ofs].val; stmt 424 ext/mysqli/mysqli_api.c bind[ofs].is_null = &stmt->result.is_null[ofs]; stmt 428 ext/mysqli/mysqli_api.c stmt->result.buf[ofs].type = IS_DOUBLE; stmt 429 ext/mysqli/mysqli_api.c stmt->result.buf[ofs].buflen = sizeof(double); stmt 432 ext/mysqli/mysqli_api.c stmt->result.buf[ofs].val = (char *)emalloc(sizeof(double)); stmt 434 ext/mysqli/mysqli_api.c bind[ofs].buffer = stmt->result.buf[ofs].val; stmt 435 ext/mysqli/mysqli_api.c bind[ofs].is_null = &stmt->result.is_null[ofs]; stmt 439 ext/mysqli/mysqli_api.c stmt->result.buf[ofs].type = IS_NULL; stmt 448 ext/mysqli/mysqli_api.c bind[ofs].is_null = &stmt->result.is_null[ofs]; stmt 456 ext/mysqli/mysqli_api.c stmt->result.buf[ofs].type = IS_LONG; stmt 458 ext/mysqli/mysqli_api.c stmt->result.buf[ofs].val = (char *)emalloc(sizeof(int)); stmt 460 ext/mysqli/mysqli_api.c bind[ofs].buffer = stmt->result.buf[ofs].val; stmt 461 ext/mysqli/mysqli_api.c bind[ofs].is_null = &stmt->result.is_null[ofs]; stmt 462 ext/mysqli/mysqli_api.c bind[ofs].is_unsigned = (stmt->stmt->fields[ofs].flags & UNSIGNED_FLAG) ? 1 : 0; stmt 469 ext/mysqli/mysqli_api.c stmt->result.buf[ofs].type = IS_STRING; stmt 470 ext/mysqli/mysqli_api.c stmt->result.buf[ofs].buflen = sizeof(my_ulonglong); stmt 471 ext/mysqli/mysqli_api.c stmt->result.buf[ofs].val = (char *)emalloc(stmt->result.buf[ofs].buflen); stmt 473 ext/mysqli/mysqli_api.c bind[ofs].buffer = stmt->result.buf[ofs].val; stmt 474 ext/mysqli/mysqli_api.c bind[ofs].is_null = &stmt->result.is_null[ofs]; stmt 475 ext/mysqli/mysqli_api.c bind[ofs].buffer_length = stmt->result.buf[ofs].buflen; stmt 476 ext/mysqli/mysqli_api.c bind[ofs].is_unsigned = (stmt->stmt->fields[ofs].flags & UNSIGNED_FLAG) ? 1 : 0; stmt 477 ext/mysqli/mysqli_api.c bind[ofs].length = &stmt->result.buf[ofs].output_len; stmt 503 ext/mysqli/mysqli_api.c stmt->result.buf[ofs].type = IS_STRING; stmt 509 ext/mysqli/mysqli_api.c if (stmt->stmt->fields[ofs].max_length == 0 && stmt 510 ext/mysqli/mysqli_api.c !mysql_stmt_attr_get(stmt->stmt, STMT_ATTR_UPDATE_MAX_LENGTH, &tmp) && !tmp) stmt 518 ext/mysqli/mysqli_api.c stmt->result.buf[ofs].buflen = stmt 519 ext/mysqli/mysqli_api.c (stmt->stmt->fields) ? (stmt->stmt->fields[ofs].length) ? stmt->stmt->fields[ofs].length + 1: 256: 256; stmt 526 ext/mysqli/mysqli_api.c if (!(stmt->result.buf[ofs].buflen = stmt->stmt->fields[ofs].max_length)) stmt 527 ext/mysqli/mysqli_api.c ++stmt->result.buf[ofs].buflen; stmt 529 ext/mysqli/mysqli_api.c stmt->result.buf[ofs].val = (char *)emalloc(stmt->result.buf[ofs].buflen); stmt 531 ext/mysqli/mysqli_api.c bind[ofs].buffer = stmt->result.buf[ofs].val; stmt 532 ext/mysqli/mysqli_api.c bind[ofs].is_null = &stmt->result.is_null[ofs]; stmt 533 ext/mysqli/mysqli_api.c bind[ofs].buffer_length = stmt->result.buf[ofs].buflen; stmt 534 ext/mysqli/mysqli_api.c bind[ofs].length = &stmt->result.buf[ofs].output_len; stmt 543 ext/mysqli/mysqli_api.c rc = mysql_stmt_bind_result(stmt->stmt, bind); stmt 544 ext/mysqli/mysqli_api.c MYSQLI_REPORT_STMT_ERROR(stmt->stmt); stmt 549 ext/mysqli/mysqli_api.c if (stmt->result.buf[i].val) { stmt 550 ext/mysqli/mysqli_api.c efree(stmt->result.buf[i].val); stmt 554 ext/mysqli/mysqli_api.c efree(stmt->result.buf); stmt 556 ext/mysqli/mysqli_api.c stmt->result.var_cnt = var_cnt; stmt 557 ext/mysqli/mysqli_api.c stmt->result.vars = safe_emalloc((var_cnt), sizeof(zval), 0); stmt 559 ext/mysqli/mysqli_api.c ZVAL_COPY(&stmt->result.vars[i], &args[i]); stmt 568 ext/mysqli/mysqli_api.c mysqli_stmt_bind_result_do_bind(MY_STMT *stmt, zval *args, unsigned int argc) stmt 571 ext/mysqli/mysqli_api.c MYSQLND_RESULT_BIND *params = mysqlnd_stmt_alloc_result_bind(stmt->stmt); stmt 576 ext/mysqli/mysqli_api.c return mysqlnd_stmt_bind_result(stmt->stmt, params); stmt 590 ext/mysqli/mysqli_api.c MY_STMT *stmt; stmt 597 ext/mysqli/mysqli_api.c MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_VALID); stmt 599 ext/mysqli/mysqli_api.c if (argc != mysql_stmt_field_count(stmt->stmt)) { stmt 604 ext/mysqli/mysqli_api.c rc = mysqli_stmt_bind_result_do_bind(stmt, args, argc); stmt 863 ext/mysqli/mysqli_api.c MY_STMT *stmt; stmt 872 ext/mysqli/mysqli_api.c MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_VALID); stmt 875 ext/mysqli/mysqli_api.c if (stmt->param.var_cnt) { stmt 877 ext/mysqli/mysqli_api.c for (i = 0; i < stmt->param.var_cnt; i++) { stmt 878 ext/mysqli/mysqli_api.c if (!Z_ISREF(stmt->param.vars[i])) { stmt 881 ext/mysqli/mysqli_api.c for (j = i + 1; j < stmt->param.var_cnt; j++) { stmt 883 ext/mysqli/mysqli_api.c if (Z_TYPE(stmt->param.vars[j]) == Z_TYPE(stmt->param.vars[i]) && stmt 884 ext/mysqli/mysqli_api.c Z_REFVAL(stmt->param.vars[j]) == Z_REFVAL(stmt->param.vars[i])) { stmt 885 ext/mysqli/mysqli_api.c SEPARATE_ZVAL(&stmt->param.vars[j]); stmt 891 ext/mysqli/mysqli_api.c for (i = 0; i < stmt->param.var_cnt; i++) { stmt 892 ext/mysqli/mysqli_api.c if (!Z_ISUNDEF(stmt->param.vars[i])) { stmt 894 ext/mysqli/mysqli_api.c if (Z_ISREF(stmt->param.vars[i])) { stmt 895 ext/mysqli/mysqli_api.c param = Z_REFVAL(stmt->param.vars[i]); stmt 897 ext/mysqli/mysqli_api.c param = &stmt->param.vars[i]; stmt 899 ext/mysqli/mysqli_api.c if (!(stmt->param.is_null[i] = (Z_ISNULL_P(param)))) { stmt 900 ext/mysqli/mysqli_api.c switch (stmt->stmt->params[i].buffer_type) { stmt 903 ext/mysqli/mysqli_api.c stmt->stmt->params[i].buffer = Z_STRVAL_P(param); stmt 904 ext/mysqli/mysqli_api.c stmt->stmt->params[i].buffer_length = Z_STRLEN_P(param); stmt 908 ext/mysqli/mysqli_api.c stmt->stmt->params[i].buffer = &Z_DVAL_P(param); stmt 913 ext/mysqli/mysqli_api.c stmt->stmt->params[i].buffer = &Z_LVAL_P(param); stmt 923 ext/mysqli/mysqli_api.c if (mysql_stmt_execute(stmt->stmt)) { stmt 924 ext/mysqli/mysqli_api.c MYSQLI_REPORT_STMT_ERROR(stmt->stmt); stmt 931 ext/mysqli/mysqli_api.c php_mysqli_report_index(stmt->query, mysqli_stmt_server_status(stmt->stmt)); stmt 941 ext/mysqli/mysqli_api.c MY_STMT *stmt; stmt 952 ext/mysqli/mysqli_api.c MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_VALID); stmt 955 ext/mysqli/mysqli_api.c for (i = 0; i < stmt->result.var_cnt; i++) { stmt 956 ext/mysqli/mysqli_api.c if (stmt->result.buf[i].type == IS_STRING) { stmt 957 ext/mysqli/mysqli_api.c memset(stmt->result.buf[i].val, 0, stmt->result.buf[i].buflen); stmt 960 ext/mysqli/mysqli_api.c ret = mysql_stmt_fetch(stmt->stmt); stmt 966 ext/mysqli/mysqli_api.c for (i = 0; i < stmt->result.var_cnt; i++) { stmt 969 ext/mysqli/mysqli_api.c if (Z_ISREF(stmt->result.vars[i])) { stmt 970 ext/mysqli/mysqli_api.c result = Z_REFVAL(stmt->result.vars[i]); stmt 972 ext/mysqli/mysqli_api.c result = &stmt->result.vars[i]; stmt 981 ext/mysqli/mysqli_api.c if (!stmt->result.is_null[i]) { stmt 982 ext/mysqli/mysqli_api.c switch (stmt->result.buf[i].type) { stmt 984 ext/mysqli/mysqli_api.c if ((stmt->stmt->fields[i].type == MYSQL_TYPE_LONG) stmt 985 ext/mysqli/mysqli_api.c && (stmt->stmt->fields[i].flags & UNSIGNED_FLAG)) stmt 988 ext/mysqli/mysqli_api.c uval= *(unsigned int *) stmt->result.buf[i].val; stmt 1007 ext/mysqli/mysqli_api.c if (stmt->stmt->fields[i].flags & UNSIGNED_FLAG) { stmt 1008 ext/mysqli/mysqli_api.c ZVAL_LONG(result, *(unsigned int *)stmt->result.buf[i].val); stmt 1010 ext/mysqli/mysqli_api.c ZVAL_LONG(result, *(int *)stmt->result.buf[i].val); stmt 1016 ext/mysqli/mysqli_api.c if (stmt->stmt->bind[i].buffer_type == MYSQL_TYPE_FLOAT) { stmt 1020 ext/mysqli/mysqli_api.c dval = mysql_float_to_double(*(float *)stmt->result.buf[i].val, stmt 1021 ext/mysqli/mysqli_api.c (stmt->stmt->fields[i].decimals >= NOT_FIXED_DEC) ? -1 : stmt 1022 ext/mysqli/mysqli_api.c stmt->stmt->fields[i].decimals); stmt 1024 ext/mysqli/mysqli_api.c dval = *((double *)stmt->result.buf[i].val); stmt 1031 ext/mysqli/mysqli_api.c if (stmt->stmt->bind[i].buffer_type == MYSQL_TYPE_LONGLONG stmt 1033 ext/mysqli/mysqli_api.c || stmt->stmt->bind[i].buffer_type == MYSQL_TYPE_BIT stmt 1036 ext/mysqli/mysqli_api.c my_bool uns = (stmt->stmt->fields[i].flags & UNSIGNED_FLAG)? 1:0; stmt 1038 ext/mysqli/mysqli_api.c if (stmt->stmt->bind[i].buffer_type == MYSQL_TYPE_BIT) { stmt 1039 ext/mysqli/mysqli_api.c switch (stmt->result.buf[i].output_len) { stmt 1040 ext/mysqli/mysqli_api.c case 8:llval = (my_ulonglong) bit_uint8korr(stmt->result.buf[i].val);break; stmt 1041 ext/mysqli/mysqli_api.c case 7:llval = (my_ulonglong) bit_uint7korr(stmt->result.buf[i].val);break; stmt 1042 ext/mysqli/mysqli_api.c case 6:llval = (my_ulonglong) bit_uint6korr(stmt->result.buf[i].val);break; stmt 1043 ext/mysqli/mysqli_api.c case 5:llval = (my_ulonglong) bit_uint5korr(stmt->result.buf[i].val);break; stmt 1044 ext/mysqli/mysqli_api.c case 4:llval = (my_ulonglong) bit_uint4korr(stmt->result.buf[i].val);break; stmt 1045 ext/mysqli/mysqli_api.c case 3:llval = (my_ulonglong) bit_uint3korr(stmt->result.buf[i].val);break; stmt 1046 ext/mysqli/mysqli_api.c case 2:llval = (my_ulonglong) bit_uint2korr(stmt->result.buf[i].val);break; stmt 1047 ext/mysqli/mysqli_api.c case 1:llval = (my_ulonglong) uint1korr(stmt->result.buf[i].val);break; stmt 1052 ext/mysqli/mysqli_api.c llval= *(my_ulonglong *) stmt->result.buf[i].val; stmt 1067 ext/mysqli/mysqli_api.c snprintf(tmp, sizeof(tmp), (stmt->stmt->fields[i].flags & UNSIGNED_FLAG)? MYSQLI_LLU_SPEC : MYSQLI_LL_SPEC, llval); stmt 1074 ext/mysqli/mysqli_api.c if (ret == MYSQL_DATA_TRUNCATED && *(stmt->stmt->bind[i].error) != 0) { stmt 1076 ext/mysqli/mysqli_api.c ZVAL_STRINGL(result, stmt->result.buf[i].val, stmt->stmt->bind[i].buffer_length); stmt 1081 ext/mysqli/mysqli_api.c ZVAL_STRINGL(result, stmt->result.buf[i].val, stmt->result.buf[i].output_len); stmt 1093 ext/mysqli/mysqli_api.c MYSQLI_REPORT_STMT_ERROR(stmt->stmt); stmt 1120 ext/mysqli/mysqli_api.c MY_STMT *stmt; stmt 1127 ext/mysqli/mysqli_api.c MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_VALID); stmt 1129 ext/mysqli/mysqli_api.c if (FAIL == mysqlnd_stmt_fetch(stmt->stmt, &fetched_anything)) { stmt 1620 ext/mysqli/mysqli_api.c MY_STMT *stmt; stmt 1626 ext/mysqli/mysqli_api.c MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_VALID); stmt 1628 ext/mysqli/mysqli_api.c RETURN_BOOL(mysqlnd_stmt_more_results(stmt->stmt)); stmt 1635 ext/mysqli/mysqli_api.c MY_STMT *stmt; stmt 1641 ext/mysqli/mysqli_api.c MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_VALID); stmt 1643 ext/mysqli/mysqli_api.c if (!mysqlnd_stmt_more_results(stmt->stmt)) { stmt 1649 ext/mysqli/mysqli_api.c RETURN_BOOL(!mysql_stmt_next_result(stmt->stmt)); stmt 1844 ext/mysqli/mysqli_api.c MY_STMT *stmt; stmt 1862 ext/mysqli/mysqli_api.c stmt = (MY_STMT *)ecalloc(1,sizeof(MY_STMT)); stmt 1864 ext/mysqli/mysqli_api.c if ((stmt->stmt = mysql_stmt_init(mysql->mysql))) { stmt 1865 ext/mysqli/mysqli_api.c if (mysql_stmt_prepare(stmt->stmt, query, query_len)) { stmt 1872 ext/mysqli/mysqli_api.c last_errno = stmt->stmt->last_errno; stmt 1873 ext/mysqli/mysqli_api.c memcpy(last_error, stmt->stmt->last_error, MYSQL_ERRMSG_SIZE); stmt 1878 ext/mysqli/mysqli_api.c mysqli_stmt_close(stmt->stmt, FALSE); stmt 1879 ext/mysqli/mysqli_api.c stmt->stmt = NULL; stmt 1894 ext/mysqli/mysqli_api.c if (stmt->stmt && query_len && (MyG(report_mode) & MYSQLI_REPORT_INDEX)) { stmt 1895 ext/mysqli/mysqli_api.c stmt->query = (char *)emalloc(query_len + 1); stmt 1896 ext/mysqli/mysqli_api.c memcpy(stmt->query, query, query_len); stmt 1897 ext/mysqli/mysqli_api.c stmt->query[query_len] = '\0'; stmt 1901 ext/mysqli/mysqli_api.c if (!stmt->stmt) { stmt 1903 ext/mysqli/mysqli_api.c efree(stmt); stmt 1907 ext/mysqli/mysqli_api.c ZVAL_COPY(&stmt->link_handle, mysql_link); stmt 1911 ext/mysqli/mysqli_api.c mysqli_resource->ptr = (void *)stmt; stmt 2010 ext/mysqli/mysqli_api.c MY_STMT *stmt; stmt 2019 ext/mysqli/mysqli_api.c MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_VALID); stmt 2025 ext/mysqli/mysqli_api.c if (mysql_stmt_send_long_data(stmt->stmt, param_nr, data, data_len)) { stmt 2036 ext/mysqli/mysqli_api.c MY_STMT *stmt; stmt 2043 ext/mysqli/mysqli_api.c MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_VALID); stmt 2045 ext/mysqli/mysqli_api.c rc = mysql_stmt_affected_rows(stmt->stmt); stmt 2057 ext/mysqli/mysqli_api.c MY_STMT *stmt; stmt 2063 ext/mysqli/mysqli_api.c MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_VALID); stmt 2065 ext/mysqli/mysqli_api.c mysqli_stmt_close(stmt->stmt, FALSE); stmt 2066 ext/mysqli/mysqli_api.c stmt->stmt = NULL; stmt 2067 ext/mysqli/mysqli_api.c php_clear_stmt_bind(stmt); stmt 2077 ext/mysqli/mysqli_api.c MY_STMT *stmt; stmt 2089 ext/mysqli/mysqli_api.c MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_VALID); stmt 2091 ext/mysqli/mysqli_api.c mysql_stmt_data_seek(stmt->stmt, offset); stmt 2099 ext/mysqli/mysqli_api.c MY_STMT *stmt; stmt 2105 ext/mysqli/mysqli_api.c MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_VALID); stmt 2107 ext/mysqli/mysqli_api.c RETURN_LONG(mysql_stmt_field_count(stmt->stmt)); stmt 2115 ext/mysqli/mysqli_api.c MY_STMT *stmt; stmt 2122 ext/mysqli/mysqli_api.c MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_VALID); stmt 2124 ext/mysqli/mysqli_api.c mysql_stmt_free_result(stmt->stmt); stmt 2132 ext/mysqli/mysqli_api.c MY_STMT *stmt; stmt 2139 ext/mysqli/mysqli_api.c MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_VALID); stmt 2140 ext/mysqli/mysqli_api.c rc = mysql_stmt_insert_id(stmt->stmt); stmt 2149 ext/mysqli/mysqli_api.c MY_STMT *stmt; stmt 2155 ext/mysqli/mysqli_api.c MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_VALID); stmt 2157 ext/mysqli/mysqli_api.c RETURN_LONG(mysql_stmt_param_count(stmt->stmt)); stmt 2165 ext/mysqli/mysqli_api.c MY_STMT *stmt; stmt 2172 ext/mysqli/mysqli_api.c MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_VALID); stmt 2174 ext/mysqli/mysqli_api.c if (mysql_stmt_reset(stmt->stmt)) { stmt 2185 ext/mysqli/mysqli_api.c MY_STMT *stmt; stmt 2193 ext/mysqli/mysqli_api.c MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_VALID); stmt 2195 ext/mysqli/mysqli_api.c rc = mysql_stmt_num_rows(stmt->stmt); stmt 2324 ext/mysqli/mysqli_api.c MY_STMT *stmt; stmt 2337 ext/mysqli/mysqli_api.c MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_VALID); stmt 2357 ext/mysqli/mysqli_api.c if (mysql_stmt_attr_set(stmt->stmt, attr, mode_p)) { stmt 2359 ext/mysqli/mysqli_api.c if (FAIL == mysql_stmt_attr_set(stmt->stmt, attr, mode_p)) { stmt 2371 ext/mysqli/mysqli_api.c MY_STMT *stmt; stmt 2380 ext/mysqli/mysqli_api.c MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_VALID); stmt 2382 ext/mysqli/mysqli_api.c if ((rc = mysql_stmt_attr_get(stmt->stmt, attr, &value))) { stmt 2398 ext/mysqli/mysqli_api.c MY_STMT *stmt; stmt 2404 ext/mysqli/mysqli_api.c MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_INITIALIZED); stmt 2406 ext/mysqli/mysqli_api.c RETURN_LONG(mysql_stmt_errno(stmt->stmt)); stmt 2414 ext/mysqli/mysqli_api.c MY_STMT *stmt; stmt 2421 ext/mysqli/mysqli_api.c MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_INITIALIZED); stmt 2423 ext/mysqli/mysqli_api.c err = mysql_stmt_error(stmt->stmt); stmt 2436 ext/mysqli/mysqli_api.c MY_STMT *stmt; stmt 2445 ext/mysqli/mysqli_api.c stmt = (MY_STMT *)ecalloc(1,sizeof(MY_STMT)); stmt 2447 ext/mysqli/mysqli_api.c if (!(stmt->stmt = mysql_stmt_init(mysql->mysql))) { stmt 2448 ext/mysqli/mysqli_api.c efree(stmt); stmt 2452 ext/mysqli/mysqli_api.c ZVAL_COPY(&stmt->link_handle, mysql_link); stmt 2457 ext/mysqli/mysqli_api.c mysqli_resource->ptr = (void *)stmt; stmt 2467 ext/mysqli/mysqli_api.c MY_STMT *stmt; stmt 2475 ext/mysqli/mysqli_api.c MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_INITIALIZED); stmt 2477 ext/mysqli/mysqli_api.c if (mysql_stmt_prepare(stmt->stmt, query, query_len)) { stmt 2478 ext/mysqli/mysqli_api.c MYSQLI_REPORT_STMT_ERROR(stmt->stmt); stmt 2491 ext/mysqli/mysqli_api.c MY_STMT *stmt; stmt 2499 ext/mysqli/mysqli_api.c MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_VALID); stmt 2501 ext/mysqli/mysqli_api.c if (!(result = mysql_stmt_result_metadata(stmt->stmt))){ stmt 2502 ext/mysqli/mysqli_api.c MYSQLI_REPORT_STMT_ERROR(stmt->stmt); stmt 2517 ext/mysqli/mysqli_api.c MY_STMT *stmt; stmt 2523 ext/mysqli/mysqli_api.c MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_VALID); stmt 2536 ext/mysqli/mysqli_api.c for (i = mysql_stmt_field_count(stmt->stmt) - 1; i >=0; --i) { stmt 2537 ext/mysqli/mysqli_api.c if (stmt->stmt->fields && (stmt->stmt->fields[i].type == MYSQL_TYPE_BLOB || stmt 2538 ext/mysqli/mysqli_api.c stmt->stmt->fields[i].type == MYSQL_TYPE_MEDIUM_BLOB || stmt 2539 ext/mysqli/mysqli_api.c stmt->stmt->fields[i].type == MYSQL_TYPE_LONG_BLOB || stmt 2540 ext/mysqli/mysqli_api.c stmt->stmt->fields[i].type == MYSQL_TYPE_GEOMETRY)) stmt 2547 ext/mysqli/mysqli_api.c mysql_stmt_attr_set(stmt->stmt, STMT_ATTR_UPDATE_MAX_LENGTH, &tmp); stmt 2554 ext/mysqli/mysqli_api.c if (mysql_stmt_store_result(stmt->stmt)){ stmt 2555 ext/mysqli/mysqli_api.c MYSQLI_REPORT_STMT_ERROR(stmt->stmt); stmt 2566 ext/mysqli/mysqli_api.c MY_STMT *stmt; stmt 2573 ext/mysqli/mysqli_api.c MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_VALID); stmt 2575 ext/mysqli/mysqli_api.c state = mysql_stmt_sqlstate(stmt->stmt); stmt 39 ext/mysqli/mysqli_fe.c #define MYSQLI_ZEND_ARG_OBJ_INFO_STMT() ZEND_ARG_OBJ_INFO(0, stmt, mysqli_stmt, 0) stmt 43 ext/mysqli/mysqli_fe.c #define MYSQLI_ZEND_ARG_OBJ_INFO_STMT() ZEND_ARG_INFO(0, stmt) stmt 456 ext/mysqli/mysqli_nonapi.c MY_STMT *stmt; stmt 462 ext/mysqli/mysqli_nonapi.c MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_INITIALIZED); stmt 465 ext/mysqli/mysqli_nonapi.c if (stmt->stmt && stmt->stmt->data && stmt->stmt->data->error_info->error_list) { stmt 468 ext/mysqli/mysqli_nonapi.c for (message = (MYSQLND_ERROR_LIST_ELEMENT *) zend_llist_get_first_ex(stmt->stmt->data->error_info->error_list, &pos); stmt 470 ext/mysqli/mysqli_nonapi.c message = (MYSQLND_ERROR_LIST_ELEMENT *) zend_llist_get_next_ex(stmt->stmt->data->error_info->error_list, &pos)) stmt 481 ext/mysqli/mysqli_nonapi.c if (mysql_stmt_errno(stmt->stmt)) { stmt 484 ext/mysqli/mysqli_nonapi.c add_assoc_long_ex(&single_error, "errno", sizeof("errno") - 1, mysql_stmt_errno(stmt->stmt)); stmt 485 ext/mysqli/mysqli_nonapi.c add_assoc_string_ex(&single_error, "sqlstate", sizeof("sqlstate") - 1, mysql_stmt_sqlstate(stmt->stmt)); stmt 486 ext/mysqli/mysqli_nonapi.c add_assoc_string_ex(&single_error, "error", sizeof("error") - 1, mysql_stmt_error(stmt->stmt)); stmt 866 ext/mysqli/mysqli_nonapi.c MY_STMT *stmt; stmt 872 ext/mysqli/mysqli_nonapi.c MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_VALID); stmt 874 ext/mysqli/mysqli_nonapi.c if (!(result = mysqlnd_stmt_get_result(stmt->stmt))) { stmt 875 ext/mysqli/mysqli_nonapi.c MYSQLI_REPORT_STMT_ERROR(stmt->stmt); stmt 919 ext/mysqli/mysqli_nonapi.c MY_STMT *stmt; stmt 927 ext/mysqli/mysqli_nonapi.c MYSQLI_FETCH_RESOURCE_STMT(stmt, stmt_link, MYSQLI_STATUS_VALID); stmt 929 ext/mysqli/mysqli_nonapi.c if (mysqli_stmt_warning_count(stmt->stmt)) { stmt 930 ext/mysqli/mysqli_nonapi.c w = php_get_warnings(mysqli_stmt_get_connection(stmt->stmt)); stmt 67 ext/mysqli/mysqli_priv.h extern void php_clear_stmt_bind(MY_STMT *stmt); stmt 142 ext/mysqli/mysqli_priv.h #define MYSQLI_REPORT_STMT_ERROR(stmt) \ stmt 143 ext/mysqli/mysqli_priv.h if ((MyG(report_mode) & MYSQLI_REPORT_ERROR) && mysql_stmt_errno(stmt)) { \ stmt 144 ext/mysqli/mysqli_priv.h php_mysqli_report_error(mysql_stmt_sqlstate(stmt), mysql_stmt_errno(stmt), mysql_stmt_error(stmt)); \ stmt 72 ext/mysqli/mysqli_prop.c p = (MYSQL_STMT *)((MY_STMT *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr)->stmt;\ stmt 331 ext/mysqli/mysqli_prop.c ZVAL_LONG(retval, mysqli_stmt_get_id(p->stmt)); stmt 350 ext/mysqli/mysqli_prop.c rc = mysql_stmt_affected_rows(p->stmt); stmt 370 ext/mysqli/mysqli_prop.c MY_STMT * stmt; stmt 374 ext/mysqli/mysqli_prop.c stmt = (MY_STMT *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr; stmt 376 ext/mysqli/mysqli_prop.c if (stmt && stmt->stmt) { stmt 378 ext/mysqli/mysqli_prop.c if (stmt->stmt->data && stmt->stmt->data->error_info->error_list) { stmt 381 ext/mysqli/mysqli_prop.c for (message = (MYSQLND_ERROR_LIST_ELEMENT *) zend_llist_get_first_ex(stmt->stmt->data->error_info->error_list, &pos); stmt 383 ext/mysqli/mysqli_prop.c message = (MYSQLND_ERROR_LIST_ELEMENT *) zend_llist_get_next_ex(stmt->stmt->data->error_info->error_list, &pos)) stmt 394 ext/mysqli/mysqli_prop.c if (mysql_stmt_errno(stmt->stmt)) { stmt 397 ext/mysqli/mysqli_prop.c add_assoc_long_ex(&single_error, "errno", sizeof("errno") - 1, mysql_stmt_errno(stmt->stmt)); stmt 398 ext/mysqli/mysqli_prop.c add_assoc_string_ex(&single_error, "sqlstate", sizeof("sqlstate") - 1, mysql_stmt_sqlstate(stmt->stmt)); stmt 399 ext/mysqli/mysqli_prop.c add_assoc_string_ex(&single_error, "error", sizeof("error") - 1, mysql_stmt_error(stmt->stmt)); stmt 282 ext/mysqli/mysqli_warning.c MY_STMT *stmt; stmt 283 ext/mysqli/mysqli_warning.c MYSQLI_FETCH_RESOURCE_STMT(stmt, z, MYSQLI_STATUS_VALID); stmt 285 ext/mysqli/mysqli_warning.c hdl = mysqli_stmt_get_connection(stmt->stmt); stmt 289 ext/mysqli/mysqli_warning.c if (mysqlnd_stmt_warning_count(stmt->stmt)) { stmt 290 ext/mysqli/mysqli_warning.c w = php_get_warnings(mysqli_stmt_get_connection(stmt->stmt)); stmt 115 ext/mysqli/php_mysqli_structs.h MYSQL_STMT *stmt; stmt 299 ext/mysqli/php_mysqli_structs.h if (!(__ptr)->stmt) { \ stmt 165 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_insert_id(stmt) (stmt)->m->get_last_insert_id((stmt)) stmt 166 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_affected_rows(stmt) (stmt)->m->get_affected_rows((stmt)) stmt 167 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_num_rows(stmt) (stmt)->m->get_num_rows((stmt)) stmt 168 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_param_count(stmt) (stmt)->m->get_param_count((stmt)) stmt 169 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_field_count(stmt) (stmt)->m->get_field_count((stmt)) stmt 170 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_warning_count(stmt) (stmt)->m->get_warning_count((stmt)) stmt 171 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_server_status(stmt) (stmt)->m->get_server_status((stmt)) stmt 172 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_errno(stmt) (stmt)->m->get_error_no((stmt)) stmt 173 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_error(stmt) (stmt)->m->get_error_str((stmt)) stmt 174 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_sqlstate(stmt) (stmt)->m->get_sqlstate((stmt)) stmt 222 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_store_result(stmt) (!mysqlnd_stmt_field_count((stmt)) ? PASS:((stmt)->m->store_result((stmt))? PASS:FAIL)) stmt 223 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_get_result(stmt) (stmt)->m->get_result((stmt)) stmt 224 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_more_results(stmt) (stmt)->m->more_results((stmt)) stmt 225 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_next_result(stmt) (stmt)->m->next_result((stmt)) stmt 226 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_data_seek(stmt, row) (stmt)->m->seek_data((stmt), (row)) stmt 227 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_prepare(stmt, q, qlen) (stmt)->m->prepare((stmt), (q), (qlen)) stmt 228 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_execute(stmt) (stmt)->m->execute((stmt)) stmt 229 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_send_long_data(stmt,p,d,l) (stmt)->m->send_long_data((stmt), (p), (d), (l)) stmt 230 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_alloc_param_bind(stmt) (stmt)->m->alloc_parameter_bind((stmt)) stmt 231 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_free_param_bind(stmt,bind) (stmt)->m->free_parameter_bind((stmt), (bind)) stmt 232 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_bind_param(stmt,bind) (stmt)->m->bind_parameters((stmt), (bind)) stmt 233 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_bind_one_param(stmt,n,z,t) (stmt)->m->bind_one_parameter((stmt), (n), (z), (t)) stmt 235 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_alloc_result_bind(stmt) (stmt)->m->alloc_result_bind((stmt)) stmt 236 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_free_result_bind(stmt,bind) (stmt)->m->free_result_bind((stmt), (bind)) stmt 237 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_bind_result(stmt,bind) (stmt)->m->bind_result((stmt), (bind)) stmt 239 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_param_metadata(stmt) (stmt)->m->get_parameter_metadata((stmt)) stmt 240 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_result_metadata(stmt) (stmt)->m->get_result_metadata((stmt)) stmt 242 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_free_result(stmt) (stmt)->m->free_result((stmt)) stmt 243 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_close(stmt, implicit) (stmt)->m->dtor((stmt), (implicit)) stmt 244 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_reset(stmt) (stmt)->m->reset((stmt)) stmt 245 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_flush(stmt) (stmt)->m->flush((stmt)) stmt 248 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_attr_get(stmt, attr, value) (stmt)->m->get_attribute((stmt), (attr), (value)) stmt 249 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_attr_set(stmt, attr, value) (stmt)->m->set_attribute((stmt), (attr), (value)) stmt 251 ext/mysqlnd/mysqlnd.h #define mysqlnd_stmt_fetch(stmt, fetched) (stmt)->m->fetch((stmt), (fetched)) stmt 198 ext/mysqlnd/mysqlnd_driver.c MYSQLND_STMT_DATA * stmt = NULL; stmt 208 ext/mysqlnd/mysqlnd_driver.c stmt = ret->data = mnd_pecalloc(1, sizeof(MYSQLND_STMT_DATA), conn->persistent); stmt 209 ext/mysqlnd/mysqlnd_driver.c DBG_INF_FMT("stmt=%p", stmt); stmt 210 ext/mysqlnd/mysqlnd_driver.c if (!stmt) { stmt 213 ext/mysqlnd/mysqlnd_driver.c stmt->persistent = conn->persistent; stmt 214 ext/mysqlnd/mysqlnd_driver.c stmt->error_info = &(stmt->error_info_impl); stmt 215 ext/mysqlnd/mysqlnd_driver.c stmt->upsert_status = &(stmt->upsert_status_impl); stmt 216 ext/mysqlnd/mysqlnd_driver.c stmt->state = MYSQLND_STMT_INITTED; stmt 217 ext/mysqlnd/mysqlnd_driver.c stmt->execute_cmd_buffer.length = 4096; stmt 218 ext/mysqlnd/mysqlnd_driver.c stmt->execute_cmd_buffer.buffer = mnd_pemalloc(stmt->execute_cmd_buffer.length, stmt->persistent); stmt 219 ext/mysqlnd/mysqlnd_driver.c if (!stmt->execute_cmd_buffer.buffer) { stmt 223 ext/mysqlnd/mysqlnd_driver.c stmt->prefetch_rows = MYSQLND_DEFAULT_PREFETCH_ROWS; stmt 229 ext/mysqlnd/mysqlnd_driver.c stmt->conn = conn->m->get_reference(conn); stmt 230 ext/mysqlnd/mysqlnd_driver.c stmt->error_info->error_list = mnd_pecalloc(1, sizeof(zend_llist), ret->persistent); stmt 231 ext/mysqlnd/mysqlnd_driver.c if (!stmt->error_info->error_list) { stmt 235 ext/mysqlnd/mysqlnd_driver.c zend_llist_init(stmt->error_info->error_list, sizeof(MYSQLND_ERROR_LIST_ELEMENT), (llist_dtor_func_t) mysqlnd_error_list_pdtor, conn->persistent); stmt 126 ext/mysqlnd/mysqlnd_ext_plugin.c PHPAPI void ** _mysqlnd_plugin_get_plugin_stmt_data(const MYSQLND_STMT * stmt, unsigned int plugin_id) stmt 130 ext/mysqlnd/mysqlnd_ext_plugin.c if (!stmt || plugin_id >= mysqlnd_plugin_count()) { stmt 133 ext/mysqlnd/mysqlnd_ext_plugin.c DBG_RETURN((void *)((char *)stmt + sizeof(MYSQLND_STMT) + plugin_id * sizeof(void *))); stmt 43 ext/mysqlnd/mysqlnd_ext_plugin.h PHPAPI void ** _mysqlnd_plugin_get_plugin_stmt_data(const MYSQLND_STMT * stmt, unsigned int plugin_id); stmt 135 ext/mysqlnd/mysqlnd_priv.h #define SET_STMT_ERROR(stmt, a, b, c) SET_CLIENT_ERROR(*(stmt)->error_info, a, b, c) stmt 43 ext/mysqlnd/mysqlnd_ps.c static void mysqlnd_stmt_separate_result_bind(MYSQLND_STMT * const stmt); stmt 44 ext/mysqlnd/mysqlnd_ps.c static void mysqlnd_stmt_separate_one_result_bind(MYSQLND_STMT * const stmt, unsigned int param_no); stmt 50 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 56 ext/mysqlnd/mysqlnd_ps.c if (!stmt || !stmt->conn || !stmt->result) { stmt 59 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("stmt=%lu", stmt->stmt_id); stmt 61 ext/mysqlnd/mysqlnd_ps.c conn = stmt->conn; stmt 64 ext/mysqlnd/mysqlnd_ps.c if (!stmt->field_count) { stmt 68 ext/mysqlnd/mysqlnd_ps.c if (stmt->cursor_exists) { stmt 75 ext/mysqlnd/mysqlnd_ps.c stmt->state != MYSQLND_STMT_WAITING_USE_OR_STORE) stmt 82 ext/mysqlnd/mysqlnd_ps.c stmt->default_rset_handler = s->m->store_result; stmt 84 ext/mysqlnd/mysqlnd_ps.c SET_EMPTY_ERROR(*stmt->error_info); stmt 88 ext/mysqlnd/mysqlnd_ps.c result = stmt->result; stmt 127 ext/mysqlnd/mysqlnd_ps.c stmt->upsert_status->affected_rows = stmt->result->stored_data->row_count; stmt 129 ext/mysqlnd/mysqlnd_ps.c stmt->state = MYSQLND_STMT_USE_OR_STORE_CALLED; stmt 132 ext/mysqlnd/mysqlnd_ps.c stmt->result->m.free_result_contents(stmt->result); stmt 133 ext/mysqlnd/mysqlnd_ps.c mnd_efree(stmt->result); stmt 134 ext/mysqlnd/mysqlnd_ps.c stmt->result = NULL; stmt 135 ext/mysqlnd/mysqlnd_ps.c stmt->state = MYSQLND_STMT_PREPARED; stmt 147 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 152 ext/mysqlnd/mysqlnd_ps.c if (!stmt || !stmt->conn || !stmt->result) { stmt 155 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("stmt=%lu", stmt->stmt_id); stmt 157 ext/mysqlnd/mysqlnd_ps.c conn = stmt->conn; stmt 160 ext/mysqlnd/mysqlnd_ps.c if (!stmt->field_count) { stmt 164 ext/mysqlnd/mysqlnd_ps.c if (stmt->cursor_exists) { stmt 170 ext/mysqlnd/mysqlnd_ps.c if (CONN_GET_STATE(conn) != CONN_FETCHING_DATA || stmt->state != MYSQLND_STMT_WAITING_USE_OR_STORE) { stmt 176 ext/mysqlnd/mysqlnd_ps.c SET_EMPTY_ERROR(*stmt->error_info); stmt 181 ext/mysqlnd/mysqlnd_ps.c result = conn->m->result_init(stmt->result->field_count, stmt->persistent); stmt 187 ext/mysqlnd/mysqlnd_ps.c result->meta = stmt->result->meta->m->clone_metadata(stmt->result->meta, FALSE); stmt 194 ext/mysqlnd/mysqlnd_ps.c stmt->upsert_status->affected_rows = result->stored_data->row_count; stmt 195 ext/mysqlnd/mysqlnd_ps.c stmt->state = MYSQLND_STMT_PREPARED; stmt 198 ext/mysqlnd/mysqlnd_ps.c COPY_CLIENT_ERROR(*stmt->error_info, *conn->error_info); stmt 199 ext/mysqlnd/mysqlnd_ps.c stmt->state = MYSQLND_STMT_PREPARED; stmt 217 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 220 ext/mysqlnd/mysqlnd_ps.c DBG_RETURN((stmt && stmt->conn && (stmt->conn->m->get_server_status(stmt->conn) & SERVER_MORE_RESULTS_EXISTS))? stmt 231 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 235 ext/mysqlnd/mysqlnd_ps.c if (!stmt || !stmt->conn || !stmt->result) { stmt 238 ext/mysqlnd/mysqlnd_ps.c conn = stmt->conn; stmt 239 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("stmt=%lu", stmt->stmt_id); stmt 245 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("server_status=%u cursor=%u", stmt->upsert_status->server_status, stmt->upsert_status->server_status & SERVER_STATUS_CURSOR_EXISTS); stmt 261 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 268 ext/mysqlnd/mysqlnd_ps.c if (!stmt || !stmt->conn || !stmt->conn->protocol) { stmt 271 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("stmt=%lu", stmt->stmt_id); stmt 273 ext/mysqlnd/mysqlnd_ps.c field_packet = stmt->conn->protocol->m.get_result_field_packet(stmt->conn->protocol, FALSE); stmt 275 ext/mysqlnd/mysqlnd_ps.c SET_OOM_ERROR(*stmt->error_info); stmt 276 ext/mysqlnd/mysqlnd_ps.c SET_OOM_ERROR(*stmt->conn->error_info); stmt 280 ext/mysqlnd/mysqlnd_ps.c for (;i < stmt->param_count; i++) { stmt 281 ext/mysqlnd/mysqlnd_ps.c if (FAIL == PACKET_READ(field_packet, stmt->conn)) { stmt 298 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 303 ext/mysqlnd/mysqlnd_ps.c if (!stmt || !stmt->conn || !stmt->conn->protocol) { stmt 306 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("stmt=%lu", stmt->stmt_id); stmt 308 ext/mysqlnd/mysqlnd_ps.c prepare_resp = stmt->conn->protocol->m.get_prepare_response_packet(stmt->conn->protocol, FALSE); stmt 310 ext/mysqlnd/mysqlnd_ps.c SET_OOM_ERROR(*stmt->error_info); stmt 311 ext/mysqlnd/mysqlnd_ps.c SET_OOM_ERROR(*stmt->conn->error_info); stmt 315 ext/mysqlnd/mysqlnd_ps.c if (FAIL == PACKET_READ(prepare_resp, stmt->conn)) { stmt 320 ext/mysqlnd/mysqlnd_ps.c COPY_CLIENT_ERROR(*stmt->error_info, prepare_resp->error_info); stmt 321 ext/mysqlnd/mysqlnd_ps.c COPY_CLIENT_ERROR(*stmt->conn->error_info, prepare_resp->error_info); stmt 325 ext/mysqlnd/mysqlnd_ps.c stmt->stmt_id = prepare_resp->stmt_id; stmt 326 ext/mysqlnd/mysqlnd_ps.c stmt->warning_count = stmt->conn->upsert_status->warning_count = prepare_resp->warning_count; stmt 327 ext/mysqlnd/mysqlnd_ps.c stmt->field_count = stmt->conn->field_count = prepare_resp->field_count; stmt 328 ext/mysqlnd/mysqlnd_ps.c stmt->param_count = prepare_resp->param_count; stmt 329 ext/mysqlnd/mysqlnd_ps.c stmt->upsert_status->affected_rows = 0; /* be like libmysql */ stmt 342 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 347 ext/mysqlnd/mysqlnd_ps.c if (!stmt || !stmt->conn || !stmt->conn->protocol) { stmt 350 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("stmt=%lu", stmt->stmt_id); stmt 352 ext/mysqlnd/mysqlnd_ps.c fields_eof = stmt->conn->protocol->m.get_eof_packet(stmt->conn->protocol, FALSE); stmt 354 ext/mysqlnd/mysqlnd_ps.c SET_OOM_ERROR(*stmt->error_info); stmt 355 ext/mysqlnd/mysqlnd_ps.c SET_OOM_ERROR(*stmt->conn->error_info); stmt 357 ext/mysqlnd/mysqlnd_ps.c if (FAIL == (ret = PACKET_READ(fields_eof, stmt->conn))) { stmt 358 ext/mysqlnd/mysqlnd_ps.c if (stmt->result) { stmt 359 ext/mysqlnd/mysqlnd_ps.c stmt->result->m.free_result_contents(stmt->result); stmt 360 ext/mysqlnd/mysqlnd_ps.c mnd_efree(stmt->result); stmt 361 ext/mysqlnd/mysqlnd_ps.c memset(stmt, 0, sizeof(MYSQLND_STMT_DATA)); stmt 362 ext/mysqlnd/mysqlnd_ps.c stmt->state = MYSQLND_STMT_INITTED; stmt 365 ext/mysqlnd/mysqlnd_ps.c stmt->upsert_status->server_status = fields_eof->server_status; stmt 366 ext/mysqlnd/mysqlnd_ps.c stmt->upsert_status->warning_count = fields_eof->warning_count; stmt 367 ext/mysqlnd/mysqlnd_ps.c stmt->state = MYSQLND_STMT_PREPARED; stmt 381 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 383 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt_to_prepare = stmt; stmt 386 ext/mysqlnd/mysqlnd_ps.c if (!stmt || !stmt->conn) { stmt 389 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("stmt=%lu", stmt->stmt_id); stmt 392 ext/mysqlnd/mysqlnd_ps.c SET_ERROR_AFF_ROWS(stmt); stmt 393 ext/mysqlnd/mysqlnd_ps.c SET_ERROR_AFF_ROWS(stmt->conn); stmt 395 ext/mysqlnd/mysqlnd_ps.c SET_EMPTY_ERROR(*stmt->error_info); stmt 396 ext/mysqlnd/mysqlnd_ps.c SET_EMPTY_ERROR(*stmt->conn->error_info); stmt 398 ext/mysqlnd/mysqlnd_ps.c if (stmt->state > MYSQLND_STMT_INITTED) { stmt 400 ext/mysqlnd/mysqlnd_ps.c if (stmt->state == MYSQLND_STMT_WAITING_USE_OR_STORE) { stmt 402 ext/mysqlnd/mysqlnd_ps.c stmt->default_rset_handler = s->m->use_result; stmt 403 ext/mysqlnd/mysqlnd_ps.c stmt->default_rset_handler(s); stmt 406 ext/mysqlnd/mysqlnd_ps.c if (stmt->state > MYSQLND_STMT_WAITING_USE_OR_STORE && stmt->result) { stmt 407 ext/mysqlnd/mysqlnd_ps.c stmt->result->m.skip_result(stmt->result); stmt 413 ext/mysqlnd/mysqlnd_ps.c s_to_prepare = stmt->conn->m->stmt_init(stmt->conn); stmt 440 ext/mysqlnd/mysqlnd_ps.c MYSQLND_RES * result = stmt->conn->m->result_init(stmt_to_prepare->field_count, stmt_to_prepare->persistent); stmt 442 ext/mysqlnd/mysqlnd_ps.c SET_OOM_ERROR(*stmt->conn->error_info); stmt 459 ext/mysqlnd/mysqlnd_ps.c if (stmt_to_prepare != stmt) { stmt 469 ext/mysqlnd/mysqlnd_ps.c stmt_to_prepare = stmt; stmt 470 ext/mysqlnd/mysqlnd_ps.c stmt = tmp_swap_data; stmt 474 ext/mysqlnd/mysqlnd_ps.c stmt->state = MYSQLND_STMT_PREPARED; stmt 479 ext/mysqlnd/mysqlnd_ps.c if (stmt_to_prepare != stmt && s_to_prepare) { stmt 482 ext/mysqlnd/mysqlnd_ps.c stmt->state = MYSQLND_STMT_INITTED; stmt 494 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 499 ext/mysqlnd/mysqlnd_ps.c if (!stmt || !stmt->conn) { stmt 502 ext/mysqlnd/mysqlnd_ps.c conn = stmt->conn; stmt 505 ext/mysqlnd/mysqlnd_ps.c ret = mysqlnd_query_read_result_set_header(stmt->conn, s); stmt 507 ext/mysqlnd/mysqlnd_ps.c COPY_CLIENT_ERROR(*stmt->error_info, *conn->error_info); stmt 508 ext/mysqlnd/mysqlnd_ps.c memset(stmt->upsert_status, 0, sizeof(*stmt->upsert_status)); stmt 509 ext/mysqlnd/mysqlnd_ps.c stmt->upsert_status->affected_rows = conn->upsert_status->affected_rows; stmt 513 ext/mysqlnd/mysqlnd_ps.c stmt->state = MYSQLND_STMT_PREPARED; stmt 514 ext/mysqlnd/mysqlnd_ps.c stmt->send_types_to_server = 1; stmt 523 ext/mysqlnd/mysqlnd_ps.c SET_EMPTY_ERROR(*stmt->error_info); stmt 524 ext/mysqlnd/mysqlnd_ps.c SET_EMPTY_ERROR(*stmt->conn->error_info); stmt 525 ext/mysqlnd/mysqlnd_ps.c *stmt->upsert_status = *conn->upsert_status; /* copy status */ stmt 526 ext/mysqlnd/mysqlnd_ps.c stmt->state = MYSQLND_STMT_EXECUTED; stmt 532 ext/mysqlnd/mysqlnd_ps.c stmt->result->type = MYSQLND_RES_PS_BUF; stmt 533 ext/mysqlnd/mysqlnd_ps.c if (!stmt->result->conn) { stmt 538 ext/mysqlnd/mysqlnd_ps.c stmt->result->conn = stmt->conn->m->get_reference(stmt->conn); stmt 542 ext/mysqlnd/mysqlnd_ps.c stmt->field_count = stmt->result->field_count = conn->field_count; stmt 543 ext/mysqlnd/mysqlnd_ps.c if (stmt->result->stored_data) { stmt 544 ext/mysqlnd/mysqlnd_ps.c stmt->result->stored_data->lengths = NULL; stmt 545 ext/mysqlnd/mysqlnd_ps.c } else if (stmt->result->unbuf) { stmt 546 ext/mysqlnd/mysqlnd_ps.c stmt->result->unbuf->lengths = NULL; stmt 548 ext/mysqlnd/mysqlnd_ps.c if (stmt->field_count) { stmt 549 ext/mysqlnd/mysqlnd_ps.c stmt->state = MYSQLND_STMT_WAITING_USE_OR_STORE; stmt 555 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("server_status=%u cursor=%u", stmt->upsert_status->server_status, stmt 556 ext/mysqlnd/mysqlnd_ps.c stmt->upsert_status->server_status & SERVER_STATUS_CURSOR_EXISTS); stmt 558 ext/mysqlnd/mysqlnd_ps.c if (stmt->upsert_status->server_status & SERVER_STATUS_CURSOR_EXISTS) { stmt 560 ext/mysqlnd/mysqlnd_ps.c stmt->cursor_exists = TRUE; stmt 563 ext/mysqlnd/mysqlnd_ps.c stmt->default_rset_handler = s->m->use_result; stmt 565 ext/mysqlnd/mysqlnd_ps.c } else if (stmt->flags & CURSOR_TYPE_READ_ONLY) { stmt 578 ext/mysqlnd/mysqlnd_ps.c stmt->default_rset_handler = s->m->store_result; stmt 583 ext/mysqlnd/mysqlnd_ps.c stmt->default_rset_handler = s->m->use_result; stmt 589 ext/mysqlnd/mysqlnd_ps.c if (stmt->upsert_status->server_status & SERVER_PS_OUT_PARAMS) { stmt 597 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("server_status=%u cursor=%u", stmt->upsert_status->server_status, stmt->upsert_status->server_status & SERVER_STATUS_CURSOR_EXISTS); stmt 599 ext/mysqlnd/mysqlnd_ps.c if (ret == PASS && conn->last_query_type == QUERY_UPSERT && stmt->upsert_status->affected_rows) { stmt 600 ext/mysqlnd/mysqlnd_ps.c MYSQLND_INC_CONN_STATISTIC_W_VALUE(conn->stats, STAT_ROWS_AFFECTED_PS, stmt->upsert_status->affected_rows); stmt 628 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 636 ext/mysqlnd/mysqlnd_ps.c if (!stmt || !stmt->conn) { stmt 639 ext/mysqlnd/mysqlnd_ps.c conn = stmt->conn; stmt 640 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("stmt=%lu", stmt->stmt_id); stmt 642 ext/mysqlnd/mysqlnd_ps.c SET_ERROR_AFF_ROWS(stmt); stmt 643 ext/mysqlnd/mysqlnd_ps.c SET_ERROR_AFF_ROWS(stmt->conn); stmt 645 ext/mysqlnd/mysqlnd_ps.c if (stmt->result && stmt->state >= MYSQLND_STMT_PREPARED && stmt->field_count) { stmt 652 ext/mysqlnd/mysqlnd_ps.c if (stmt->result_bind && stmt 653 ext/mysqlnd/mysqlnd_ps.c stmt->result_zvals_separated_once == TRUE && stmt 654 ext/mysqlnd/mysqlnd_ps.c stmt->state >= MYSQLND_STMT_USER_FETCHING) stmt 669 ext/mysqlnd/mysqlnd_ps.c for (i = 0; i < stmt->field_count; i++) { stmt 670 ext/mysqlnd/mysqlnd_ps.c if (stmt->result_bind[i].bound == TRUE) { stmt 671 ext/mysqlnd/mysqlnd_ps.c zval *result = &stmt->result_bind[i].zv; stmt 686 ext/mysqlnd/mysqlnd_ps.c stmt->result->m.free_result_buffers(stmt->result); stmt 688 ext/mysqlnd/mysqlnd_ps.c stmt->state = MYSQLND_STMT_PREPARED; stmt 689 ext/mysqlnd/mysqlnd_ps.c } else if (stmt->state < MYSQLND_STMT_PREPARED) { stmt 693 ext/mysqlnd/mysqlnd_ps.c SET_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync); stmt 698 ext/mysqlnd/mysqlnd_ps.c if (stmt->param_count) { stmt 700 ext/mysqlnd/mysqlnd_ps.c if (!stmt->param_bind) { stmt 701 ext/mysqlnd/mysqlnd_ps.c SET_STMT_ERROR(stmt, CR_PARAMS_NOT_BOUND, UNKNOWN_SQLSTATE, stmt 706 ext/mysqlnd/mysqlnd_ps.c for (i = 0; i < stmt->param_count; i++) { stmt 707 ext/mysqlnd/mysqlnd_ps.c if (Z_ISUNDEF(stmt->param_bind[i].zv)) { stmt 715 ext/mysqlnd/mysqlnd_ps.c SET_STMT_ERROR(stmt, CR_PARAMS_NOT_BOUND, UNKNOWN_SQLSTATE, msg); stmt 726 ext/mysqlnd/mysqlnd_ps.c ret = stmt->conn->m->simple_command(stmt->conn, COM_STMT_EXECUTE, request, request_len, stmt 730 ext/mysqlnd/mysqlnd_ps.c SET_STMT_ERROR(stmt, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, "Couldn't generate the request. Possibly OOM."); stmt 738 ext/mysqlnd/mysqlnd_ps.c COPY_CLIENT_ERROR(*stmt->error_info, *conn->error_info); stmt 742 ext/mysqlnd/mysqlnd_ps.c stmt->execute_count++; stmt 754 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 760 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("stmt=%lu", stmt != NULL ? stmt->stmt_id : 0L); stmt 769 ext/mysqlnd/mysqlnd_ps.c if (stmt->result_bind) { stmt 785 ext/mysqlnd/mysqlnd_ps.c if (stmt->update_max_length) { stmt 803 ext/mysqlnd/mysqlnd_ps.c zval *result = &stmt->result_bind[i].zv; stmt 811 ext/mysqlnd/mysqlnd_ps.c if (stmt->result_bind[i].bound == TRUE) { stmt 856 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 880 ext/mysqlnd/mysqlnd_ps.c row_packet->skip_extraction = stmt && stmt->result_bind? FALSE:TRUE; stmt 908 ext/mysqlnd/mysqlnd_ps.c if (stmt->result_bind[i].bound == TRUE) { stmt 910 ext/mysqlnd/mysqlnd_ps.c zval *result = &stmt->result_bind[i].zv; stmt 933 ext/mysqlnd/mysqlnd_ps.c MYSQLND_INC_CONN_STATISTIC(stmt->conn->stats, STAT_ROWS_FETCHED_FROM_CLIENT_PS_UNBUF); stmt 950 ext/mysqlnd/mysqlnd_ps.c COPY_CLIENT_ERROR(*stmt->conn->error_info, row_packet->error_info); stmt 951 ext/mysqlnd/mysqlnd_ps.c COPY_CLIENT_ERROR(*stmt->error_info, row_packet->error_info); stmt 983 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 988 ext/mysqlnd/mysqlnd_ps.c if (!stmt || !stmt->conn || !stmt->result) { stmt 991 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("stmt=%lu", stmt->stmt_id); stmt 993 ext/mysqlnd/mysqlnd_ps.c conn = stmt->conn; stmt 995 ext/mysqlnd/mysqlnd_ps.c if (!stmt->field_count || stmt 996 ext/mysqlnd/mysqlnd_ps.c (!stmt->cursor_exists && CONN_GET_STATE(conn) != CONN_FETCHING_DATA) || stmt 997 ext/mysqlnd/mysqlnd_ps.c (stmt->cursor_exists && CONN_GET_STATE(conn) != CONN_READY) || stmt 998 ext/mysqlnd/mysqlnd_ps.c (stmt->state != MYSQLND_STMT_WAITING_USE_OR_STORE)) stmt 1006 ext/mysqlnd/mysqlnd_ps.c SET_EMPTY_ERROR(*stmt->error_info); stmt 1008 ext/mysqlnd/mysqlnd_ps.c MYSQLND_INC_CONN_STATISTIC(stmt->conn->stats, STAT_PS_UNBUFFERED_SETS); stmt 1009 ext/mysqlnd/mysqlnd_ps.c result = stmt->result; stmt 1011 ext/mysqlnd/mysqlnd_ps.c result->m.use_result(stmt->result, TRUE); stmt 1012 ext/mysqlnd/mysqlnd_ps.c result->unbuf->m.fetch_row = stmt->cursor_exists? mysqlnd_fetch_stmt_row_cursor: stmt 1014 ext/mysqlnd/mysqlnd_ps.c stmt->state = MYSQLND_STMT_USE_OR_STORE_CALLED; stmt 1030 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 1036 ext/mysqlnd/mysqlnd_ps.c if (!stmt || !stmt->conn || !result || !result->conn || !result->unbuf) { stmt 1041 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("stmt=%lu flags=%u", stmt->stmt_id, flags); stmt 1043 ext/mysqlnd/mysqlnd_ps.c if (stmt->state < MYSQLND_STMT_USER_FETCHING) { stmt 1045 ext/mysqlnd/mysqlnd_ps.c SET_CLIENT_ERROR(*stmt->conn->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, stmt 1054 ext/mysqlnd/mysqlnd_ps.c SET_EMPTY_ERROR(*stmt->error_info); stmt 1055 ext/mysqlnd/mysqlnd_ps.c SET_EMPTY_ERROR(*stmt->conn->error_info); stmt 1057 ext/mysqlnd/mysqlnd_ps.c int4store(buf, stmt->stmt_id); stmt 1060 ext/mysqlnd/mysqlnd_ps.c if (FAIL == stmt->conn->m->simple_command(stmt->conn, COM_STMT_FETCH, buf, sizeof(buf), stmt 1063 ext/mysqlnd/mysqlnd_ps.c COPY_CLIENT_ERROR(*stmt->error_info, *stmt->conn->error_info); stmt 1067 ext/mysqlnd/mysqlnd_ps.c row_packet->skip_extraction = stmt->result_bind? FALSE:TRUE; stmt 1069 ext/mysqlnd/mysqlnd_ps.c memset(stmt->upsert_status, 0, sizeof(*stmt->upsert_status)); stmt 1094 ext/mysqlnd/mysqlnd_ps.c if (stmt->result_bind[i].bound == TRUE) { stmt 1096 ext/mysqlnd/mysqlnd_ps.c zval *result = &stmt->result_bind[i].zv; stmt 1106 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("i=%u bound_var=%p type=%u refc=%u", i, &stmt->result_bind[i].zv, stmt 1107 ext/mysqlnd/mysqlnd_ps.c Z_TYPE_P(data), Z_REFCOUNTED(stmt->result_bind[i].zv)? stmt 1108 ext/mysqlnd/mysqlnd_ps.c Z_REFCOUNT(stmt->result_bind[i].zv) : 0); stmt 1140 ext/mysqlnd/mysqlnd_ps.c MYSQLND_INC_CONN_STATISTIC(stmt->conn->stats, STAT_ROWS_FETCHED_FROM_CLIENT_PS_CURSOR); stmt 1147 ext/mysqlnd/mysqlnd_ps.c stmt->upsert_status->warning_count = stmt 1148 ext/mysqlnd/mysqlnd_ps.c stmt->conn->upsert_status->warning_count = stmt 1151 ext/mysqlnd/mysqlnd_ps.c stmt->upsert_status->server_status = stmt 1152 ext/mysqlnd/mysqlnd_ps.c stmt->conn->upsert_status->server_status = stmt 1157 ext/mysqlnd/mysqlnd_ps.c stmt->upsert_status->warning_count = stmt 1158 ext/mysqlnd/mysqlnd_ps.c stmt->conn->upsert_status->warning_count = stmt 1160 ext/mysqlnd/mysqlnd_ps.c stmt->upsert_status->server_status = stmt 1161 ext/mysqlnd/mysqlnd_ps.c stmt->conn->upsert_status->server_status = stmt 1177 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 1180 ext/mysqlnd/mysqlnd_ps.c if (!stmt || !stmt->conn) { stmt 1183 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("stmt=%lu", stmt->stmt_id); stmt 1185 ext/mysqlnd/mysqlnd_ps.c if (!stmt->result || stmt 1186 ext/mysqlnd/mysqlnd_ps.c stmt->state < MYSQLND_STMT_WAITING_USE_OR_STORE) { stmt 1187 ext/mysqlnd/mysqlnd_ps.c SET_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync); stmt 1191 ext/mysqlnd/mysqlnd_ps.c } else if (stmt->state == MYSQLND_STMT_WAITING_USE_OR_STORE) { stmt 1194 ext/mysqlnd/mysqlnd_ps.c stmt->default_rset_handler(s); stmt 1196 ext/mysqlnd/mysqlnd_ps.c stmt->state = MYSQLND_STMT_USER_FETCHING; stmt 1198 ext/mysqlnd/mysqlnd_ps.c SET_EMPTY_ERROR(*stmt->error_info); stmt 1199 ext/mysqlnd/mysqlnd_ps.c SET_EMPTY_ERROR(*stmt->conn->error_info); stmt 1201 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("result_bind=%p separated_once=%u", &stmt->result_bind, stmt->result_zvals_separated_once); stmt 1206 ext/mysqlnd/mysqlnd_ps.c if (stmt->result_bind && !stmt->result_zvals_separated_once) { stmt 1212 ext/mysqlnd/mysqlnd_ps.c for (i = 0; i < stmt->result->field_count; i++) { stmt 1213 ext/mysqlnd/mysqlnd_ps.c if (stmt->result_bind[i].bound == TRUE) { stmt 1214 ext/mysqlnd/mysqlnd_ps.c zval *result = &stmt->result_bind[i].zv; stmt 1220 ext/mysqlnd/mysqlnd_ps.c stmt->result_zvals_separated_once = TRUE; stmt 1223 ext/mysqlnd/mysqlnd_ps.c ret = stmt->result->m.fetch_row(stmt->result, (void*)s, 0, fetched_anything); stmt 1233 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 1238 ext/mysqlnd/mysqlnd_ps.c if (!stmt || !stmt->conn) { stmt 1241 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("stmt=%lu", stmt->stmt_id); stmt 1243 ext/mysqlnd/mysqlnd_ps.c SET_EMPTY_ERROR(*stmt->error_info); stmt 1244 ext/mysqlnd/mysqlnd_ps.c SET_EMPTY_ERROR(*stmt->conn->error_info); stmt 1246 ext/mysqlnd/mysqlnd_ps.c if (stmt->stmt_id) { stmt 1247 ext/mysqlnd/mysqlnd_ps.c MYSQLND_CONN_DATA * conn = stmt->conn; stmt 1248 ext/mysqlnd/mysqlnd_ps.c if (stmt->param_bind) { stmt 1252 ext/mysqlnd/mysqlnd_ps.c for (i = 0; i < stmt->param_count; i++) { stmt 1253 ext/mysqlnd/mysqlnd_ps.c if (stmt->param_bind[i].flags & MYSQLND_PARAM_BIND_BLOB_USED) { stmt 1254 ext/mysqlnd/mysqlnd_ps.c stmt->param_bind[i].flags &= ~MYSQLND_PARAM_BIND_BLOB_USED; stmt 1267 ext/mysqlnd/mysqlnd_ps.c int4store(cmd_buf, stmt->stmt_id); stmt 1272 ext/mysqlnd/mysqlnd_ps.c COPY_CLIENT_ERROR(*stmt->error_info, *conn->error_info); stmt 1274 ext/mysqlnd/mysqlnd_ps.c *stmt->upsert_status = *conn->upsert_status; stmt 1286 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 1290 ext/mysqlnd/mysqlnd_ps.c if (!stmt || !stmt->conn) { stmt 1293 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("stmt=%lu", stmt->stmt_id); stmt 1295 ext/mysqlnd/mysqlnd_ps.c if (stmt->stmt_id) { stmt 1302 ext/mysqlnd/mysqlnd_ps.c if (stmt->state == MYSQLND_STMT_WAITING_USE_OR_STORE) { stmt 1304 ext/mysqlnd/mysqlnd_ps.c stmt->default_rset_handler(s); stmt 1305 ext/mysqlnd/mysqlnd_ps.c stmt->state = MYSQLND_STMT_USER_FETCHING; stmt 1308 ext/mysqlnd/mysqlnd_ps.c if (stmt->result) { stmt 1310 ext/mysqlnd/mysqlnd_ps.c stmt->result->m.skip_result(stmt->result); stmt 1325 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 1332 ext/mysqlnd/mysqlnd_ps.c if (!stmt || !stmt->conn) { stmt 1335 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("stmt=%lu param_no=%u data_len=%lu", stmt->stmt_id, param_no, length); stmt 1337 ext/mysqlnd/mysqlnd_ps.c conn = stmt->conn; stmt 1339 ext/mysqlnd/mysqlnd_ps.c SET_EMPTY_ERROR(*stmt->error_info); stmt 1340 ext/mysqlnd/mysqlnd_ps.c SET_EMPTY_ERROR(*stmt->conn->error_info); stmt 1342 ext/mysqlnd/mysqlnd_ps.c if (stmt->state < MYSQLND_STMT_PREPARED) { stmt 1343 ext/mysqlnd/mysqlnd_ps.c SET_STMT_ERROR(stmt, CR_NO_PREPARE_STMT, UNKNOWN_SQLSTATE, mysqlnd_stmt_not_prepared); stmt 1347 ext/mysqlnd/mysqlnd_ps.c if (!stmt->param_bind) { stmt 1348 ext/mysqlnd/mysqlnd_ps.c SET_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync); stmt 1352 ext/mysqlnd/mysqlnd_ps.c if (param_no >= stmt->param_count) { stmt 1353 ext/mysqlnd/mysqlnd_ps.c SET_STMT_ERROR(stmt, CR_INVALID_PARAMETER_NO, UNKNOWN_SQLSTATE, "Invalid parameter number"); stmt 1357 ext/mysqlnd/mysqlnd_ps.c if (stmt->param_bind[param_no].type != MYSQL_TYPE_LONG_BLOB) { stmt 1358 ext/mysqlnd/mysqlnd_ps.c SET_STMT_ERROR(stmt, CR_INVALID_BUFFER_USE, UNKNOWN_SQLSTATE, mysqlnd_not_bound_as_blob); stmt 1377 ext/mysqlnd/mysqlnd_ps.c stmt->param_bind[param_no].flags |= MYSQLND_PARAM_BIND_BLOB_USED; stmt 1379 ext/mysqlnd/mysqlnd_ps.c int4store(cmd_buf, stmt->stmt_id); stmt 1387 ext/mysqlnd/mysqlnd_ps.c COPY_CLIENT_ERROR(*stmt->error_info, *conn->error_info); stmt 1391 ext/mysqlnd/mysqlnd_ps.c SET_OOM_ERROR(*stmt->error_info); stmt 1419 ext/mysqlnd/mysqlnd_ps.c SET_STMT_ERROR(stmt, CR_CONNECTION_ERROR, UNKNOWN_SQLSTATE, stmt 1436 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 1438 ext/mysqlnd/mysqlnd_ps.c if (!stmt || !stmt->conn) { stmt 1441 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("stmt=%lu param_count=%u", stmt->stmt_id, stmt->param_count); stmt 1443 ext/mysqlnd/mysqlnd_ps.c if (stmt->state < MYSQLND_STMT_PREPARED) { stmt 1444 ext/mysqlnd/mysqlnd_ps.c SET_STMT_ERROR(stmt, CR_NO_PREPARE_STMT, UNKNOWN_SQLSTATE, mysqlnd_stmt_not_prepared); stmt 1452 ext/mysqlnd/mysqlnd_ps.c SET_EMPTY_ERROR(*stmt->error_info); stmt 1453 ext/mysqlnd/mysqlnd_ps.c SET_EMPTY_ERROR(*stmt->conn->error_info); stmt 1455 ext/mysqlnd/mysqlnd_ps.c if (stmt->param_count) { stmt 1459 ext/mysqlnd/mysqlnd_ps.c SET_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, "Re-binding (still) not supported"); stmt 1462 ext/mysqlnd/mysqlnd_ps.c } else if (stmt->param_bind) { stmt 1468 ext/mysqlnd/mysqlnd_ps.c for (i = 0; i < stmt->param_count; i++) { stmt 1473 ext/mysqlnd/mysqlnd_ps.c zval_ptr_dtor(&stmt->param_bind[i].zv); stmt 1475 ext/mysqlnd/mysqlnd_ps.c if (stmt->param_bind != param_bind) { stmt 1476 ext/mysqlnd/mysqlnd_ps.c s->m->free_parameter_bind(s, stmt->param_bind); stmt 1480 ext/mysqlnd/mysqlnd_ps.c stmt->param_bind = param_bind; stmt 1481 ext/mysqlnd/mysqlnd_ps.c for (i = 0; i < stmt->param_count; i++) { stmt 1483 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("%u is of type %u", i, stmt->param_bind[i].type); stmt 1486 ext/mysqlnd/mysqlnd_ps.c Z_TRY_ADDREF(stmt->param_bind[i].zv); stmt 1487 ext/mysqlnd/mysqlnd_ps.c stmt->param_bind[i].flags = 0; stmt 1488 ext/mysqlnd/mysqlnd_ps.c if (stmt->param_bind[i].type == MYSQL_TYPE_LONG_BLOB) { stmt 1489 ext/mysqlnd/mysqlnd_ps.c stmt->param_bind[i].flags &= ~MYSQLND_PARAM_BIND_BLOB_USED; stmt 1492 ext/mysqlnd/mysqlnd_ps.c stmt->send_types_to_server = 1; stmt 1505 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 1507 ext/mysqlnd/mysqlnd_ps.c if (!stmt || !stmt->conn) { stmt 1510 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("stmt=%lu param_no=%u param_count=%u type=%u", stmt->stmt_id, param_no, stmt->param_count, type); stmt 1512 ext/mysqlnd/mysqlnd_ps.c if (stmt->state < MYSQLND_STMT_PREPARED) { stmt 1513 ext/mysqlnd/mysqlnd_ps.c SET_STMT_ERROR(stmt, CR_NO_PREPARE_STMT, UNKNOWN_SQLSTATE, mysqlnd_stmt_not_prepared); stmt 1518 ext/mysqlnd/mysqlnd_ps.c if (param_no >= stmt->param_count) { stmt 1519 ext/mysqlnd/mysqlnd_ps.c SET_STMT_ERROR(stmt, CR_INVALID_PARAMETER_NO, UNKNOWN_SQLSTATE, "Invalid parameter number"); stmt 1523 ext/mysqlnd/mysqlnd_ps.c SET_EMPTY_ERROR(*stmt->error_info); stmt 1524 ext/mysqlnd/mysqlnd_ps.c SET_EMPTY_ERROR(*stmt->conn->error_info); stmt 1526 ext/mysqlnd/mysqlnd_ps.c if (stmt->param_count) { stmt 1527 ext/mysqlnd/mysqlnd_ps.c if (!stmt->param_bind) { stmt 1528 ext/mysqlnd/mysqlnd_ps.c stmt->param_bind = mnd_pecalloc(stmt->param_count, sizeof(MYSQLND_PARAM_BIND), stmt->persistent); stmt 1529 ext/mysqlnd/mysqlnd_ps.c if (!stmt->param_bind) { stmt 1539 ext/mysqlnd/mysqlnd_ps.c zval_ptr_dtor(&stmt->param_bind[param_no].zv); stmt 1542 ext/mysqlnd/mysqlnd_ps.c stmt->param_bind[param_no].flags &= ~MYSQLND_PARAM_BIND_BLOB_USED; stmt 1544 ext/mysqlnd/mysqlnd_ps.c ZVAL_COPY_VALUE(&stmt->param_bind[param_no].zv, zv); stmt 1545 ext/mysqlnd/mysqlnd_ps.c stmt->param_bind[param_no].type = type; stmt 1547 ext/mysqlnd/mysqlnd_ps.c stmt->send_types_to_server = 1; stmt 1559 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 1561 ext/mysqlnd/mysqlnd_ps.c if (!stmt || !stmt->conn) { stmt 1564 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("stmt=%lu param_count=%u", stmt->stmt_id, stmt->param_count); stmt 1566 ext/mysqlnd/mysqlnd_ps.c if (stmt->state < MYSQLND_STMT_PREPARED) { stmt 1567 ext/mysqlnd/mysqlnd_ps.c SET_STMT_ERROR(stmt, CR_NO_PREPARE_STMT, UNKNOWN_SQLSTATE, mysqlnd_stmt_not_prepared); stmt 1572 ext/mysqlnd/mysqlnd_ps.c SET_EMPTY_ERROR(*stmt->error_info); stmt 1573 ext/mysqlnd/mysqlnd_ps.c SET_EMPTY_ERROR(*stmt->conn->error_info); stmt 1575 ext/mysqlnd/mysqlnd_ps.c if (stmt->param_count) { stmt 1576 ext/mysqlnd/mysqlnd_ps.c stmt->send_types_to_server = 1; stmt 1588 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 1590 ext/mysqlnd/mysqlnd_ps.c if (!stmt || !stmt->conn) { stmt 1593 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("stmt=%lu field_count=%u", stmt->stmt_id, stmt->field_count); stmt 1595 ext/mysqlnd/mysqlnd_ps.c if (stmt->state < MYSQLND_STMT_PREPARED) { stmt 1596 ext/mysqlnd/mysqlnd_ps.c SET_STMT_ERROR(stmt, CR_NO_PREPARE_STMT, UNKNOWN_SQLSTATE, mysqlnd_stmt_not_prepared); stmt 1604 ext/mysqlnd/mysqlnd_ps.c SET_EMPTY_ERROR(*stmt->error_info); stmt 1605 ext/mysqlnd/mysqlnd_ps.c SET_EMPTY_ERROR(*stmt->conn->error_info); stmt 1607 ext/mysqlnd/mysqlnd_ps.c if (stmt->field_count) { stmt 1616 ext/mysqlnd/mysqlnd_ps.c stmt->result_zvals_separated_once = FALSE; stmt 1617 ext/mysqlnd/mysqlnd_ps.c stmt->result_bind = result_bind; stmt 1618 ext/mysqlnd/mysqlnd_ps.c for (i = 0; i < stmt->field_count; i++) { stmt 1620 ext/mysqlnd/mysqlnd_ps.c Z_TRY_ADDREF(stmt->result_bind[i].zv); stmt 1622 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("ref of %p = %u", &stmt->result_bind[i].zv, stmt 1623 ext/mysqlnd/mysqlnd_ps.c Z_REFCOUNTED(stmt->result_bind[i].zv)? Z_REFCOUNT(stmt->result_bind[i].zv) : 0); stmt 1629 ext/mysqlnd/mysqlnd_ps.c stmt->result_bind[i].bound = TRUE; stmt 1644 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 1646 ext/mysqlnd/mysqlnd_ps.c if (!stmt || !stmt->conn) { stmt 1649 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("stmt=%lu field_count=%u", stmt->stmt_id, stmt->field_count); stmt 1651 ext/mysqlnd/mysqlnd_ps.c if (stmt->state < MYSQLND_STMT_PREPARED) { stmt 1652 ext/mysqlnd/mysqlnd_ps.c SET_STMT_ERROR(stmt, CR_NO_PREPARE_STMT, UNKNOWN_SQLSTATE, mysqlnd_stmt_not_prepared); stmt 1657 ext/mysqlnd/mysqlnd_ps.c if (param_no >= stmt->field_count) { stmt 1658 ext/mysqlnd/mysqlnd_ps.c SET_STMT_ERROR(stmt, CR_INVALID_PARAMETER_NO, UNKNOWN_SQLSTATE, "Invalid parameter number"); stmt 1663 ext/mysqlnd/mysqlnd_ps.c SET_EMPTY_ERROR(*stmt->error_info); stmt 1664 ext/mysqlnd/mysqlnd_ps.c SET_EMPTY_ERROR(*stmt->conn->error_info); stmt 1666 ext/mysqlnd/mysqlnd_ps.c if (stmt->field_count) { stmt 1669 ext/mysqlnd/mysqlnd_ps.c if (!stmt->result_bind) { stmt 1670 ext/mysqlnd/mysqlnd_ps.c stmt->result_bind = mnd_pecalloc(stmt->field_count, sizeof(MYSQLND_RESULT_BIND), stmt->persistent); stmt 1672 ext/mysqlnd/mysqlnd_ps.c stmt->result_bind = mnd_perealloc(stmt->result_bind, stmt->field_count * sizeof(MYSQLND_RESULT_BIND), stmt->persistent); stmt 1674 ext/mysqlnd/mysqlnd_ps.c if (!stmt->result_bind) { stmt 1677 ext/mysqlnd/mysqlnd_ps.c ZVAL_NULL(&stmt->result_bind[param_no].zv); stmt 1683 ext/mysqlnd/mysqlnd_ps.c stmt->result_bind[param_no].bound = TRUE; stmt 1695 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 1696 ext/mysqlnd/mysqlnd_ps.c return stmt? stmt->upsert_status->last_insert_id : 0; stmt 1705 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 1706 ext/mysqlnd/mysqlnd_ps.c return stmt? stmt->upsert_status->affected_rows : 0; stmt 1715 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 1716 ext/mysqlnd/mysqlnd_ps.c return stmt && stmt->result? mysqlnd_num_rows(stmt->result):0; stmt 1725 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 1726 ext/mysqlnd/mysqlnd_ps.c return stmt? stmt->upsert_status->warning_count : 0; stmt 1735 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 1736 ext/mysqlnd/mysqlnd_ps.c return stmt? stmt->upsert_status->server_status : 0; stmt 1745 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 1746 ext/mysqlnd/mysqlnd_ps.c return stmt? stmt->field_count : 0; stmt 1755 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 1756 ext/mysqlnd/mysqlnd_ps.c return stmt? stmt->param_count : 0; stmt 1765 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 1766 ext/mysqlnd/mysqlnd_ps.c return stmt? stmt->error_info->error_no : 0; stmt 1775 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 1776 ext/mysqlnd/mysqlnd_ps.c return stmt? stmt->error_info->error : 0; stmt 1785 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 1786 ext/mysqlnd/mysqlnd_ps.c return stmt && stmt->error_info->sqlstate[0] ? stmt->error_info->sqlstate:MYSQLND_SQLSTATE_NULL; stmt 1795 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 1796 ext/mysqlnd/mysqlnd_ps.c return stmt && stmt->result? stmt->result->m.seek_data(stmt->result, row) : FAIL; stmt 1805 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 1806 ext/mysqlnd/mysqlnd_ps.c if (!stmt || !stmt->param_count) { stmt 1818 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 1822 ext/mysqlnd/mysqlnd_ps.c if (!stmt) { stmt 1825 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("stmt=%u field_count=%u", stmt->stmt_id, stmt->field_count); stmt 1827 ext/mysqlnd/mysqlnd_ps.c if (!stmt->field_count || !stmt->conn || !stmt->result || !stmt->result->meta) { stmt 1832 ext/mysqlnd/mysqlnd_ps.c if (stmt->update_max_length && stmt->result->stored_data) { stmt 1834 ext/mysqlnd/mysqlnd_ps.c stmt->result->stored_data->m.initialize_result_set_rest(stmt->result->stored_data, stmt->result->meta, stmt->conn->stats, stmt 1835 ext/mysqlnd/mysqlnd_ps.c stmt->conn->options->int_and_float_native); stmt 1847 ext/mysqlnd/mysqlnd_ps.c result = stmt->conn->m->result_init(stmt->field_count, stmt->persistent); stmt 1852 ext/mysqlnd/mysqlnd_ps.c result->unbuf = mysqlnd_result_unbuffered_init(stmt->field_count, TRUE, result->persistent); stmt 1857 ext/mysqlnd/mysqlnd_ps.c result->meta = stmt->result->meta->m->clone_metadata(stmt->result->meta, FALSE); stmt 1866 ext/mysqlnd/mysqlnd_ps.c SET_OOM_ERROR(*stmt->conn->error_info); stmt 1881 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 1883 ext/mysqlnd/mysqlnd_ps.c if (!stmt) { stmt 1886 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("stmt=%lu attr_type=%u", stmt->stmt_id, attr_type); stmt 1895 ext/mysqlnd/mysqlnd_ps.c stmt->update_max_length = bval? TRUE:FALSE; stmt 1901 ext/mysqlnd/mysqlnd_ps.c SET_STMT_ERROR(stmt, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "Not implemented"); stmt 1905 ext/mysqlnd/mysqlnd_ps.c stmt->flags = ival; stmt 1913 ext/mysqlnd/mysqlnd_ps.c SET_STMT_ERROR(stmt, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "Not implemented"); stmt 1917 ext/mysqlnd/mysqlnd_ps.c stmt->prefetch_rows = ival; stmt 1921 ext/mysqlnd/mysqlnd_ps.c SET_STMT_ERROR(stmt, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "Not implemented"); stmt 1936 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 1938 ext/mysqlnd/mysqlnd_ps.c if (!stmt) { stmt 1941 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("stmt=%lu attr_type=%u", stmt->stmt_id, attr_type); stmt 1945 ext/mysqlnd/mysqlnd_ps.c *(zend_bool *) value= stmt->update_max_length; stmt 1948 ext/mysqlnd/mysqlnd_ps.c *(zend_ulong *) value= stmt->flags; stmt 1951 ext/mysqlnd/mysqlnd_ps.c *(zend_ulong *) value= stmt->prefetch_rows; stmt 1967 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 1969 ext/mysqlnd/mysqlnd_ps.c if (!stmt || !stmt->conn) { stmt 1972 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("stmt=%lu", stmt->stmt_id); stmt 1974 ext/mysqlnd/mysqlnd_ps.c if (!stmt->result) { stmt 1983 ext/mysqlnd/mysqlnd_ps.c if (stmt->state == MYSQLND_STMT_WAITING_USE_OR_STORE) { stmt 1986 ext/mysqlnd/mysqlnd_ps.c stmt->default_rset_handler = s->m->use_result; stmt 1987 ext/mysqlnd/mysqlnd_ps.c stmt->default_rset_handler(s); stmt 1990 ext/mysqlnd/mysqlnd_ps.c if (stmt->state > MYSQLND_STMT_WAITING_USE_OR_STORE) { stmt 1993 ext/mysqlnd/mysqlnd_ps.c stmt->result->m.skip_result(stmt->result); stmt 2001 ext/mysqlnd/mysqlnd_ps.c stmt->result->m.free_result_buffers(stmt->result); stmt 2004 ext/mysqlnd/mysqlnd_ps.c if (stmt->state > MYSQLND_STMT_PREPARED) { stmt 2006 ext/mysqlnd/mysqlnd_ps.c stmt->state = MYSQLND_STMT_PREPARED; stmt 2010 ext/mysqlnd/mysqlnd_ps.c CONN_SET_STATE(stmt->conn, CONN_READY); stmt 2021 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 2025 ext/mysqlnd/mysqlnd_ps.c if (!stmt) { stmt 2028 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("stmt=%lu result_bind=%p field_count=%u", stmt->stmt_id, stmt->result_bind, stmt->field_count); stmt 2030 ext/mysqlnd/mysqlnd_ps.c if (!stmt->result_bind) { stmt 2039 ext/mysqlnd/mysqlnd_ps.c for (i = 0; i < stmt->field_count; i++) { stmt 2041 ext/mysqlnd/mysqlnd_ps.c if (stmt->result_bind[i].bound == TRUE) { stmt 2043 ext/mysqlnd/mysqlnd_ps.c Z_REFCOUNTED(stmt->result_bind[i].zv)? Z_REFCOUNT(stmt->result_bind[i].zv) : 0); stmt 2044 ext/mysqlnd/mysqlnd_ps.c zval_ptr_dtor(&stmt->result_bind[i].zv); stmt 2048 ext/mysqlnd/mysqlnd_ps.c s->m->free_result_bind(s, stmt->result_bind); stmt 2049 ext/mysqlnd/mysqlnd_ps.c stmt->result_bind = NULL; stmt 2060 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 2062 ext/mysqlnd/mysqlnd_ps.c if (!stmt) { stmt 2065 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("stmt=%lu result_bind=%p field_count=%u param_no=%u", stmt->stmt_id, stmt->result_bind, stmt->field_count, param_no); stmt 2067 ext/mysqlnd/mysqlnd_ps.c if (!stmt->result_bind) { stmt 2077 ext/mysqlnd/mysqlnd_ps.c if (stmt->result_bind[param_no].bound == TRUE) { stmt 2079 ext/mysqlnd/mysqlnd_ps.c Z_REFCOUNTED(stmt->result_bind[param_no].zv)? stmt 2080 ext/mysqlnd/mysqlnd_ps.c Z_REFCOUNT(stmt->result_bind[param_no].zv) : 0); stmt 2081 ext/mysqlnd/mysqlnd_ps.c zval_ptr_dtor(&stmt->result_bind[param_no].zv); stmt 2093 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 2095 ext/mysqlnd/mysqlnd_ps.c if (!stmt) { stmt 2105 ext/mysqlnd/mysqlnd_ps.c if (stmt->result) { stmt 2106 ext/mysqlnd/mysqlnd_ps.c stmt->result->m.free_result_internal(stmt->result); stmt 2107 ext/mysqlnd/mysqlnd_ps.c stmt->result = NULL; stmt 2109 ext/mysqlnd/mysqlnd_ps.c if (stmt->error_info->error_list) { stmt 2110 ext/mysqlnd/mysqlnd_ps.c zend_llist_clean(stmt->error_info->error_list); stmt 2111 ext/mysqlnd/mysqlnd_ps.c mnd_pefree(stmt->error_info->error_list, s->persistent); stmt 2112 ext/mysqlnd/mysqlnd_ps.c stmt->error_info->error_list = NULL; stmt 2124 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 2126 ext/mysqlnd/mysqlnd_ps.c if (!stmt) { stmt 2129 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("stmt=%lu param_bind=%p param_count=%u", stmt->stmt_id, stmt->param_bind, stmt->param_count); stmt 2132 ext/mysqlnd/mysqlnd_ps.c if (stmt->param_bind) { stmt 2139 ext/mysqlnd/mysqlnd_ps.c for (i = 0; i < stmt->param_count; i++) { stmt 2144 ext/mysqlnd/mysqlnd_ps.c zval_ptr_dtor(&stmt->param_bind[i].zv); stmt 2146 ext/mysqlnd/mysqlnd_ps.c s->m->free_parameter_bind(s, stmt->param_bind); stmt 2147 ext/mysqlnd/mysqlnd_ps.c stmt->param_bind = NULL; stmt 2160 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 2166 ext/mysqlnd/mysqlnd_ps.c if (!stmt || !stmt->conn) { stmt 2169 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("stmt=%lu", stmt->stmt_id); stmt 2171 ext/mysqlnd/mysqlnd_ps.c conn = stmt->conn; stmt 2173 ext/mysqlnd/mysqlnd_ps.c SET_EMPTY_ERROR(*stmt->error_info); stmt 2174 ext/mysqlnd/mysqlnd_ps.c SET_EMPTY_ERROR(*stmt->conn->error_info); stmt 2182 ext/mysqlnd/mysqlnd_ps.c if (stmt->state == MYSQLND_STMT_WAITING_USE_OR_STORE) { stmt 2184 ext/mysqlnd/mysqlnd_ps.c stmt->default_rset_handler(s); stmt 2185 ext/mysqlnd/mysqlnd_ps.c stmt->state = MYSQLND_STMT_USER_FETCHING; stmt 2189 ext/mysqlnd/mysqlnd_ps.c if (stmt->result) { stmt 2191 ext/mysqlnd/mysqlnd_ps.c stmt->result->m.skip_result(stmt->result); stmt 2198 ext/mysqlnd/mysqlnd_ps.c if (stmt->stmt_id) { stmt 2202 ext/mysqlnd/mysqlnd_ps.c int4store(cmd_buf, stmt->stmt_id); stmt 2207 ext/mysqlnd/mysqlnd_ps.c COPY_CLIENT_ERROR(*stmt->error_info, *conn->error_info); stmt 2211 ext/mysqlnd/mysqlnd_ps.c switch (stmt->execute_count) { stmt 2225 ext/mysqlnd/mysqlnd_ps.c if (stmt->execute_cmd_buffer.buffer) { stmt 2226 ext/mysqlnd/mysqlnd_ps.c mnd_pefree(stmt->execute_cmd_buffer.buffer, stmt->persistent); stmt 2227 ext/mysqlnd/mysqlnd_ps.c stmt->execute_cmd_buffer.buffer = NULL; stmt 2232 ext/mysqlnd/mysqlnd_ps.c if (stmt->conn) { stmt 2233 ext/mysqlnd/mysqlnd_ps.c stmt->conn->m->free_reference(stmt->conn); stmt 2234 ext/mysqlnd/mysqlnd_ps.c stmt->conn = NULL; stmt 2245 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = (s != NULL) ? s->data:NULL; stmt 2250 ext/mysqlnd/mysqlnd_ps.c if (stmt) { stmt 2251 ext/mysqlnd/mysqlnd_ps.c DBG_INF_FMT("stmt=%p", stmt); stmt 2257 ext/mysqlnd/mysqlnd_ps.c mnd_pefree(stmt, persistent); stmt 2271 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 2273 ext/mysqlnd/mysqlnd_ps.c if (!stmt) { stmt 2276 ext/mysqlnd/mysqlnd_ps.c DBG_RETURN(mnd_pecalloc(stmt->param_count, sizeof(MYSQLND_PARAM_BIND), stmt->persistent)); stmt 2285 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 2287 ext/mysqlnd/mysqlnd_ps.c if (!stmt) { stmt 2290 ext/mysqlnd/mysqlnd_ps.c DBG_RETURN(mnd_pecalloc(stmt->field_count, sizeof(MYSQLND_RESULT_BIND), stmt->persistent)); stmt 2299 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 2300 ext/mysqlnd/mysqlnd_ps.c if (stmt) { stmt 2301 ext/mysqlnd/mysqlnd_ps.c mnd_pefree(param_bind, stmt->persistent); stmt 2311 ext/mysqlnd/mysqlnd_ps.c MYSQLND_STMT_DATA * stmt = s? s->data:NULL; stmt 2312 ext/mysqlnd/mysqlnd_ps.c if (stmt) { stmt 2313 ext/mysqlnd/mysqlnd_ps.c mnd_pefree(result_bind, stmt->persistent); stmt 533 ext/mysqlnd/mysqlnd_ps_codec.c mysqlnd_stmt_free_copies(MYSQLND_STMT_DATA * stmt, zval *copies) stmt 537 ext/mysqlnd/mysqlnd_ps_codec.c for (i = 0; i < stmt->param_count; i++) { stmt 576 ext/mysqlnd/mysqlnd_ps_codec.c mysqlnd_stmt_execute_prepare_param_types(MYSQLND_STMT_DATA * stmt, zval ** copies_param, int * resend_types_next_time) stmt 580 ext/mysqlnd/mysqlnd_ps_codec.c for (i = 0; i < stmt->param_count; i++) { stmt 581 ext/mysqlnd/mysqlnd_ps_codec.c short current_type = stmt->param_bind[i].type; stmt 582 ext/mysqlnd/mysqlnd_ps_codec.c zval *parameter = &stmt->param_bind[i].zv; stmt 588 ext/mysqlnd/mysqlnd_ps_codec.c PASS != mysqlnd_stmt_copy_it(copies_param, parameter, stmt->param_count, i)) stmt 590 ext/mysqlnd/mysqlnd_ps_codec.c SET_OOM_ERROR(*stmt->error_info); stmt 614 ext/mysqlnd/mysqlnd_ps_codec.c stmt->send_types_to_server = *resend_types_next_time = 1; stmt 633 ext/mysqlnd/mysqlnd_ps_codec.c mysqlnd_stmt_execute_store_types(MYSQLND_STMT_DATA * stmt, zval * copies, zend_uchar ** p) stmt 636 ext/mysqlnd/mysqlnd_ps_codec.c for (i = 0; i < stmt->param_count; i++) { stmt 637 ext/mysqlnd/mysqlnd_ps_codec.c short current_type = stmt->param_bind[i].type; stmt 638 ext/mysqlnd/mysqlnd_ps_codec.c zval *parameter = &stmt->param_bind[i].zv; stmt 677 ext/mysqlnd/mysqlnd_ps_codec.c mysqlnd_stmt_execute_calculate_param_values_size(MYSQLND_STMT_DATA * stmt, zval ** copies_param, size_t * data_size) stmt 681 ext/mysqlnd/mysqlnd_ps_codec.c for (i = 0; i < stmt->param_count; i++) { stmt 684 ext/mysqlnd/mysqlnd_ps_codec.c zval *bind_var, *the_var = &stmt->param_bind[i].zv; stmt 688 ext/mysqlnd/mysqlnd_ps_codec.c if ((stmt->param_bind[i].type != MYSQL_TYPE_LONG_BLOB && Z_TYPE_P(the_var) == IS_NULL)) { stmt 693 ext/mysqlnd/mysqlnd_ps_codec.c for (j = i + 1; j < stmt->param_count; j++) { stmt 694 ext/mysqlnd/mysqlnd_ps_codec.c if (Z_ISREF(stmt->param_bind[j].zv) && Z_REFVAL(stmt->param_bind[j].zv) == the_var) { stmt 697 ext/mysqlnd/mysqlnd_ps_codec.c if (PASS != mysqlnd_stmt_copy_it(copies_param, the_var, stmt->param_count, i)) { stmt 698 ext/mysqlnd/mysqlnd_ps_codec.c SET_OOM_ERROR(*stmt->error_info); stmt 707 ext/mysqlnd/mysqlnd_ps_codec.c switch (stmt->param_bind[i].type) { stmt 712 ext/mysqlnd/mysqlnd_ps_codec.c if (PASS != mysqlnd_stmt_copy_it(copies_param, the_var, stmt->param_count, i)) { stmt 713 ext/mysqlnd/mysqlnd_ps_codec.c SET_OOM_ERROR(*stmt->error_info); stmt 733 ext/mysqlnd/mysqlnd_ps_codec.c if (!(stmt->param_bind[i].flags & MYSQLND_PARAM_BIND_BLOB_USED)) { stmt 747 ext/mysqlnd/mysqlnd_ps_codec.c if (PASS != mysqlnd_stmt_copy_it(copies_param, the_var, stmt->param_count, i)) { stmt 748 ext/mysqlnd/mysqlnd_ps_codec.c SET_OOM_ERROR(*stmt->error_info); stmt 768 ext/mysqlnd/mysqlnd_ps_codec.c mysqlnd_stmt_execute_store_param_values(MYSQLND_STMT_DATA * stmt, zval * copies, zend_uchar * buf, zend_uchar ** p, size_t null_byte_offset) stmt 771 ext/mysqlnd/mysqlnd_ps_codec.c for (i = 0; i < stmt->param_count; i++) { stmt 772 ext/mysqlnd/mysqlnd_ps_codec.c zval *data, *parameter = &stmt->param_bind[i].zv; stmt 780 ext/mysqlnd/mysqlnd_ps_codec.c switch (stmt->param_bind[i].type) { stmt 803 ext/mysqlnd/mysqlnd_ps_codec.c if (stmt->param_bind[i].flags & MYSQLND_PARAM_BIND_BLOB_USED) { stmt 804 ext/mysqlnd/mysqlnd_ps_codec.c stmt->param_bind[i].flags &= ~MYSQLND_PARAM_BIND_BLOB_USED; stmt 835 ext/mysqlnd/mysqlnd_ps_codec.c MYSQLND_STMT_DATA * stmt = s->data; stmt 846 ext/mysqlnd/mysqlnd_ps_codec.c unsigned int null_count = (stmt->param_count + 7) / 8; stmt 848 ext/mysqlnd/mysqlnd_ps_codec.c SET_OOM_ERROR(*stmt->error_info); stmt 865 ext/mysqlnd/mysqlnd_ps_codec.c if (FAIL == mysqlnd_stmt_execute_prepare_param_types(stmt, &copies, &resend_types_next_time)) { stmt 869 ext/mysqlnd/mysqlnd_ps_codec.c int1store(*p, stmt->send_types_to_server); stmt 872 ext/mysqlnd/mysqlnd_ps_codec.c if (stmt->send_types_to_server) { stmt 873 ext/mysqlnd/mysqlnd_ps_codec.c if (FAIL == mysqlnd_stmt_execute_check_n_enlarge_buffer(buf, p, buf_len, provided_buffer, stmt->param_count * 2)) { stmt 874 ext/mysqlnd/mysqlnd_ps_codec.c SET_OOM_ERROR(*stmt->error_info); stmt 877 ext/mysqlnd/mysqlnd_ps_codec.c mysqlnd_stmt_execute_store_types(stmt, copies, p); stmt 880 ext/mysqlnd/mysqlnd_ps_codec.c stmt->send_types_to_server = resend_types_next_time; stmt 884 ext/mysqlnd/mysqlnd_ps_codec.c if (FAIL == mysqlnd_stmt_execute_calculate_param_values_size(stmt, &copies, &data_size)) { stmt 890 ext/mysqlnd/mysqlnd_ps_codec.c SET_OOM_ERROR(*stmt->error_info); stmt 895 ext/mysqlnd/mysqlnd_ps_codec.c mysqlnd_stmt_execute_store_param_values(stmt, copies, *buf, p, null_byte_offset); stmt 899 ext/mysqlnd/mysqlnd_ps_codec.c mysqlnd_stmt_free_copies(stmt, copies); stmt 911 ext/mysqlnd/mysqlnd_ps_codec.c MYSQLND_STMT_DATA * stmt = s->data; stmt 912 ext/mysqlnd/mysqlnd_ps_codec.c zend_uchar *p = stmt->execute_cmd_buffer.buffer, stmt 913 ext/mysqlnd/mysqlnd_ps_codec.c *cmd_buffer = stmt->execute_cmd_buffer.buffer; stmt 914 ext/mysqlnd/mysqlnd_ps_codec.c size_t cmd_buffer_length = stmt->execute_cmd_buffer.length; stmt 919 ext/mysqlnd/mysqlnd_ps_codec.c int4store(p, stmt->stmt_id); stmt 923 ext/mysqlnd/mysqlnd_ps_codec.c int1store(p, (zend_uchar) stmt->flags); stmt 934 ext/mysqlnd/mysqlnd_ps_codec.c *free_buffer = (cmd_buffer != stmt->execute_cmd_buffer.buffer); stmt 404 ext/mysqlnd/mysqlnd_result.c MYSQLND_STMT_DATA * stmt = s ? s->data:NULL; stmt 410 ext/mysqlnd/mysqlnd_result.c DBG_INF_FMT("stmt=%lu", stmt? stmt->stmt_id:0); stmt 501 ext/mysqlnd/mysqlnd_result.c if (!stmt) { stmt 504 ext/mysqlnd/mysqlnd_result.c if (!stmt->result) { stmt 511 ext/mysqlnd/mysqlnd_result.c result = stmt->result = conn->m->result_init(rset_header->field_count, stmt->persistent); stmt 526 ext/mysqlnd/mysqlnd_result.c result = stmt->result; stmt 536 ext/mysqlnd/mysqlnd_result.c if (!stmt && conn->current_result) { stmt 555 ext/mysqlnd/mysqlnd_result.c if (!stmt) { stmt 558 ext/mysqlnd/mysqlnd_result.c stmt->result = NULL; stmt 559 ext/mysqlnd/mysqlnd_result.c memset(stmt, 0, sizeof(*stmt)); stmt 560 ext/mysqlnd/mysqlnd_result.c stmt->state = MYSQLND_STMT_INITTED; stmt 31 ext/mysqlnd/mysqlnd_result.h enum_func_status mysqlnd_query_read_result_set_header(MYSQLND_CONN_DATA * conn, MYSQLND_STMT * stmt); stmt 474 ext/mysqlnd/mysqlnd_structs.h typedef enum_func_status (*func_mysqlnd_conn_data__query_read_result_set_header)(MYSQLND_CONN_DATA * conn, MYSQLND_STMT * stmt); stmt 1727 ext/oci8/oci8.c PHP_OCI_CALL_RETURN(errstatus, OCIAttrGet, ((dvoid *)statement->stmt, OCI_HTYPE_STMT, (dvoid *) sqltext, (ub4 *)0, OCI_ATTR_STATEMENT, statement->err)); stmt 1735 ext/oci8/oci8.c PHP_OCI_CALL_RETURN(errstatus, OCIAttrGet, ((dvoid *)statement->stmt, OCI_HTYPE_STMT, (ub2 *)error_offset, (ub4 *)0, OCI_ATTR_PARSE_ERROR_OFFSET, statement->err)); stmt 2726 ext/oci8/oci8.c PHP_OCI_CALL_RETURN(errstatus, OCIAttrGet, ((dvoid *)invokedstatement->stmt, OCI_HTYPE_STMT, stmt 52 ext/oci8/oci8_interface.c zval *stmt, *var; stmt 60 ext/oci8/oci8_interface.c if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsz/|l", &stmt, &name, &name_len, &var, &type) == FAILURE) { stmt 69 ext/oci8/oci8_interface.c PHP_OCI_ZVAL_TO_STATEMENT(stmt, statement); stmt 57 ext/oci8/oci8_statement.c PHP_OCI_CALL(OCIHandleAlloc, (connection->env, (dvoid **)&(statement->stmt), OCI_HTYPE_STMT, 0, NULL)); stmt 66 ext/oci8/oci8_statement.c &(statement->stmt), stmt 85 ext/oci8/oci8_statement.c PHP_OCI_CALL(OCIStmtRelease, (statement->stmt, statement->err, NULL, 0, OCI_STRLS_CACHE_DELETE)); stmt 139 ext/oci8/oci8_statement.c PHP_OCI_CALL_RETURN(errstatus, OCIStmtGetNextResult, (statement->stmt, statement->err, &result, &rtype, OCI_DEFAULT)); stmt 152 ext/oci8/oci8_statement.c statement2->stmt = (OCIStmt *)result; stmt 195 ext/oci8/oci8_statement.c PHP_OCI_CALL_RETURN(errstatus, OCIAttrSet, (statement->stmt, OCI_HTYPE_STMT, &prefetch, 0, OCI_ATTR_PREFETCH_ROWS, statement->err)); stmt 261 ext/oci8/oci8_statement.c PHP_OCI_CALL_RETURN(errstatus, OCIStmtFetch, (statement->stmt, statement->err, nrows, OCI_FETCH_NEXT, OCI_DEFAULT)); stmt 298 ext/oci8/oci8_statement.c statement->stmt, stmt 337 ext/oci8/oci8_statement.c PHP_OCI_CALL_RETURN(errstatus, OCIStmtFetch, (statement->stmt, statement->err, nrows, OCI_FETCH_NEXT, OCI_DEFAULT)); stmt 434 ext/oci8/oci8_statement.c *bufpp = nested_stmt->stmt; stmt 512 ext/oci8/oci8_statement.c PHP_OCI_CALL_RETURN(errstatus, OCIAttrGet, ((dvoid *)statement->stmt, OCI_HTYPE_STMT, (ub2 *)&statement->stmttype, (ub4 *)0, OCI_ATTR_STMT_TYPE, statement->err)); stmt 540 ext/oci8/oci8_statement.c PHP_OCI_CALL_RETURN(errstatus, OCIStmtExecute, (statement->connection->svc, statement->stmt, statement->err, iters, 0, NULL, NULL, mode)); stmt 579 ext/oci8/oci8_statement.c PHP_OCI_CALL_RETURN(errstatus, OCIAttrGet, ((dvoid *)statement->stmt, OCI_HTYPE_STMT, (dvoid *)&colcount, (ub4 *)0, OCI_ATTR_PARAM_COUNT, statement->err)); stmt 599 ext/oci8/oci8_statement.c PHP_OCI_CALL_RETURN(errstatus, OCIParamGet, ((dvoid *)statement->stmt, OCI_HTYPE_STMT, statement->err, (dvoid**)¶m, counter)); stmt 776 ext/oci8/oci8_statement.c statement->stmt, /* IN/OUT handle to the requested SQL query */ stmt 794 ext/oci8/oci8_statement.c statement->stmt, /* IN/OUT handle to the requested SQL query */ stmt 860 ext/oci8/oci8_statement.c if (statement->stmt) { stmt 862 ext/oci8/oci8_statement.c PHP_OCI_CALL(OCIStmtRelease, (statement->stmt, statement->err, NULL, 0, statement->errcode ? OCI_STRLS_CACHE_DELETE : OCI_DEFAULT)); stmt 864 ext/oci8/oci8_statement.c PHP_OCI_CALL(OCIHandleFree, (statement->stmt, OCI_HTYPE_STMT)); stmt 866 ext/oci8/oci8_statement.c statement->stmt = NULL; stmt 1195 ext/oci8/oci8_statement.c oci_stmt = bind_statement->stmt; stmt 1260 ext/oci8/oci8_statement.c statement->stmt, /* statement handle */ stmt 1528 ext/oci8/oci8_statement.c PHP_OCI_CALL_RETURN(errstatus, OCIAttrGet, ((dvoid *)statement->stmt, OCI_HTYPE_STMT, (ub2 *)&statement_type, (ub4 *)0, OCI_ATTR_STMT_TYPE, statement->err)); stmt 1551 ext/oci8/oci8_statement.c PHP_OCI_CALL_RETURN(errstatus, OCIAttrGet, ((dvoid *)statement->stmt, OCI_HTYPE_STMT, (ub4 *)&statement_numrows, (ub4 *)0, OCI_ATTR_ROW_COUNT, statement->err)); stmt 1629 ext/oci8/oci8_statement.c statement->stmt, stmt 228 ext/oci8/php_oci8_int.h OCIStmt *stmt; /* statement handle */ stmt 437 ext/odbc/php_odbc.c if (res->stmt) { stmt 442 ext/odbc/php_odbc.c rc = SQLFreeStmt(res->stmt,SQL_DROP); stmt 893 ext/odbc/php_odbc.c rc = SQLError(henv, conn, stmt, state, &error, errormsg, sizeof(errormsg)-1, &errormsgsize); stmt 960 ext/odbc/php_odbc.c rc = PHP_ODBC_SQLCOLATTRIBUTE(result->stmt, (SQLUSMALLINT)(i+1), PHP_ODBC_SQL_DESC_NAME, stmt 962 ext/odbc/php_odbc.c rc = PHP_ODBC_SQLCOLATTRIBUTE(result->stmt, (SQLUSMALLINT)(i+1), SQL_COLUMN_TYPE, stmt 983 ext/odbc/php_odbc.c SQLBindCol(result->stmt, (SQLUSMALLINT)(i+1), SQL_C_CHAR, result->values[i].value, stmt 997 ext/odbc/php_odbc.c rc = PHP_ODBC_SQLCOLATTRIBUTE(result->stmt, (SQLUSMALLINT)(i+1), colfieldid, stmt 1008 ext/odbc/php_odbc.c if (SQL_SUCCESS == SQLGetDiagRec(SQL_HANDLE_STMT, result->stmt, 1, state, &err, errtxt, 128, NULL)) { stmt 1016 ext/odbc/php_odbc.c rc = SQLColAttributes(result->stmt, (SQLUSMALLINT)(i+1), SQL_COLUMN_DISPLAY_SIZE, stmt 1037 ext/odbc/php_odbc.c rc = SQLBindCol(result->stmt, (SQLUSMALLINT)(i+1), SQL_C_CHAR, result->values[i].value, stmt 1123 ext/odbc/php_odbc.c PHP_ODBC_SQLCOLATTRIBUTE(result->stmt, (SQLUSMALLINT)pv_num, (SQLUSMALLINT) (type?SQL_COLUMN_SCALE:SQL_COLUMN_PRECISION), NULL, 0, NULL, &len); stmt 1208 ext/odbc/php_odbc.c rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); stmt 1230 ext/odbc/php_odbc.c SQLSetStmtOption(result->stmt, SQL_CURSOR_TYPE, ODBCG(default_cursortype)); stmt 1237 ext/odbc/php_odbc.c rc = SQLPrepare(result->stmt, query, SQL_NTS); stmt 1242 ext/odbc/php_odbc.c odbc_sql_error(conn, result->stmt, "SQLPrepare"); stmt 1245 ext/odbc/php_odbc.c odbc_sql_error(conn, result->stmt, "SQLPrepare"); stmt 1249 ext/odbc/php_odbc.c SQLNumParams(result->stmt, &(result->numparams)); stmt 1250 ext/odbc/php_odbc.c SQLNumResultCols(result->stmt, &(result->numcols)); stmt 1266 ext/odbc/php_odbc.c rc = SQLDescribeParam(result->stmt, (SQLUSMALLINT)(i+1), &result->param_info[i].sqltype, &result->param_info[i].precision, stmt 1269 ext/odbc/php_odbc.c odbc_sql_error(result->conn_ptr, result->stmt, "SQLDescribeParameter"); stmt 1270 ext/odbc/php_odbc.c SQLFreeStmt(result->stmt, SQL_RESET_PARAMS); stmt 1333 ext/odbc/php_odbc.c SQLFreeStmt(result->stmt,SQL_RESET_PARAMS); stmt 1347 ext/odbc/php_odbc.c SQLFreeStmt(result->stmt, SQL_RESET_PARAMS); stmt 1379 ext/odbc/php_odbc.c SQLFreeStmt(result->stmt, SQL_RESET_PARAMS); stmt 1391 ext/odbc/php_odbc.c SQLFreeStmt(result->stmt, SQL_RESET_PARAMS); stmt 1406 ext/odbc/php_odbc.c rc = SQLBindParameter(result->stmt, (SQLUSMALLINT)i, SQL_PARAM_INPUT, stmt 1418 ext/odbc/php_odbc.c rc = SQLBindParameter(result->stmt, (SQLUSMALLINT)i, SQL_PARAM_INPUT, stmt 1424 ext/odbc/php_odbc.c odbc_sql_error(result->conn_ptr, result->stmt, "SQLBindParameter"); stmt 1425 ext/odbc/php_odbc.c SQLFreeStmt(result->stmt, SQL_RESET_PARAMS); stmt 1438 ext/odbc/php_odbc.c rc = SQLFreeStmt(result->stmt, SQL_CLOSE); stmt 1441 ext/odbc/php_odbc.c odbc_sql_error(result->conn_ptr, result->stmt, "SQLFreeStmt"); stmt 1444 ext/odbc/php_odbc.c rc = SQLExecute(result->stmt); stmt 1451 ext/odbc/php_odbc.c rc = SQLParamData(result->stmt, (void*)&fp); stmt 1454 ext/odbc/php_odbc.c SQLPutData(result->stmt, (void*)&buf, nbytes); stmt 1464 ext/odbc/php_odbc.c odbc_sql_error(result->conn_ptr, result->stmt, "SQLExecute"); stmt 1467 ext/odbc/php_odbc.c odbc_sql_error(result->conn_ptr, result->stmt, "SQLExecute"); stmt 1473 ext/odbc/php_odbc.c SQLFreeStmt(result->stmt, SQL_RESET_PARAMS); stmt 1487 ext/odbc/php_odbc.c SQLNumResultCols(result->stmt, &(result->numcols)); stmt 1527 ext/odbc/php_odbc.c rc = SQLGetCursorName(result->stmt,cursorname,(SQLSMALLINT)max_len,&len); stmt 1535 ext/odbc/php_odbc.c result->stmt, state, &error, errormsg, stmt 1538 ext/odbc/php_odbc.c snprintf(cursorname, max_len+1, "php_curs_" ZEND_ULONG_FMT, (zend_ulong)result->stmt); stmt 1539 ext/odbc/php_odbc.c if (SQLSetCursorName(result->stmt,cursorname,SQL_NTS) != SQL_SUCCESS) { stmt 1540 ext/odbc/php_odbc.c odbc_sql_error(result->conn_ptr, result->stmt, "SQLSetCursorName"); stmt 1645 ext/odbc/php_odbc.c rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); stmt 1667 ext/odbc/php_odbc.c SQLSetStmtOption(result->stmt, SQL_CURSOR_TYPE, ODBCG(default_cursortype)); stmt 1674 ext/odbc/php_odbc.c rc = SQLExecDirect(result->stmt, query, SQL_NTS); stmt 1679 ext/odbc/php_odbc.c odbc_sql_error(conn, result->stmt, "SQLExecDirect"); stmt 1680 ext/odbc/php_odbc.c SQLFreeStmt(result->stmt, SQL_DROP); stmt 1685 ext/odbc/php_odbc.c SQLNumResultCols(result->stmt, &(result->numcols)); stmt 1747 ext/odbc/php_odbc.c rc = SQLExtendedFetch(result->stmt,SQL_FETCH_ABSOLUTE,rownum,&crow,RowStatus); stmt 1749 ext/odbc/php_odbc.c rc = SQLExtendedFetch(result->stmt,SQL_FETCH_NEXT,1,&crow,RowStatus); stmt 1753 ext/odbc/php_odbc.c rc = SQLFetch(result->stmt); stmt 1794 ext/odbc/php_odbc.c rc = SQLGetData(result->stmt, (SQLUSMALLINT)(i + 1), sql_c_type, buf, result->longreadlen + 1, &result->values[i].vallen); stmt 1797 ext/odbc/php_odbc.c odbc_sql_error(result->conn_ptr, result->stmt, "SQLGetData"); stmt 1903 ext/odbc/php_odbc.c rc = SQLExtendedFetch(result->stmt,SQL_FETCH_ABSOLUTE,rownum,&crow,RowStatus); stmt 1905 ext/odbc/php_odbc.c rc = SQLExtendedFetch(result->stmt,SQL_FETCH_NEXT,1,&crow,RowStatus); stmt 1909 ext/odbc/php_odbc.c rc = SQLFetch(result->stmt); stmt 1947 ext/odbc/php_odbc.c rc = SQLGetData(result->stmt, (SQLUSMALLINT)(i + 1),sql_c_type, buf, result->longreadlen + 1, &result->values[i].vallen); stmt 1950 ext/odbc/php_odbc.c odbc_sql_error(result->conn_ptr, result->stmt, "SQLGetData"); stmt 1999 ext/odbc/php_odbc.c rc = SQLFetchPrev(result->stmt); stmt 2046 ext/odbc/php_odbc.c rc = SQLExtendedFetch(result->stmt,SQL_FETCH_ABSOLUTE,rownum,&crow,RowStatus); stmt 2048 ext/odbc/php_odbc.c rc = SQLExtendedFetch(result->stmt,SQL_FETCH_NEXT,1,&crow,RowStatus); stmt 2052 ext/odbc/php_odbc.c rc = SQLFetch(result->stmt); stmt 2139 ext/odbc/php_odbc.c rc = SQLExtendedFetch(result->stmt, SQL_FETCH_NEXT, 1, &crow,RowStatus); stmt 2142 ext/odbc/php_odbc.c rc = SQLFetch(result->stmt); stmt 2172 ext/odbc/php_odbc.c PHP_ODBC_SQLCOLATTRIBUTE(result->stmt, (SQLUSMALLINT)(field_ind + 1), stmt 2184 ext/odbc/php_odbc.c rc = SQLGetData(result->stmt, (SQLUSMALLINT)(field_ind + 1), sql_c_type, stmt 2188 ext/odbc/php_odbc.c odbc_sql_error(result->conn_ptr, result->stmt, "SQLGetData"); stmt 2235 ext/odbc/php_odbc.c rc = SQLGetData(result->stmt, (SQLUSMALLINT)(field_ind + 1),sql_c_type, field, fieldsize, &result->values[field_ind].vallen); stmt 2238 ext/odbc/php_odbc.c odbc_sql_error(result->conn_ptr, result->stmt, "SQLGetData"); stmt 2289 ext/odbc/php_odbc.c rc = SQLExtendedFetch(result->stmt,SQL_FETCH_NEXT,1,&crow,RowStatus); stmt 2292 ext/odbc/php_odbc.c rc = SQLFetch(result->stmt); stmt 2340 ext/odbc/php_odbc.c rc = SQLGetData(result->stmt, (SQLUSMALLINT)(i + 1),sql_c_type, buf, result->longreadlen, &result->values[i].vallen); stmt 2345 ext/odbc/php_odbc.c odbc_sql_error(result->conn_ptr, result->stmt, "SQLGetData"); stmt 2373 ext/odbc/php_odbc.c rc = SQLExtendedFetch(result->stmt,SQL_FETCH_NEXT,1,&crow,RowStatus); stmt 2376 ext/odbc/php_odbc.c rc = SQLFetch(result->stmt); stmt 2782 ext/odbc/php_odbc.c SQLRowCount(result->stmt, &rows); stmt 2815 ext/odbc/php_odbc.c rc = SQLMoreResults(result->stmt); stmt 2817 ext/odbc/php_odbc.c rc = SQLFreeStmt(result->stmt, SQL_UNBIND); stmt 2818 ext/odbc/php_odbc.c SQLNumParams(result->stmt, &(result->numparams)); stmt 2819 ext/odbc/php_odbc.c SQLNumResultCols(result->stmt, &(result->numcols)); stmt 2833 ext/odbc/php_odbc.c odbc_sql_error(result->conn_ptr, result->stmt, "SQLMoreResults"); stmt 2927 ext/odbc/php_odbc.c PHP_ODBC_SQLCOLATTRIBUTE(result->stmt, (SQLUSMALLINT)pv_num, SQL_COLUMN_TYPE_NAME, tmp, 31, &tmplen, NULL); stmt 3135 ext/odbc/php_odbc.c rc = SQLSetStmtOption(result->stmt, (unsigned short) pv_opt, pv_val); stmt 3138 ext/odbc/php_odbc.c odbc_sql_error(result->conn_ptr, result->stmt, "SetStmtOption"); stmt 3178 ext/odbc/php_odbc.c rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); stmt 3196 ext/odbc/php_odbc.c rc = SQLTables(result->stmt, stmt 3209 ext/odbc/php_odbc.c SQLNumResultCols(result->stmt, &(result->numcols)); stmt 3247 ext/odbc/php_odbc.c rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); stmt 3267 ext/odbc/php_odbc.c rc = SQLColumns(result->stmt, stmt 3280 ext/odbc/php_odbc.c SQLNumResultCols(result->stmt, &(result->numcols)); stmt 3319 ext/odbc/php_odbc.c rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); stmt 3332 ext/odbc/php_odbc.c rc = SQLColumnPrivileges(result->stmt, stmt 3345 ext/odbc/php_odbc.c SQLNumResultCols(result->stmt, &(result->numcols)); stmt 3397 ext/odbc/php_odbc.c rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); stmt 3410 ext/odbc/php_odbc.c rc = SQLForeignKeys(result->stmt, stmt 3425 ext/odbc/php_odbc.c SQLNumResultCols(result->stmt, &(result->numcols)); stmt 3465 ext/odbc/php_odbc.c rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); stmt 3478 ext/odbc/php_odbc.c rc = SQLGetTypeInfo(result->stmt, data_type ); stmt 3487 ext/odbc/php_odbc.c SQLNumResultCols(result->stmt, &(result->numcols)); stmt 3524 ext/odbc/php_odbc.c rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); stmt 3537 ext/odbc/php_odbc.c rc = SQLPrimaryKeys(result->stmt, stmt 3549 ext/odbc/php_odbc.c SQLNumResultCols(result->stmt, &(result->numcols)); stmt 3592 ext/odbc/php_odbc.c rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); stmt 3605 ext/odbc/php_odbc.c rc = SQLProcedureColumns(result->stmt, stmt 3618 ext/odbc/php_odbc.c SQLNumResultCols(result->stmt, &(result->numcols)); stmt 3661 ext/odbc/php_odbc.c rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); stmt 3674 ext/odbc/php_odbc.c rc = SQLProcedures(result->stmt, stmt 3686 ext/odbc/php_odbc.c SQLNumResultCols(result->stmt, &(result->numcols)); stmt 3731 ext/odbc/php_odbc.c rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); stmt 3744 ext/odbc/php_odbc.c rc = SQLSpecialColumns(result->stmt, stmt 3759 ext/odbc/php_odbc.c SQLNumResultCols(result->stmt, &(result->numcols)); stmt 3802 ext/odbc/php_odbc.c rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); stmt 3815 ext/odbc/php_odbc.c rc = SQLStatistics(result->stmt, stmt 3829 ext/odbc/php_odbc.c SQLNumResultCols(result->stmt, &(result->numcols)); stmt 3867 ext/odbc/php_odbc.c rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); stmt 3880 ext/odbc/php_odbc.c rc = SQLTablePrivileges(result->stmt, stmt 3892 ext/odbc/php_odbc.c SQLNumResultCols(result->stmt, &(result->numcols)); stmt 244 ext/odbc/php_odbc_includes.h ODBC_SQL_STMT_T stmt; stmt 286 ext/odbc/php_odbc_includes.h #define ODBC_SQL_ERROR_PARAMS odbc_connection *conn_resource, ODBC_SQL_STMT_T stmt, char *func stmt 41 ext/pdo/pdo_dbh.c void pdo_raise_impl_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *sqlstate, const char *supp) /* {{{ */ stmt 56 ext/pdo/pdo_dbh.c if (stmt) { stmt 57 ext/pdo/pdo_dbh.c pdo_err = &stmt->error_code; stmt 101 ext/pdo/pdo_dbh.c PDO_API void pdo_handle_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt) /* {{{ */ stmt 114 ext/pdo/pdo_dbh.c if (stmt) { stmt 115 ext/pdo/pdo_dbh.c pdo_err = &stmt->error_code; stmt 130 ext/pdo/pdo_dbh.c if (dbh->methods->fetch_err(dbh, stmt, &info)) { stmt 422 ext/pdo/pdo_dbh.c static void pdo_stmt_construct(zend_execute_data *execute_data, pdo_stmt_t *stmt, zval *object, zend_class_entry *dbstmt_ce, zval *ctor_args) /* {{{ */ stmt 427 ext/pdo/pdo_dbh.c ZVAL_STRINGL(&query_string, stmt->query_string, stmt->query_stringlen); stmt 469 ext/pdo/pdo_dbh.c pdo_stmt_t *stmt; stmt 537 ext/pdo/pdo_dbh.c stmt = Z_PDO_STMT_P(return_value); stmt 540 ext/pdo/pdo_dbh.c stmt->query_string = estrndup(statement, statement_len); stmt 541 ext/pdo/pdo_dbh.c stmt->query_stringlen = statement_len; stmt 542 ext/pdo/pdo_dbh.c stmt->default_fetch_type = dbh->default_fetch_type; stmt 543 ext/pdo/pdo_dbh.c stmt->dbh = dbh; stmt 545 ext/pdo/pdo_dbh.c ZVAL_OBJ(&stmt->database_object_handle, &dbh_obj->std); stmt 546 ext/pdo/pdo_dbh.c Z_ADDREF(stmt->database_object_handle); stmt 548 ext/pdo/pdo_dbh.c ZVAL_UNDEF(&stmt->lazy_object_ref); stmt 550 ext/pdo/pdo_dbh.c if (dbh->methods->preparer(dbh, statement, statement_len, stmt, options)) { stmt 551 ext/pdo/pdo_dbh.c pdo_stmt_construct(execute_data, stmt, return_value, dbstmt_ce, &ctor_args); stmt 1051 ext/pdo/pdo_dbh.c pdo_stmt_t *stmt; stmt 1077 ext/pdo/pdo_dbh.c stmt = Z_PDO_STMT_P(return_value); stmt 1080 ext/pdo/pdo_dbh.c stmt->query_string = estrndup(statement, statement_len); stmt 1081 ext/pdo/pdo_dbh.c stmt->query_stringlen = statement_len; stmt 1083 ext/pdo/pdo_dbh.c stmt->default_fetch_type = dbh->default_fetch_type; stmt 1084 ext/pdo/pdo_dbh.c stmt->active_query_string = stmt->query_string; stmt 1085 ext/pdo/pdo_dbh.c stmt->active_query_stringlen = statement_len; stmt 1086 ext/pdo/pdo_dbh.c stmt->dbh = dbh; stmt 1088 ext/pdo/pdo_dbh.c ZVAL_OBJ(&stmt->database_object_handle, &dbh_obj->std); stmt 1089 ext/pdo/pdo_dbh.c Z_ADDREF(stmt->database_object_handle); stmt 1091 ext/pdo/pdo_dbh.c ZVAL_UNDEF(&stmt->lazy_object_ref); stmt 1093 ext/pdo/pdo_dbh.c if (dbh->methods->preparer(dbh, statement, statement_len, stmt, NULL)) { stmt 1095 ext/pdo/pdo_dbh.c if (ZEND_NUM_ARGS() == 1 || SUCCESS == pdo_stmt_setup_fetch_mode(INTERNAL_FUNCTION_PARAM_PASSTHRU, stmt, 1)) { stmt 1099 ext/pdo/pdo_dbh.c if (stmt->methods->executer(stmt)) { stmt 1101 ext/pdo/pdo_dbh.c if (!stmt->executed) { stmt 1102 ext/pdo/pdo_dbh.c if (stmt->dbh->alloc_own_columns) { stmt 1103 ext/pdo/pdo_dbh.c ret = pdo_stmt_describe_columns(stmt); stmt 1105 ext/pdo/pdo_dbh.c stmt->executed = 1; stmt 1108 ext/pdo/pdo_dbh.c pdo_stmt_construct(execute_data, stmt, return_value, dbh->def_stmt_ce, &dbh->def_stmt_ctor_args); stmt 1114 ext/pdo/pdo_dbh.c dbh->query_stmt = stmt; stmt 1116 ext/pdo/pdo_dbh.c Z_DELREF(stmt->database_object_handle); stmt 1117 ext/pdo/pdo_dbh.c ZVAL_UNDEF(&stmt->database_object_handle); stmt 421 ext/pdo/pdo_sql_parser.c PDO_API int pdo_parse_params(pdo_stmt_t *stmt, char *inquery, size_t inquery_len, stmt 476 ext/pdo/pdo_sql_parser.c pdo_raise_impl_error(stmt->dbh, stmt, "HY093", "mixed named and positional parameters"); stmt 481 ext/pdo/pdo_sql_parser.c if (stmt->supports_placeholders == query_type && !stmt->named_rewrite_template) { stmt 487 ext/pdo/pdo_sql_parser.c if (stmt->named_rewrite_template) { stmt 496 ext/pdo/pdo_sql_parser.c params = stmt->bound_params; stmt 499 ext/pdo/pdo_sql_parser.c if (bindno && !params && stmt->supports_placeholders == PDO_PLACEHOLDER_NONE) { stmt 500 ext/pdo/pdo_sql_parser.c pdo_raise_impl_error(stmt->dbh, stmt, "HY093", "no parameters were bound"); stmt 505 ext/pdo/pdo_sql_parser.c if (params && bindno != zend_hash_num_elements(params) && stmt->supports_placeholders == PDO_PLACEHOLDER_NONE) { stmt 519 ext/pdo/pdo_sql_parser.c pdo_raise_impl_error(stmt->dbh, stmt, "HY093", "number of bound variables does not match number of tokens"); stmt 525 ext/pdo/pdo_sql_parser.c if (stmt->supports_placeholders == PDO_PLACEHOLDER_NONE) { stmt 540 ext/pdo/pdo_sql_parser.c pdo_raise_impl_error(stmt->dbh, stmt, "HY093", "parameter was not defined"); stmt 543 ext/pdo/pdo_sql_parser.c if (stmt->dbh->methods->quoter) { stmt 561 ext/pdo/pdo_sql_parser.c if (!stmt->dbh->methods->quoter(stmt->dbh, ZSTR_VAL(buf), ZSTR_LEN(buf), &plc->quoted, &plc->qlen, stmt 565 ext/pdo/pdo_sql_parser.c strncpy(stmt->error_code, stmt->dbh->error_code, 6); stmt 575 ext/pdo/pdo_sql_parser.c pdo_raise_impl_error(stmt->dbh, stmt, "HY105", "Expected a stream resource"); stmt 604 ext/pdo/pdo_sql_parser.c if (!stmt->dbh->methods->quoter(stmt->dbh, Z_STRVAL(tmp_param), stmt 609 ext/pdo/pdo_sql_parser.c strncpy(stmt->error_code, stmt->dbh->error_code, 6); stmt 665 ext/pdo/pdo_sql_parser.c const char *tmpl = stmt->named_rewrite_template ? stmt->named_rewrite_template : ":pdo%d"; stmt 670 ext/pdo/pdo_sql_parser.c if (stmt->bound_param_map == NULL) { stmt 671 ext/pdo/pdo_sql_parser.c ALLOC_HASHTABLE(stmt->bound_param_map); stmt 672 ext/pdo/pdo_sql_parser.c zend_hash_init(stmt->bound_param_map, 13, NULL, free_param_name, 0); stmt 681 ext/pdo/pdo_sql_parser.c if (!strcmp(name, "?") || (p = zend_hash_str_find_ptr(stmt->bound_param_map, name, plc->len)) == NULL) { stmt 693 ext/pdo/pdo_sql_parser.c if (!skip_map && stmt->named_rewrite_template) { stmt 695 ext/pdo/pdo_sql_parser.c zend_hash_str_update_mem(stmt->bound_param_map, name, plc->len, idxbuf, plc->qlen + 1); stmt 699 ext/pdo/pdo_sql_parser.c zend_hash_index_update_mem(stmt->bound_param_map, plc->bindno, idxbuf, plc->qlen + 1); stmt 711 ext/pdo/pdo_sql_parser.c if (stmt->bound_param_map == NULL) { stmt 712 ext/pdo/pdo_sql_parser.c ALLOC_HASHTABLE(stmt->bound_param_map); stmt 713 ext/pdo/pdo_sql_parser.c zend_hash_init(stmt->bound_param_map, 13, NULL, free_param_name, 0); stmt 719 ext/pdo/pdo_sql_parser.c zend_hash_index_update_mem(stmt->bound_param_map, plc->bindno, name, plc->len + 1); stmt 745 ext/pdo/pdo_sql_parser.c int old_pdo_parse_params(pdo_stmt_t *stmt, char *inquery, int inquery_len, char **outquery, stmt 754 ext/pdo/pdo_sql_parser.c HashTable *params = stmt->bound_params; stmt 760 ext/pdo/pdo_sql_parser.c if(stmt->dbh->max_escaped_char_length) { stmt 761 ext/pdo/pdo_sql_parser.c padding = stmt->dbh->max_escaped_char_length; stmt 807 ext/pdo/pdo_sql_parser.c if(stmt->dbh->methods->quoter(stmt->dbh, Z_STRVAL_P(param->parameter), stmt 843 ext/pdo/pdo_sql_parser.c if(stmt->dbh->methods->quoter(stmt->dbh, Z_STRVAL_P(param->parameter), stmt 111 ext/pdo/pdo_stmt.c pdo_stmt_t *stmt = Z_PDO_STMT_P(getThis()); \ stmt 112 ext/pdo/pdo_stmt.c if (!stmt->dbh) { \ stmt 122 ext/pdo/pdo_stmt.c static inline int rewrite_name_to_position(pdo_stmt_t *stmt, struct pdo_bound_param_data *param) /* {{{ */ stmt 124 ext/pdo/pdo_stmt.c if (stmt->bound_param_map) { stmt 134 ext/pdo/pdo_stmt.c if (stmt->named_rewrite_template) { stmt 140 ext/pdo/pdo_stmt.c if ((name = zend_hash_index_find_ptr(stmt->bound_param_map, param->paramno)) != NULL) { stmt 144 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY093", "parameter was not defined"); stmt 148 ext/pdo/pdo_stmt.c ZEND_HASH_FOREACH_PTR(stmt->bound_param_map, name) { stmt 154 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "IM001", "PDO refuses to handle repeating the same :named parameter for multiple positions with this driver, as it might be unsafe to do so. Consider using a separate name for each parameter instead"); stmt 160 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY093", "parameter was not defined"); stmt 168 ext/pdo/pdo_stmt.c static int dispatch_param_event(pdo_stmt_t *stmt, enum pdo_param_event event_type) /* {{{ */ stmt 174 ext/pdo/pdo_stmt.c if (!stmt->methods->param_hook) { stmt 178 ext/pdo/pdo_stmt.c ht = stmt->bound_params; stmt 183 ext/pdo/pdo_stmt.c if (!stmt->methods->param_hook(stmt, param, event_type)) { stmt 190 ext/pdo/pdo_stmt.c ht = stmt->bound_columns; stmt 199 ext/pdo/pdo_stmt.c int pdo_stmt_describe_columns(pdo_stmt_t *stmt) /* {{{ */ stmt 203 ext/pdo/pdo_stmt.c stmt->columns = ecalloc(stmt->column_count, sizeof(struct pdo_column_data)); stmt 205 ext/pdo/pdo_stmt.c for (col = 0; col < stmt->column_count; col++) { stmt 206 ext/pdo/pdo_stmt.c if (!stmt->methods->describer(stmt, col)) { stmt 211 ext/pdo/pdo_stmt.c if (stmt->dbh->native_case != stmt->dbh->desired_case && stmt->dbh->desired_case != PDO_CASE_NATURAL) { stmt 212 ext/pdo/pdo_stmt.c char *s = ZSTR_VAL(stmt->columns[col].name); stmt 214 ext/pdo/pdo_stmt.c switch (stmt->dbh->desired_case) { stmt 234 ext/pdo/pdo_stmt.c if (stmt->bound_params) { stmt 237 ext/pdo/pdo_stmt.c if (SUCCESS == zend_hash_find(stmt->bound_params, stmt->columns[col].name, stmt 238 ext/pdo/pdo_stmt.c stmt->columns[col].namelen, (void**)¶m)) { stmt 243 ext/pdo/pdo_stmt.c if (stmt->bound_columns) { stmt 246 ext/pdo/pdo_stmt.c if ((param = zend_hash_find_ptr(stmt->bound_columns, stmt 247 ext/pdo/pdo_stmt.c stmt->columns[col].name)) != NULL) { stmt 257 ext/pdo/pdo_stmt.c static void get_lazy_object(pdo_stmt_t *stmt, zval *return_value) /* {{{ */ stmt 259 ext/pdo/pdo_stmt.c if (Z_ISUNDEF(stmt->lazy_object_ref)) { stmt 261 ext/pdo/pdo_stmt.c row->stmt = stmt; stmt 263 ext/pdo/pdo_stmt.c ZVAL_OBJ(&stmt->lazy_object_ref, &row->std); stmt 265 ext/pdo/pdo_stmt.c GC_REFCOUNT(&stmt->std)++; stmt 268 ext/pdo/pdo_stmt.c ZVAL_COPY(return_value, &stmt->lazy_object_ref); stmt 277 ext/pdo/pdo_stmt.c if (param->stmt->methods->param_hook) { stmt 278 ext/pdo/pdo_stmt.c param->stmt->methods->param_hook(param->stmt, param, PDO_PARAM_EVT_FREE); stmt 296 ext/pdo/pdo_stmt.c static int really_register_bound_param(struct pdo_bound_param_data *param, pdo_stmt_t *stmt, int is_param) /* {{{ */ stmt 302 ext/pdo/pdo_stmt.c hash = is_param ? stmt->bound_params : stmt->bound_columns; stmt 309 ext/pdo/pdo_stmt.c stmt->bound_params = hash; stmt 311 ext/pdo/pdo_stmt.c stmt->bound_columns = hash; stmt 336 ext/pdo/pdo_stmt.c param->stmt = stmt; stmt 343 ext/pdo/pdo_stmt.c if (!is_param && param->name && stmt->columns) { stmt 347 ext/pdo/pdo_stmt.c for (i = 0; i < stmt->column_count; i++) { stmt 348 ext/pdo/pdo_stmt.c if (ZSTR_LEN(stmt->columns[i].name) == ZSTR_LEN(param->name) && stmt 349 ext/pdo/pdo_stmt.c strncmp(ZSTR_VAL(stmt->columns[i].name), ZSTR_VAL(param->name), ZSTR_LEN(param->name) + 1) == 0) { stmt 360 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", tmp); stmt 376 ext/pdo/pdo_stmt.c if (is_param && !rewrite_name_to_position(stmt, param)) { stmt 388 ext/pdo/pdo_stmt.c if (stmt->methods->param_hook) { stmt 389 ext/pdo/pdo_stmt.c if (!stmt->methods->param_hook(stmt, param, PDO_PARAM_EVT_NORMALIZE stmt 414 ext/pdo/pdo_stmt.c if (stmt->methods->param_hook) { stmt 415 ext/pdo/pdo_stmt.c if (!stmt->methods->param_hook(stmt, pparam, PDO_PARAM_EVT_ALLOC stmt 453 ext/pdo/pdo_stmt.c if (stmt->bound_params) { stmt 454 ext/pdo/pdo_stmt.c zend_hash_destroy(stmt->bound_params); stmt 455 ext/pdo/pdo_stmt.c FREE_HASHTABLE(stmt->bound_params); stmt 456 ext/pdo/pdo_stmt.c stmt->bound_params = NULL; stmt 480 ext/pdo/pdo_stmt.c if (!really_register_bound_param(¶m, stmt, 1)) { stmt 489 ext/pdo/pdo_stmt.c if (PDO_PLACEHOLDER_NONE == stmt->supports_placeholders) { stmt 495 ext/pdo/pdo_stmt.c ret = pdo_parse_params(stmt, stmt->query_string, stmt->query_stringlen, stmt 496 ext/pdo/pdo_stmt.c &stmt->active_query_string, &stmt->active_query_stringlen); stmt 500 ext/pdo/pdo_stmt.c stmt->active_query_string = stmt->query_string; stmt 501 ext/pdo/pdo_stmt.c stmt->active_query_stringlen = stmt->query_stringlen; stmt 508 ext/pdo/pdo_stmt.c } else if (!dispatch_param_event(stmt, PDO_PARAM_EVT_EXEC_PRE)) { stmt 512 ext/pdo/pdo_stmt.c if (stmt->methods->executer(stmt)) { stmt 513 ext/pdo/pdo_stmt.c if (stmt->active_query_string && stmt->active_query_string != stmt->query_string) { stmt 514 ext/pdo/pdo_stmt.c efree(stmt->active_query_string); stmt 516 ext/pdo/pdo_stmt.c stmt->active_query_string = NULL; stmt 517 ext/pdo/pdo_stmt.c if (!stmt->executed) { stmt 520 ext/pdo/pdo_stmt.c if (stmt->dbh->alloc_own_columns && !stmt->columns) { stmt 523 ext/pdo/pdo_stmt.c ret = pdo_stmt_describe_columns(stmt); stmt 526 ext/pdo/pdo_stmt.c stmt->executed = 1; stmt 529 ext/pdo/pdo_stmt.c if (ret && !dispatch_param_event(stmt, PDO_PARAM_EVT_EXEC_POST)) { stmt 535 ext/pdo/pdo_stmt.c if (stmt->active_query_string && stmt->active_query_string != stmt->query_string) { stmt 536 ext/pdo/pdo_stmt.c efree(stmt->active_query_string); stmt 538 ext/pdo/pdo_stmt.c stmt->active_query_string = NULL; stmt 544 ext/pdo/pdo_stmt.c static inline void fetch_value(pdo_stmt_t *stmt, zval *dest, int colno, int *type_override) /* {{{ */ stmt 552 ext/pdo/pdo_stmt.c col = &stmt->columns[colno]; stmt 559 ext/pdo/pdo_stmt.c stmt->methods->get_col(stmt, colno, &value, &value_len, &caller_frees); stmt 595 ext/pdo/pdo_stmt.c if (stmt->dbh->stringify || new_type == PDO_PARAM_STR) { stmt 607 ext/pdo/pdo_stmt.c } else if (!stmt->dbh->stringify && new_type != PDO_PARAM_STR) { stmt 632 ext/pdo/pdo_stmt.c if (value && !(value_len == 0 && stmt->dbh->oracle_nulls == PDO_NULL_EMPTY_STRING)) { stmt 663 ext/pdo/pdo_stmt.c if (stmt->dbh->stringify) { stmt 672 ext/pdo/pdo_stmt.c if (Z_TYPE_P(dest) == IS_NULL && stmt->dbh->oracle_nulls == PDO_NULL_TO_STRING) { stmt 678 ext/pdo/pdo_stmt.c static int do_fetch_common(pdo_stmt_t *stmt, enum pdo_fetch_orientation ori, zend_long offset, int do_bind) /* {{{ */ stmt 680 ext/pdo/pdo_stmt.c if (!stmt->executed) { stmt 684 ext/pdo/pdo_stmt.c if (!dispatch_param_event(stmt, PDO_PARAM_EVT_FETCH_PRE)) { stmt 688 ext/pdo/pdo_stmt.c if (!stmt->methods->fetcher(stmt, ori, offset)) { stmt 693 ext/pdo/pdo_stmt.c if (!stmt->columns && !pdo_stmt_describe_columns(stmt)) { stmt 697 ext/pdo/pdo_stmt.c if (!dispatch_param_event(stmt, PDO_PARAM_EVT_FETCH_POST)) { stmt 701 ext/pdo/pdo_stmt.c if (do_bind && stmt->bound_columns) { stmt 705 ext/pdo/pdo_stmt.c ZEND_HASH_FOREACH_PTR(stmt->bound_columns, param) { stmt 715 ext/pdo/pdo_stmt.c fetch_value(stmt, Z_REFVAL(param->parameter), param->paramno, (int *)¶m->param_type); stmt 729 ext/pdo/pdo_stmt.c static int do_fetch_class_prepare(pdo_stmt_t *stmt) /* {{{ */ stmt 731 ext/pdo/pdo_stmt.c zend_class_entry *ce = stmt->fetch.cls.ce; stmt 732 ext/pdo/pdo_stmt.c zend_fcall_info *fci = &stmt->fetch.cls.fci; stmt 733 ext/pdo/pdo_stmt.c zend_fcall_info_cache *fcc = &stmt->fetch.cls.fcc; stmt 738 ext/pdo/pdo_stmt.c stmt->fetch.cls.ce = ZEND_STANDARD_CLASS_DEF_PTR; stmt 746 ext/pdo/pdo_stmt.c fci->retval = &stmt->fetch.cls.retval; stmt 751 ext/pdo/pdo_stmt.c zend_fcall_info_args_ex(fci, ce->constructor, &stmt->fetch.cls.ctor_args); stmt 758 ext/pdo/pdo_stmt.c } else if (!Z_ISUNDEF(stmt->fetch.cls.ctor_args)) { stmt 759 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "user-supplied class does not have a constructor, use NULL for the ctor_params parameter, or simply omit it"); stmt 767 ext/pdo/pdo_stmt.c static int make_callable_ex(pdo_stmt_t *stmt, zval *callable, zend_fcall_info * fci, zend_fcall_info_cache * fcc, int num_args) /* {{{ */ stmt 773 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", is_callable_error); stmt 776 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "user-supplied function must be a valid callback"); stmt 792 ext/pdo/pdo_stmt.c static int do_fetch_func_prepare(pdo_stmt_t *stmt) /* {{{ */ stmt 794 ext/pdo/pdo_stmt.c zend_fcall_info *fci = &stmt->fetch.cls.fci; stmt 795 ext/pdo/pdo_stmt.c zend_fcall_info_cache *fcc = &stmt->fetch.cls.fcc; stmt 797 ext/pdo/pdo_stmt.c if (!make_callable_ex(stmt, &stmt->fetch.func.function, fci, fcc, stmt->column_count)) { stmt 800 ext/pdo/pdo_stmt.c stmt->fetch.func.values = safe_emalloc(sizeof(zval), stmt->column_count, 0); stmt 806 ext/pdo/pdo_stmt.c static void do_fetch_opt_finish(pdo_stmt_t *stmt, int free_ctor_agrs) /* {{{ */ stmt 809 ext/pdo/pdo_stmt.c if (stmt->fetch.cls.fci.size && stmt->fetch.cls.fci.params) { stmt 810 ext/pdo/pdo_stmt.c if (!Z_ISUNDEF(stmt->fetch.cls.ctor_args)) { stmt 812 ext/pdo/pdo_stmt.c zend_fcall_info_args_clear(&stmt->fetch.cls.fci, 1); stmt 814 ext/pdo/pdo_stmt.c efree(stmt->fetch.cls.fci.params); stmt 816 ext/pdo/pdo_stmt.c stmt->fetch.cls.fci.params = NULL; stmt 819 ext/pdo/pdo_stmt.c stmt->fetch.cls.fci.size = 0; stmt 820 ext/pdo/pdo_stmt.c if (!Z_ISUNDEF(stmt->fetch.cls.ctor_args) && free_ctor_agrs) { stmt 821 ext/pdo/pdo_stmt.c zval_ptr_dtor(&stmt->fetch.cls.ctor_args); stmt 822 ext/pdo/pdo_stmt.c ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); stmt 823 ext/pdo/pdo_stmt.c stmt->fetch.cls.fci.param_count = 0; stmt 825 ext/pdo/pdo_stmt.c if (stmt->fetch.func.values) { stmt 826 ext/pdo/pdo_stmt.c efree(stmt->fetch.func.values); stmt 827 ext/pdo/pdo_stmt.c stmt->fetch.func.values = NULL; stmt 834 ext/pdo/pdo_stmt.c static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value, enum pdo_fetch_type how, enum pdo_fetch_orientation ori, zend_long offset, zval *return_all) /* {{{ */ stmt 842 ext/pdo/pdo_stmt.c how = stmt->default_fetch_type; stmt 847 ext/pdo/pdo_stmt.c if (!do_fetch_common(stmt, ori, offset, do_bind)) { stmt 856 ext/pdo/pdo_stmt.c if (flags & PDO_FETCH_GROUP && stmt->fetch.column == -1) { stmt 859 ext/pdo/pdo_stmt.c colno = stmt->fetch.column; stmt 866 ext/pdo/pdo_stmt.c get_lazy_object(stmt, return_value); stmt 880 ext/pdo/pdo_stmt.c zend_hash_init(Z_ARRVAL_P(return_value), stmt->column_count, NULL, ZVAL_PTR_DTOR, 0);; stmt 887 ext/pdo/pdo_stmt.c if (stmt->column_count != 2) { stmt 888 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "PDO::FETCH_KEY_PAIR fetch mode requires the result set to contain extactly 2 columns."); stmt 897 ext/pdo/pdo_stmt.c if (colno >= 0 && colno < stmt->column_count) { stmt 898 ext/pdo/pdo_stmt.c if (flags == PDO_FETCH_GROUP && stmt->fetch.column == -1) { stmt 899 ext/pdo/pdo_stmt.c fetch_value(stmt, return_value, 1, NULL); stmt 901 ext/pdo/pdo_stmt.c fetch_value(stmt, return_value, 0, NULL); stmt 903 ext/pdo/pdo_stmt.c fetch_value(stmt, return_value, colno, NULL); stmt 911 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "Invalid column index"); stmt 924 ext/pdo/pdo_stmt.c old_ce = stmt->fetch.cls.ce; stmt 925 ext/pdo/pdo_stmt.c ZVAL_COPY_VALUE(&old_ctor_args, &stmt->fetch.cls.ctor_args); stmt 926 ext/pdo/pdo_stmt.c old_arg_count = stmt->fetch.cls.fci.param_count; stmt 927 ext/pdo/pdo_stmt.c do_fetch_opt_finish(stmt, 0); stmt 929 ext/pdo/pdo_stmt.c fetch_value(stmt, &val, i++, NULL); stmt 933 ext/pdo/pdo_stmt.c stmt->fetch.cls.ce = ZEND_STANDARD_CLASS_DEF_PTR; stmt 935 ext/pdo/pdo_stmt.c stmt->fetch.cls.ce = cep; stmt 939 ext/pdo/pdo_stmt.c do_fetch_class_prepare(stmt); stmt 942 ext/pdo/pdo_stmt.c ce = stmt->fetch.cls.ce; stmt 944 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "No fetch class specified"); stmt 951 ext/pdo/pdo_stmt.c if (!stmt->fetch.cls.fci.size) { stmt 952 ext/pdo/pdo_stmt.c if (!do_fetch_class_prepare(stmt)) stmt 958 ext/pdo/pdo_stmt.c stmt->fetch.cls.fci.object = Z_OBJ_P(return_value); stmt 959 ext/pdo/pdo_stmt.c stmt->fetch.cls.fcc.object = Z_OBJ_P(return_value); stmt 960 ext/pdo/pdo_stmt.c if (zend_call_function(&stmt->fetch.cls.fci, &stmt->fetch.cls.fcc) == FAILURE) { stmt 961 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "could not call class constructor"); stmt 964 ext/pdo/pdo_stmt.c if (!Z_ISUNDEF(stmt->fetch.cls.retval)) { stmt 965 ext/pdo/pdo_stmt.c zval_ptr_dtor(&stmt->fetch.cls.retval); stmt 966 ext/pdo/pdo_stmt.c ZVAL_UNDEF(&stmt->fetch.cls.retval); stmt 974 ext/pdo/pdo_stmt.c if (Z_ISUNDEF(stmt->fetch.into)) { stmt 975 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "No fetch-into object specified."); stmt 980 ext/pdo/pdo_stmt.c ZVAL_COPY(return_value, &stmt->fetch.into); stmt 988 ext/pdo/pdo_stmt.c if (Z_ISUNDEF(stmt->fetch.func.function)) { stmt 989 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "No fetch function specified"); stmt 992 ext/pdo/pdo_stmt.c if (!stmt->fetch.func.fci.size) { stmt 993 ext/pdo/pdo_stmt.c if (!do_fetch_func_prepare(stmt)) stmt 1007 ext/pdo/pdo_stmt.c if (flags == PDO_FETCH_GROUP && how == PDO_FETCH_COLUMN && stmt->fetch.column > 0) { stmt 1008 ext/pdo/pdo_stmt.c fetch_value(stmt, &grp_val, colno, NULL); stmt 1010 ext/pdo/pdo_stmt.c fetch_value(stmt, &grp_val, i, NULL); stmt 1014 ext/pdo/pdo_stmt.c i = stmt->column_count; /* no more data to fetch */ stmt 1020 ext/pdo/pdo_stmt.c for (idx = 0; i < stmt->column_count; i++, idx++) { stmt 1022 ext/pdo/pdo_stmt.c fetch_value(stmt, &val, i, NULL); stmt 1026 ext/pdo/pdo_stmt.c zend_symtable_update(Z_ARRVAL_P(return_value), stmt->columns[i].name, &val); stmt 1032 ext/pdo/pdo_stmt.c fetch_value(stmt, &tmp, ++i, NULL); stmt 1047 ext/pdo/pdo_stmt.c zend_symtable_update(Z_ARRVAL_P(return_value), stmt->columns[i].name, &val); stmt 1058 ext/pdo/pdo_stmt.c if ((curr_val = zend_hash_find(Z_ARRVAL_P(return_value), stmt->columns[i].name))) { stmt 1083 ext/pdo/pdo_stmt.c zend_hash_update(Z_ARRVAL_P(return_value), stmt->columns[i].name, &val); stmt 1095 ext/pdo/pdo_stmt.c stmt->columns[i].name, stmt 1103 ext/pdo/pdo_stmt.c stmt->columns[i].name, stmt 1112 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "cannot unserialize data"); stmt 1120 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "cannot unserialize class"); stmt 1124 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "cannot unserialize class"); stmt 1135 ext/pdo/pdo_stmt.c ZVAL_COPY_VALUE(&stmt->fetch.func.values[idx], &val); stmt 1136 ext/pdo/pdo_stmt.c ZVAL_COPY_VALUE(&stmt->fetch.cls.fci.params[idx], &stmt->fetch.func.values[idx]); stmt 1141 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "22003", "mode is out of range"); stmt 1150 ext/pdo/pdo_stmt.c stmt->fetch.cls.fci.object = Z_OBJ_P(return_value); stmt 1151 ext/pdo/pdo_stmt.c stmt->fetch.cls.fcc.object = Z_OBJ_P(return_value); stmt 1152 ext/pdo/pdo_stmt.c if (zend_call_function(&stmt->fetch.cls.fci, &stmt->fetch.cls.fcc) == FAILURE) { stmt 1153 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "could not call class constructor"); stmt 1156 ext/pdo/pdo_stmt.c if (!Z_ISUNDEF(stmt->fetch.cls.retval)) { stmt 1157 ext/pdo/pdo_stmt.c zval_ptr_dtor(&stmt->fetch.cls.retval); stmt 1162 ext/pdo/pdo_stmt.c do_fetch_opt_finish(stmt, 0); stmt 1163 ext/pdo/pdo_stmt.c stmt->fetch.cls.ce = old_ce; stmt 1164 ext/pdo/pdo_stmt.c ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, &old_ctor_args); stmt 1165 ext/pdo/pdo_stmt.c stmt->fetch.cls.fci.param_count = old_arg_count; stmt 1170 ext/pdo/pdo_stmt.c stmt->fetch.func.fci.param_count = idx; stmt 1171 ext/pdo/pdo_stmt.c stmt->fetch.func.fci.retval = &retval; stmt 1172 ext/pdo/pdo_stmt.c if (zend_call_function(&stmt->fetch.func.fci, &stmt->fetch.func.fcc) == FAILURE) { stmt 1173 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "could not call user-supplied function"); stmt 1184 ext/pdo/pdo_stmt.c zval_ptr_dtor(&stmt->fetch.func.values[idx]); stmt 1214 ext/pdo/pdo_stmt.c static int pdo_stmt_verify_mode(pdo_stmt_t *stmt, zend_long mode, int fetch_all) /* {{{ */ stmt 1221 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "invalid fetch mode"); stmt 1226 ext/pdo/pdo_stmt.c flags = stmt->default_fetch_type & PDO_FETCH_FLAGS; stmt 1227 ext/pdo/pdo_stmt.c mode = stmt->default_fetch_type & ~PDO_FETCH_FLAGS; stmt 1233 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "PDO::FETCH_FUNC is only allowed in PDOStatement::fetchAll()"); stmt 1240 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "PDO::FETCH_LAZY can't be used with PDOStatement::fetchAll()"); stmt 1247 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "PDO::FETCH_SERIALIZE can only be used together with PDO::FETCH_CLASS"); stmt 1251 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "PDO::FETCH_CLASSTYPE can only be used together with PDO::FETCH_CLASS"); stmt 1255 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "invalid fetch mode"); stmt 1282 ext/pdo/pdo_stmt.c if (!pdo_stmt_verify_mode(stmt, how, 0)) { stmt 1286 ext/pdo/pdo_stmt.c if (!do_fetch(stmt, TRUE, return_value, how, ori, off, 0)) { stmt 1313 ext/pdo/pdo_stmt.c if (!pdo_stmt_verify_mode(stmt, how, 0)) { stmt 1317 ext/pdo/pdo_stmt.c old_ce = stmt->fetch.cls.ce; stmt 1318 ext/pdo/pdo_stmt.c ZVAL_COPY_VALUE(&old_ctor_args, &stmt->fetch.cls.ctor_args); stmt 1319 ext/pdo/pdo_stmt.c old_arg_count = stmt->fetch.cls.fci.param_count; stmt 1321 ext/pdo/pdo_stmt.c do_fetch_opt_finish(stmt, 0); stmt 1325 ext/pdo/pdo_stmt.c ZVAL_DUP(&stmt->fetch.cls.ctor_args, ctor_args); stmt 1327 ext/pdo/pdo_stmt.c ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); stmt 1331 ext/pdo/pdo_stmt.c stmt->fetch.cls.ce = zend_fetch_class(class_name, ZEND_FETCH_CLASS_AUTO); stmt 1333 ext/pdo/pdo_stmt.c if (!stmt->fetch.cls.ce) { stmt 1334 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "Could not find user-supplied class"); stmt 1338 ext/pdo/pdo_stmt.c stmt->fetch.cls.ce = zend_standard_class_def; stmt 1341 ext/pdo/pdo_stmt.c if (!error && !do_fetch(stmt, TRUE, return_value, how, ori, off, 0)) { stmt 1347 ext/pdo/pdo_stmt.c do_fetch_opt_finish(stmt, 1); stmt 1349 ext/pdo/pdo_stmt.c stmt->fetch.cls.ce = old_ce; stmt 1350 ext/pdo/pdo_stmt.c ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, &old_ctor_args); stmt 1351 ext/pdo/pdo_stmt.c stmt->fetch.cls.fci.param_count = old_arg_count; stmt 1371 ext/pdo/pdo_stmt.c if (!do_fetch_common(stmt, PDO_FETCH_ORI_NEXT, 0, TRUE)) { stmt 1376 ext/pdo/pdo_stmt.c fetch_value(stmt, return_value, col_n, NULL); stmt 1396 ext/pdo/pdo_stmt.c if (!pdo_stmt_verify_mode(stmt, how, 1)) { stmt 1400 ext/pdo/pdo_stmt.c old_ce = stmt->fetch.cls.ce; stmt 1401 ext/pdo/pdo_stmt.c ZVAL_COPY_VALUE(&old_ctor_args, &stmt->fetch.cls.ctor_args); stmt 1402 ext/pdo/pdo_stmt.c old_arg_count = stmt->fetch.cls.fci.param_count; stmt 1404 ext/pdo/pdo_stmt.c do_fetch_opt_finish(stmt, 0); stmt 1411 ext/pdo/pdo_stmt.c stmt->fetch.cls.ce = zend_standard_class_def; stmt 1415 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "ctor_args must be either NULL or an array"); stmt 1425 ext/pdo/pdo_stmt.c ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, ctor_args); /* we're not going to free these */ stmt 1427 ext/pdo/pdo_stmt.c ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); stmt 1430 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "Invalid class name (should be a string)"); stmt 1434 ext/pdo/pdo_stmt.c stmt->fetch.cls.ce = zend_fetch_class(Z_STR_P(arg2), ZEND_FETCH_CLASS_AUTO); stmt 1435 ext/pdo/pdo_stmt.c if (!stmt->fetch.cls.ce) { stmt 1436 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "could not find user-specified class"); stmt 1443 ext/pdo/pdo_stmt.c do_fetch_class_prepare(stmt); stmt 1451 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "no fetch function specified"); stmt 1456 ext/pdo/pdo_stmt.c ZVAL_COPY_VALUE(&stmt->fetch.func.function, arg2); stmt 1457 ext/pdo/pdo_stmt.c if (do_fetch_func_prepare(stmt) == 0) { stmt 1468 ext/pdo/pdo_stmt.c stmt->fetch.column = how & PDO_FETCH_GROUP ? -1 : 0; stmt 1472 ext/pdo/pdo_stmt.c stmt->fetch.column = Z_LVAL_P(arg2); stmt 1475 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "Third parameter not allowed for PDO::FETCH_COLUMN"); stmt 1482 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "Extraneous additional parameters"); stmt 1490 ext/pdo/pdo_stmt.c flags |= stmt->default_fetch_type & PDO_FETCH_FLAGS; stmt 1491 ext/pdo/pdo_stmt.c how |= stmt->default_fetch_type & ~PDO_FETCH_FLAGS; stmt 1497 ext/pdo/pdo_stmt.c (how == PDO_FETCH_USE_DEFAULT && stmt->default_fetch_type == PDO_FETCH_KEY_PAIR) stmt 1504 ext/pdo/pdo_stmt.c if (!do_fetch(stmt, 1, &data, how | flags, PDO_FETCH_ORI_NEXT, 0, return_all)) { stmt 1510 ext/pdo/pdo_stmt.c while (do_fetch(stmt, 1, &data, how | flags, PDO_FETCH_ORI_NEXT, 0, return_all)); stmt 1511 ext/pdo/pdo_stmt.c } else if (how == PDO_FETCH_KEY_PAIR || (how == PDO_FETCH_USE_DEFAULT && stmt->default_fetch_type == PDO_FETCH_KEY_PAIR)) { stmt 1512 ext/pdo/pdo_stmt.c while (do_fetch(stmt, 1, &data, how | flags, PDO_FETCH_ORI_NEXT, 0, return_all)); stmt 1517 ext/pdo/pdo_stmt.c } while (do_fetch(stmt, 1, &data, how | flags, PDO_FETCH_ORI_NEXT, 0, 0)); stmt 1521 ext/pdo/pdo_stmt.c do_fetch_opt_finish(stmt, 0); stmt 1523 ext/pdo/pdo_stmt.c stmt->fetch.cls.ce = old_ce; stmt 1524 ext/pdo/pdo_stmt.c ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, &old_ctor_args); stmt 1525 ext/pdo/pdo_stmt.c stmt->fetch.cls.fci.param_count = old_arg_count; stmt 1541 ext/pdo/pdo_stmt.c static int register_bound_param(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt, int is_param) /* {{{ */ stmt 1564 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY093", "Columns/Parameters are 1-based"); stmt 1569 ext/pdo/pdo_stmt.c if (!really_register_bound_param(¶m, stmt, is_param)) { stmt 1602 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY093", "Columns/Parameters are 1-based"); stmt 1607 ext/pdo/pdo_stmt.c if (!really_register_bound_param(¶m, stmt, TRUE)) { stmt 1623 ext/pdo/pdo_stmt.c RETURN_BOOL(register_bound_param(INTERNAL_FUNCTION_PARAM_PASSTHRU, stmt, TRUE)); stmt 1632 ext/pdo/pdo_stmt.c RETURN_BOOL(register_bound_param(INTERNAL_FUNCTION_PARAM_PASSTHRU, stmt, 0)); stmt 1642 ext/pdo/pdo_stmt.c RETURN_LONG(stmt->row_count); stmt 1656 ext/pdo/pdo_stmt.c if (stmt->error_code[0] == '\0') { stmt 1660 ext/pdo/pdo_stmt.c RETURN_STRING(stmt->error_code); stmt 1679 ext/pdo/pdo_stmt.c add_next_index_string(return_value, stmt->error_code); stmt 1681 ext/pdo/pdo_stmt.c if (stmt->dbh->methods->fetch_err) { stmt 1682 ext/pdo/pdo_stmt.c stmt->dbh->methods->fetch_err(stmt->dbh, stmt, return_value); stmt 1710 ext/pdo/pdo_stmt.c if (!stmt->methods->set_attribute) { stmt 1715 ext/pdo/pdo_stmt.c if (stmt->methods->set_attribute(stmt, attr, value)) { stmt 1720 ext/pdo/pdo_stmt.c if (!stmt->methods->set_attribute) { stmt 1721 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "IM001", "This driver doesn't support setting attributes"); stmt 1732 ext/pdo/pdo_stmt.c static int generic_stmt_attr_get(pdo_stmt_t *stmt, zval *return_value, zend_long attr) stmt 1736 ext/pdo/pdo_stmt.c RETVAL_BOOL(stmt->supports_placeholders == PDO_PLACEHOLDER_NONE); stmt 1751 ext/pdo/pdo_stmt.c if (!stmt->methods->get_attribute) { stmt 1752 ext/pdo/pdo_stmt.c if (!generic_stmt_attr_get(stmt, return_value, attr)) { stmt 1753 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "IM001", stmt 1761 ext/pdo/pdo_stmt.c switch (stmt->methods->get_attribute(stmt, attr, return_value)) { stmt 1767 ext/pdo/pdo_stmt.c if (!generic_stmt_attr_get(stmt, return_value, attr)) { stmt 1769 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "IM001", stmt 1789 ext/pdo/pdo_stmt.c RETURN_LONG(stmt->column_count); stmt 1805 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "42P10", "column number must be non-negative"); stmt 1809 ext/pdo/pdo_stmt.c if (!stmt->methods->get_column_meta) { stmt 1810 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "IM001", "driver doesn't support meta data"); stmt 1815 ext/pdo/pdo_stmt.c if (FAILURE == stmt->methods->get_column_meta(stmt, colno, return_value)) { stmt 1821 ext/pdo/pdo_stmt.c col = &stmt->columns[colno]; stmt 1835 ext/pdo/pdo_stmt.c int pdo_stmt_setup_fetch_mode(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt, int skip) stmt 1843 ext/pdo/pdo_stmt.c do_fetch_opt_finish(stmt, 1); stmt 1845 ext/pdo/pdo_stmt.c switch (stmt->default_fetch_type) { stmt 1847 ext/pdo/pdo_stmt.c if (!Z_ISUNDEF(stmt->fetch.into)) { stmt 1848 ext/pdo/pdo_stmt.c zval_ptr_dtor(&stmt->fetch.into); stmt 1849 ext/pdo/pdo_stmt.c ZVAL_UNDEF(&stmt->fetch.into); stmt 1856 ext/pdo/pdo_stmt.c stmt->default_fetch_type = PDO_FETCH_BOTH; stmt 1868 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "mode must be an integer"); stmt 1874 ext/pdo/pdo_stmt.c retval = pdo_stmt_verify_mode(stmt, mode, 0); stmt 1896 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "fetch mode doesn't allow any extra arguments"); stmt 1904 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "fetch mode requires the colno argument"); stmt 1906 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "colno must be an integer"); stmt 1908 ext/pdo/pdo_stmt.c stmt->fetch.column = Z_LVAL(args[skip+1]); stmt 1917 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "fetch mode doesn't allow any extra arguments"); stmt 1919 ext/pdo/pdo_stmt.c stmt->fetch.cls.ce = NULL; stmt 1924 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "fetch mode requires the classname argument"); stmt 1926 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "too many arguments"); stmt 1928 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "classname must be a string"); stmt 1933 ext/pdo/pdo_stmt.c stmt->fetch.cls.ce = cep; stmt 1939 ext/pdo/pdo_stmt.c ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); stmt 1941 ext/pdo/pdo_stmt.c if (stmt->dbh->is_persistent) { stmt 1947 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "ctor_args must be either NULL or an array"); stmt 1950 ext/pdo/pdo_stmt.c ZVAL_DUP(&stmt->fetch.cls.ctor_args, &args[skip+2]); stmt 1955 ext/pdo/pdo_stmt.c do_fetch_class_prepare(stmt); stmt 1963 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "fetch mode requires the object parameter"); stmt 1965 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "object must be an object"); stmt 1972 ext/pdo/pdo_stmt.c if (stmt->dbh->is_persistent) { stmt 1976 ext/pdo/pdo_stmt.c ZVAL_COPY(&stmt->fetch.into, &args[skip+1]); stmt 1982 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "22003", "Invalid fetch mode specified"); stmt 1986 ext/pdo/pdo_stmt.c stmt->default_fetch_type = mode; stmt 2009 ext/pdo/pdo_stmt.c stmt, 0) == SUCCESS ? 1 : 0 stmt 2017 ext/pdo/pdo_stmt.c static int pdo_stmt_do_next_rowset(pdo_stmt_t *stmt) stmt 2020 ext/pdo/pdo_stmt.c if (stmt->columns) { stmt 2022 ext/pdo/pdo_stmt.c struct pdo_column_data *cols = stmt->columns; stmt 2024 ext/pdo/pdo_stmt.c for (i = 0; i < stmt->column_count; i++) { stmt 2027 ext/pdo/pdo_stmt.c efree(stmt->columns); stmt 2028 ext/pdo/pdo_stmt.c stmt->columns = NULL; stmt 2029 ext/pdo/pdo_stmt.c stmt->column_count = 0; stmt 2032 ext/pdo/pdo_stmt.c if (!stmt->methods->next_rowset(stmt)) { stmt 2034 ext/pdo/pdo_stmt.c stmt->executed = 0; stmt 2038 ext/pdo/pdo_stmt.c pdo_stmt_describe_columns(stmt); stmt 2047 ext/pdo/pdo_stmt.c if (!stmt->methods->next_rowset) { stmt 2048 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "IM001", "driver does not support multiple rowsets"); stmt 2054 ext/pdo/pdo_stmt.c if (!pdo_stmt_do_next_rowset(stmt)) { stmt 2069 ext/pdo/pdo_stmt.c if (!stmt->methods->cursor_closer) { stmt 2072 ext/pdo/pdo_stmt.c while (stmt->methods->fetcher(stmt, PDO_FETCH_ORI_NEXT, 0)) stmt 2074 ext/pdo/pdo_stmt.c if (!stmt->methods->next_rowset) { stmt 2078 ext/pdo/pdo_stmt.c if (!pdo_stmt_do_next_rowset(stmt)) { stmt 2083 ext/pdo/pdo_stmt.c stmt->executed = 0; stmt 2089 ext/pdo/pdo_stmt.c if (!stmt->methods->cursor_closer(stmt)) { stmt 2093 ext/pdo/pdo_stmt.c stmt->executed = 0; stmt 2111 ext/pdo/pdo_stmt.c stmt->query_stringlen, stmt 2112 ext/pdo/pdo_stmt.c (int) stmt->query_stringlen, stmt->query_string); stmt 2115 ext/pdo/pdo_stmt.c stmt->bound_params ? zend_hash_num_elements(stmt->bound_params) : 0); stmt 2117 ext/pdo/pdo_stmt.c if (stmt->bound_params) { stmt 2120 ext/pdo/pdo_stmt.c ZEND_HASH_FOREACH_KEY_PTR(stmt->bound_params, num, key, param) { stmt 2185 ext/pdo/pdo_stmt.c pdo_stmt_t *stmt = Z_PDO_STMT_P(object); stmt 2190 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "property queryString is read only"); stmt 2198 ext/pdo/pdo_stmt.c pdo_stmt_t *stmt = Z_PDO_STMT_P(object); stmt 2203 ext/pdo/pdo_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "property queryString is read only"); stmt 2219 ext/pdo/pdo_stmt.c pdo_stmt_t *stmt = php_pdo_stmt_fetch_object(object); stmt 2221 ext/pdo/pdo_stmt.c if (!stmt->dbh) { stmt 2226 ext/pdo/pdo_stmt.c if (!stmt->dbh->cls_methods[PDO_DBH_DRIVER_METHOD_KIND_STMT]) { stmt 2227 ext/pdo/pdo_stmt.c if (!pdo_hash_methods(Z_PDO_OBJECT_P(&stmt->database_object_handle), stmt 2229 ext/pdo/pdo_stmt.c || !stmt->dbh->cls_methods[PDO_DBH_DRIVER_METHOD_KIND_STMT]) { stmt 2234 ext/pdo/pdo_stmt.c if ((fbc = zend_hash_find_ptr(stmt->dbh->cls_methods[PDO_DBH_DRIVER_METHOD_KIND_STMT], lc_method_name)) == NULL) { stmt 2252 ext/pdo/pdo_stmt.c pdo_stmt_t *stmt; stmt 2255 ext/pdo/pdo_stmt.c stmt = ecalloc(1, sizeof(pdo_stmt_t) + zend_object_properties_size(Z_OBJCE_P(zobject))); stmt 2256 ext/pdo/pdo_stmt.c zend_object_std_init(&stmt->std, Z_OBJCE_P(zobject)); stmt 2257 ext/pdo/pdo_stmt.c object_properties_init(&stmt->std, Z_OBJCE_P(zobject)); stmt 2261 ext/pdo/pdo_stmt.c zend_objects_clone_members(&stmt->std, &old_stmt->std); stmt 2263 ext/pdo/pdo_stmt.c return &stmt->std; stmt 2297 ext/pdo/pdo_stmt.c PDO_API void php_pdo_free_statement(pdo_stmt_t *stmt) stmt 2299 ext/pdo/pdo_stmt.c if (stmt->bound_params) { stmt 2300 ext/pdo/pdo_stmt.c zend_hash_destroy(stmt->bound_params); stmt 2301 ext/pdo/pdo_stmt.c FREE_HASHTABLE(stmt->bound_params); stmt 2302 ext/pdo/pdo_stmt.c stmt->bound_params = NULL; stmt 2304 ext/pdo/pdo_stmt.c if (stmt->bound_param_map) { stmt 2305 ext/pdo/pdo_stmt.c zend_hash_destroy(stmt->bound_param_map); stmt 2306 ext/pdo/pdo_stmt.c FREE_HASHTABLE(stmt->bound_param_map); stmt 2307 ext/pdo/pdo_stmt.c stmt->bound_param_map = NULL; stmt 2309 ext/pdo/pdo_stmt.c if (stmt->bound_columns) { stmt 2310 ext/pdo/pdo_stmt.c zend_hash_destroy(stmt->bound_columns); stmt 2311 ext/pdo/pdo_stmt.c FREE_HASHTABLE(stmt->bound_columns); stmt 2312 ext/pdo/pdo_stmt.c stmt->bound_columns = NULL; stmt 2315 ext/pdo/pdo_stmt.c if (stmt->methods && stmt->methods->dtor) { stmt 2316 ext/pdo/pdo_stmt.c stmt->methods->dtor(stmt); stmt 2318 ext/pdo/pdo_stmt.c if (stmt->query_string) { stmt 2319 ext/pdo/pdo_stmt.c efree(stmt->query_string); stmt 2322 ext/pdo/pdo_stmt.c if (stmt->columns) { stmt 2324 ext/pdo/pdo_stmt.c struct pdo_column_data *cols = stmt->columns; stmt 2326 ext/pdo/pdo_stmt.c for (i = 0; i < stmt->column_count; i++) { stmt 2332 ext/pdo/pdo_stmt.c efree(stmt->columns); stmt 2333 ext/pdo/pdo_stmt.c stmt->columns = NULL; stmt 2336 ext/pdo/pdo_stmt.c if (!Z_ISUNDEF(stmt->fetch.into) && stmt->default_fetch_type == PDO_FETCH_INTO) { stmt 2337 ext/pdo/pdo_stmt.c zval_ptr_dtor(&stmt->fetch.into); stmt 2338 ext/pdo/pdo_stmt.c ZVAL_UNDEF(&stmt->fetch.into); stmt 2341 ext/pdo/pdo_stmt.c do_fetch_opt_finish(stmt, 1); stmt 2343 ext/pdo/pdo_stmt.c if (!Z_ISUNDEF(stmt->database_object_handle)) { stmt 2344 ext/pdo/pdo_stmt.c zval_ptr_dtor(&stmt->database_object_handle); stmt 2346 ext/pdo/pdo_stmt.c zend_object_std_dtor(&stmt->std); stmt 2351 ext/pdo/pdo_stmt.c pdo_stmt_t *stmt = php_pdo_stmt_fetch_object(std); stmt 2352 ext/pdo/pdo_stmt.c php_pdo_free_statement(stmt); stmt 2357 ext/pdo/pdo_stmt.c pdo_stmt_t *stmt; stmt 2359 ext/pdo/pdo_stmt.c stmt = ecalloc(1, sizeof(pdo_stmt_t) + zend_object_properties_size(ce)); stmt 2360 ext/pdo/pdo_stmt.c zend_object_std_init(&stmt->std, ce); stmt 2361 ext/pdo/pdo_stmt.c object_properties_init(&stmt->std, ce); stmt 2363 ext/pdo/pdo_stmt.c stmt->std.handlers = &pdo_dbstmt_object_handlers; stmt 2365 ext/pdo/pdo_stmt.c return &stmt->std; stmt 2421 ext/pdo/pdo_stmt.c pdo_stmt_t *stmt = Z_PDO_STMT_P(&I->iter.data); /* for PDO_HANDLE_STMT_ERR() */ stmt 2427 ext/pdo/pdo_stmt.c if (!do_fetch(stmt, TRUE, &I->fetch_ahead, PDO_FETCH_USE_DEFAULT, stmt 2451 ext/pdo/pdo_stmt.c pdo_stmt_t *stmt = Z_PDO_STMT_P(object); stmt 2463 ext/pdo/pdo_stmt.c if (!do_fetch(stmt, 1, &I->fetch_ahead, PDO_FETCH_USE_DEFAULT, stmt 2484 ext/pdo/pdo_stmt.c pdo_stmt_t *stmt = row->stmt; stmt 2490 ext/pdo/pdo_stmt.c if (stmt) { stmt 2492 ext/pdo/pdo_stmt.c if (Z_LVAL_P(member) >= 0 && Z_LVAL_P(member) < stmt->column_count) { stmt 2493 ext/pdo/pdo_stmt.c fetch_value(stmt, rv, Z_LVAL_P(member), NULL); stmt 2497 ext/pdo/pdo_stmt.c if (lval >= 0 && lval < stmt->column_count) { stmt 2498 ext/pdo/pdo_stmt.c fetch_value(stmt, rv, lval, NULL); stmt 2504 ext/pdo/pdo_stmt.c for (colno = 0; colno < stmt->column_count; colno++) { stmt 2505 ext/pdo/pdo_stmt.c if (ZSTR_LEN(stmt->columns[colno].name) == Z_STRLEN_P(member) && stmt 2506 ext/pdo/pdo_stmt.c strncmp(ZSTR_VAL(stmt->columns[colno].name), Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0) { stmt 2507 ext/pdo/pdo_stmt.c fetch_value(stmt, rv, colno, NULL); stmt 2512 ext/pdo/pdo_stmt.c ZVAL_OBJ(&zobj, &stmt->std); stmt 2540 ext/pdo/pdo_stmt.c pdo_stmt_t *stmt = row->stmt; stmt 2544 ext/pdo/pdo_stmt.c if (stmt) { stmt 2546 ext/pdo/pdo_stmt.c return Z_LVAL_P(member) >= 0 && Z_LVAL_P(member) < stmt->column_count; stmt 2549 ext/pdo/pdo_stmt.c return lval >=0 && lval < stmt->column_count; stmt 2557 ext/pdo/pdo_stmt.c for (colno = 0; colno < stmt->column_count; colno++) { stmt 2558 ext/pdo/pdo_stmt.c if (ZSTR_LEN(stmt->columns[colno].name) == Z_STRLEN_P(member) && stmt 2559 ext/pdo/pdo_stmt.c strncmp(ZSTR_VAL(stmt->columns[colno].name), Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0) { stmt 2586 ext/pdo/pdo_stmt.c pdo_stmt_t *stmt = row->stmt; stmt 2589 ext/pdo/pdo_stmt.c if (stmt == NULL) { stmt 2593 ext/pdo/pdo_stmt.c if (!stmt->std.properties) { stmt 2594 ext/pdo/pdo_stmt.c rebuild_object_properties(&stmt->std); stmt 2596 ext/pdo/pdo_stmt.c for (i = 0; i < stmt->column_count; i++) { stmt 2598 ext/pdo/pdo_stmt.c fetch_value(stmt, &val, i, NULL); stmt 2600 ext/pdo/pdo_stmt.c zend_hash_update(stmt->std.properties, stmt->columns[i].name, &val); stmt 2603 ext/pdo/pdo_stmt.c return stmt->std.properties; stmt 2682 ext/pdo/pdo_stmt.c if (row->stmt) { stmt 2683 ext/pdo/pdo_stmt.c ZVAL_UNDEF(&row->stmt->lazy_object_ref); stmt 2684 ext/pdo/pdo_stmt.c OBJ_RELEASE(&row->stmt->std); stmt 245 ext/pdo/php_pdo_driver.h typedef int (*pdo_dbh_prepare_func)(pdo_dbh_t *dbh, const char *sql, size_t sql_len, pdo_stmt_t *stmt, zval *driver_options); stmt 269 ext/pdo/php_pdo_driver.h typedef int (*pdo_dbh_fetch_error_func)(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval *info); stmt 321 ext/pdo/php_pdo_driver.h typedef int (*pdo_stmt_dtor_func)(pdo_stmt_t *stmt); stmt 324 ext/pdo/php_pdo_driver.h typedef int (*pdo_stmt_execute_func)(pdo_stmt_t *stmt); stmt 329 ext/pdo/php_pdo_driver.h typedef int (*pdo_stmt_fetch_func)(pdo_stmt_t *stmt, stmt 334 ext/pdo/php_pdo_driver.h typedef int (*pdo_stmt_describe_col_func)(pdo_stmt_t *stmt, int colno); stmt 342 ext/pdo/php_pdo_driver.h typedef int (*pdo_stmt_get_col_data_func)(pdo_stmt_t *stmt, int colno, char **ptr, size_t *len, int *caller_frees); stmt 355 ext/pdo/php_pdo_driver.h typedef int (*pdo_stmt_param_hook_func)(pdo_stmt_t *stmt, struct pdo_bound_param_data *param, enum pdo_param_event event_type); stmt 358 ext/pdo/php_pdo_driver.h typedef int (*pdo_stmt_set_attr_func)(pdo_stmt_t *stmt, zend_long attr, zval *val); stmt 361 ext/pdo/php_pdo_driver.h typedef int (*pdo_stmt_get_attr_func)(pdo_stmt_t *stmt, zend_long attr, zval *val); stmt 391 ext/pdo/php_pdo_driver.h typedef int (*pdo_stmt_get_column_meta_func)(pdo_stmt_t *stmt, zend_long colno, zval *return_value); stmt 397 ext/pdo/php_pdo_driver.h typedef int (*pdo_stmt_next_rowset_func)(pdo_stmt_t *stmt); stmt 403 ext/pdo/php_pdo_driver.h typedef int (*pdo_stmt_cursor_closer_func)(pdo_stmt_t *stmt); stmt 550 ext/pdo/php_pdo_driver.h pdo_stmt_t *stmt; /* for convenience in dtor */ stmt 654 ext/pdo/php_pdo_driver.h pdo_stmt_t *stmt; stmt 678 ext/pdo/php_pdo_driver.h PDO_API int pdo_parse_params(pdo_stmt_t *stmt, char *inquery, size_t inquery_len, stmt 681 ext/pdo/php_pdo_driver.h PDO_API void pdo_raise_impl_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, stmt 687 ext/pdo/php_pdo_driver.h PDO_API void php_pdo_free_statement(pdo_stmt_t *stmt); stmt 26 ext/pdo/php_pdo_error.h PDO_API void pdo_handle_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt); stmt 35 ext/pdo/php_pdo_error.h #define PDO_STMT_CLEAR_ERR() strcpy(stmt->error_code, PDO_ERR_NONE) stmt 37 ext/pdo/php_pdo_error.h #define PDO_HANDLE_STMT_ERR() if (strcmp(stmt->error_code, PDO_ERR_NONE)) { pdo_handle_error(stmt->dbh, stmt); } stmt 47 ext/pdo/php_pdo_int.h int pdo_stmt_describe_columns(pdo_stmt_t *stmt); stmt 48 ext/pdo/php_pdo_int.h int pdo_stmt_setup_fetch_mode(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt, int skip_first_arg); stmt 38 ext/pdo_dblib/dblib_driver.c static int dblib_fetch_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval *info) stmt 46 ext/pdo_dblib/dblib_driver.c if (stmt) { stmt 47 ext/pdo_dblib/dblib_driver.c S = (pdo_dblib_stmt*)stmt->driver_data; stmt 61 ext/pdo_dblib/dblib_driver.c msg, einfo->dberr, einfo->severity, stmt ? stmt->active_query_string : ""); stmt 95 ext/pdo_dblib/dblib_driver.c static int dblib_handle_preparer(pdo_dbh_t *dbh, const char *sql, size_t sql_len, pdo_stmt_t *stmt, zval *driver_options) stmt 101 ext/pdo_dblib/dblib_driver.c stmt->driver_data = S; stmt 102 ext/pdo_dblib/dblib_driver.c stmt->methods = &dblib_stmt_methods; stmt 103 ext/pdo_dblib/dblib_driver.c stmt->supports_placeholders = PDO_PLACEHOLDER_NONE; stmt 104 ext/pdo_dblib/dblib_driver.c S->err.sqlstate = stmt->error_code; stmt 98 ext/pdo_dblib/dblib_stmt.c static int pdo_dblib_stmt_cursor_closer(pdo_stmt_t *stmt) stmt 100 ext/pdo_dblib/dblib_stmt.c pdo_dblib_stmt *S = (pdo_dblib_stmt*)stmt->driver_data; stmt 109 ext/pdo_dblib/dblib_stmt.c static int pdo_dblib_stmt_dtor(pdo_stmt_t *stmt) stmt 111 ext/pdo_dblib/dblib_stmt.c pdo_dblib_stmt *S = (pdo_dblib_stmt*)stmt->driver_data; stmt 118 ext/pdo_dblib/dblib_stmt.c static int pdo_dblib_stmt_next_rowset(pdo_stmt_t *stmt) stmt 120 ext/pdo_dblib/dblib_stmt.c pdo_dblib_stmt *S = (pdo_dblib_stmt*)stmt->driver_data; stmt 127 ext/pdo_dblib/dblib_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "PDO_DBLIB: dbresults() returned FAIL"); stmt 135 ext/pdo_dblib/dblib_stmt.c stmt->row_count = DBCOUNT(H->link); stmt 136 ext/pdo_dblib/dblib_stmt.c stmt->column_count = dbnumcols(H->link); stmt 141 ext/pdo_dblib/dblib_stmt.c static int pdo_dblib_stmt_execute(pdo_stmt_t *stmt) stmt 143 ext/pdo_dblib/dblib_stmt.c pdo_dblib_stmt *S = (pdo_dblib_stmt*)stmt->driver_data; stmt 149 ext/pdo_dblib/dblib_stmt.c pdo_dblib_stmt_cursor_closer(stmt); stmt 151 ext/pdo_dblib/dblib_stmt.c if (FAIL == dbcmd(H->link, stmt->active_query_string)) { stmt 159 ext/pdo_dblib/dblib_stmt.c ret = pdo_dblib_stmt_next_rowset(stmt); stmt 161 ext/pdo_dblib/dblib_stmt.c stmt->row_count = DBCOUNT(H->link); stmt 162 ext/pdo_dblib/dblib_stmt.c stmt->column_count = dbnumcols(H->link); stmt 167 ext/pdo_dblib/dblib_stmt.c static int pdo_dblib_stmt_fetch(pdo_stmt_t *stmt, stmt 173 ext/pdo_dblib/dblib_stmt.c pdo_dblib_stmt *S = (pdo_dblib_stmt*)stmt->driver_data; stmt 179 ext/pdo_dblib/dblib_stmt.c pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "PDO_DBLIB: dbnextrow() returned FAIL"); stmt 190 ext/pdo_dblib/dblib_stmt.c static int pdo_dblib_stmt_describe(pdo_stmt_t *stmt, int colno) stmt 192 ext/pdo_dblib/dblib_stmt.c pdo_dblib_stmt *S = (pdo_dblib_stmt*)stmt->driver_data; stmt 197 ext/pdo_dblib/dblib_stmt.c if(colno >= stmt->column_count || colno < 0) { stmt 201 ext/pdo_dblib/dblib_stmt.c col = &stmt->columns[colno]; stmt 220 ext/pdo_dblib/dblib_stmt.c static int pdo_dblib_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, stmt 224 ext/pdo_dblib/dblib_stmt.c pdo_dblib_stmt *S = (pdo_dblib_stmt*)stmt->driver_data; stmt 307 ext/pdo_dblib/dblib_stmt.c static int pdo_dblib_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *param, stmt 313 ext/pdo_dblib/dblib_stmt.c static int pdo_dblib_stmt_get_column_meta(pdo_stmt_t *stmt, zend_long colno, zval *return_value) stmt 315 ext/pdo_dblib/dblib_stmt.c pdo_dblib_stmt *S = (pdo_dblib_stmt*)stmt->driver_data; stmt 319 ext/pdo_dblib/dblib_stmt.c if(colno >= stmt->column_count || colno < 0) { stmt 38 ext/pdo_firebird/firebird_driver.c void _firebird_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, char const *file, zend_long line) /* {{{ */ stmt 41 ext/pdo_firebird/firebird_driver.c pdo_firebird_db_handle *H = stmt ? ((pdo_firebird_stmt *)stmt->driver_data)->H stmt 44 ext/pdo_firebird/firebird_driver.c pdo_error_type *const error_code = stmt ? &stmt->error_code : &dbh->error_code; stmt 134 ext/pdo_firebird/firebird_driver.c pdo_stmt_t *stmt, zval *driver_options) stmt 160 ext/pdo_firebird/firebird_driver.c S->stmt = s; stmt 163 ext/pdo_firebird/firebird_driver.c S->out_sqlda.sqln = stmt->column_count = num_sqlda.sqld; stmt 194 ext/pdo_firebird/firebird_driver.c stmt->driver_data = S; stmt 195 ext/pdo_firebird/firebird_driver.c stmt->methods = &firebird_stmt_methods; stmt 196 ext/pdo_firebird/firebird_driver.c stmt->supports_placeholders = PDO_PLACEHOLDER_POSITIONAL; stmt 222 ext/pdo_firebird/firebird_driver.c isc_stmt_handle stmt = NULL; stmt 234 ext/pdo_firebird/firebird_driver.c if (!firebird_alloc_prepare_stmt(dbh, sql, sql_len, &out_sqlda, &stmt, 0)) { stmt 239 ext/pdo_firebird/firebird_driver.c if (isc_dsql_execute2(H->isc_status, &H->tr, &stmt, PDO_FB_SQLDA_VERSION, &in_sqlda, &out_sqlda)) { stmt 245 ext/pdo_firebird/firebird_driver.c if (isc_dsql_sql_info(H->isc_status, &stmt, sizeof(info_count), const_cast(info_count), stmt 611 ext/pdo_firebird/firebird_driver.c static int pdo_firebird_fetch_error_func(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval *info) /* {{{ */ stmt 33 ext/pdo_firebird/firebird_statement.c #define RECORD_ERROR(stmt) _firebird_error(NULL, stmt, __FILE__, __LINE__) stmt 51 ext/pdo_firebird/firebird_statement.c static int firebird_stmt_dtor(pdo_stmt_t *stmt) /* {{{ */ stmt 53 ext/pdo_firebird/firebird_statement.c pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; stmt 57 ext/pdo_firebird/firebird_statement.c if (isc_dsql_free_statement(S->H->isc_status, &S->stmt, DSQL_drop)) { stmt 58 ext/pdo_firebird/firebird_statement.c RECORD_ERROR(stmt); stmt 87 ext/pdo_firebird/firebird_statement.c static int firebird_stmt_execute(pdo_stmt_t *stmt) /* {{{ */ stmt 89 ext/pdo_firebird/firebird_statement.c pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; stmt 97 ext/pdo_firebird/firebird_statement.c if ((*S->name || S->cursor_open) && isc_dsql_free_statement(H->isc_status, &S->stmt, DSQL_close)) { stmt 103 ext/pdo_firebird/firebird_statement.c if (isc_dsql_execute(H->isc_status, &H->tr, &S->stmt, PDO_FB_SQLDA_VERSION, S->in_sqlda)) { stmt 110 ext/pdo_firebird/firebird_statement.c stmt->row_count = affected_rows; stmt 117 ext/pdo_firebird/firebird_statement.c if (isc_dsql_sql_info(H->isc_status, &S->stmt, sizeof ( info_count), stmt 130 ext/pdo_firebird/firebird_statement.c stmt->row_count = affected_rows; stmt 137 ext/pdo_firebird/firebird_statement.c if (stmt->dbh->auto_commit && isc_commit_retaining(H->isc_status, &H->tr)) { stmt 148 ext/pdo_firebird/firebird_statement.c RECORD_ERROR(stmt); stmt 155 ext/pdo_firebird/firebird_statement.c static int firebird_stmt_fetch(pdo_stmt_t *stmt, /* {{{ */ stmt 158 ext/pdo_firebird/firebird_statement.c pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; stmt 161 ext/pdo_firebird/firebird_statement.c if (!stmt->executed) { stmt 162 ext/pdo_firebird/firebird_statement.c strcpy(stmt->error_code, "HY000"); stmt 165 ext/pdo_firebird/firebird_statement.c if (isc_dsql_fetch(H->isc_status, &S->stmt, PDO_FB_SQLDA_VERSION, &S->out_sqlda)) { stmt 167 ext/pdo_firebird/firebird_statement.c RECORD_ERROR(stmt); stmt 175 ext/pdo_firebird/firebird_statement.c stmt->row_count++; stmt 183 ext/pdo_firebird/firebird_statement.c static int firebird_stmt_describe(pdo_stmt_t *stmt, int colno) /* {{{ */ stmt 185 ext/pdo_firebird/firebird_statement.c pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; stmt 186 ext/pdo_firebird/firebird_statement.c struct pdo_column_data *col = &stmt->columns[colno]; stmt 221 ext/pdo_firebird/firebird_statement.c static int firebird_fetch_blob(pdo_stmt_t *stmt, int colno, char **ptr, /* {{{ */ stmt 224 ext/pdo_firebird/firebird_statement.c pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; stmt 233 ext/pdo_firebird/firebird_statement.c RECORD_ERROR(stmt); stmt 239 ext/pdo_firebird/firebird_statement.c RECORD_ERROR(stmt); stmt 291 ext/pdo_firebird/firebird_statement.c RECORD_ERROR(stmt); stmt 298 ext/pdo_firebird/firebird_statement.c static int firebird_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, /* {{{ */ stmt 301 ext/pdo_firebird/firebird_statement.c pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; stmt 402 ext/pdo_firebird/firebird_statement.c return firebird_fetch_blob(stmt,colno,ptr,len, stmt 411 ext/pdo_firebird/firebird_statement.c static int firebird_bind_blob(pdo_stmt_t *stmt, ISC_QUAD *blob_id, zval *param) stmt 413 ext/pdo_firebird/firebird_statement.c pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; stmt 421 ext/pdo_firebird/firebird_statement.c RECORD_ERROR(stmt); stmt 433 ext/pdo_firebird/firebird_statement.c RECORD_ERROR(stmt); stmt 443 ext/pdo_firebird/firebird_statement.c RECORD_ERROR(stmt); stmt 449 ext/pdo_firebird/firebird_statement.c static int firebird_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *param, /* {{{ */ stmt 452 ext/pdo_firebird/firebird_statement.c pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; stmt 461 ext/pdo_firebird/firebird_statement.c strcpy(stmt->error_code, "HY093"); stmt 487 ext/pdo_firebird/firebird_statement.c strcpy(stmt->error_code, "HY093"); stmt 534 ext/pdo_firebird/firebird_statement.c pdo_raise_impl_error(stmt->dbh, stmt, "HY105", "Expected a stream resource"); stmt 541 ext/pdo_firebird/firebird_statement.c strcpy(stmt->error_code, "HY000"); stmt 546 ext/pdo_firebird/firebird_statement.c return firebird_bind_blob(stmt, (ISC_QUAD*)var->sqldata, parameter); stmt 590 ext/pdo_firebird/firebird_statement.c strcpy(stmt->error_code, "HY105"); stmt 597 ext/pdo_firebird/firebird_statement.c strcpy(stmt->error_code, "HY105"); stmt 621 ext/pdo_firebird/firebird_statement.c if (firebird_stmt_get_col(stmt, param->paramno, &value, &value_len, &caller_frees)) { stmt 658 ext/pdo_firebird/firebird_statement.c static int firebird_stmt_set_attribute(pdo_stmt_t *stmt, zend_long attr, zval *val) /* {{{ */ stmt 660 ext/pdo_firebird/firebird_statement.c pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; stmt 668 ext/pdo_firebird/firebird_statement.c if (isc_dsql_set_cursor_name(S->H->isc_status, &S->stmt, Z_STRVAL_P(val),0)) { stmt 669 ext/pdo_firebird/firebird_statement.c RECORD_ERROR(stmt); stmt 679 ext/pdo_firebird/firebird_statement.c static int firebird_stmt_get_attribute(pdo_stmt_t *stmt, zend_long attr, zval *val) /* {{{ */ stmt 681 ext/pdo_firebird/firebird_statement.c pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; stmt 698 ext/pdo_firebird/firebird_statement.c static int firebird_stmt_cursor_closer(pdo_stmt_t *stmt) /* {{{ */ stmt 700 ext/pdo_firebird/firebird_statement.c pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; stmt 703 ext/pdo_firebird/firebird_statement.c if ((*S->name || S->cursor_open) && isc_dsql_free_statement(S->H->isc_status, &S->stmt, DSQL_close)) { stmt 704 ext/pdo_firebird/firebird_statement.c RECORD_ERROR(stmt); stmt 97 ext/pdo_firebird/php_pdo_firebird_int.h isc_stmt_handle stmt; stmt 131 ext/pdo_firebird/php_pdo_firebird_int.h void _firebird_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, char const *file, zend_long line); stmt 46 ext/pdo_mysql/mysql_driver.c int _pdo_mysql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file, int line) stmt 55 ext/pdo_mysql/mysql_driver.c if (stmt) { stmt 56 ext/pdo_mysql/mysql_driver.c S = (pdo_mysql_stmt*)stmt->driver_data; stmt 57 ext/pdo_mysql/mysql_driver.c pdo_err = &stmt->error_code; stmt 64 ext/pdo_mysql/mysql_driver.c if (S && S->stmt) { stmt 65 ext/pdo_mysql/mysql_driver.c einfo->errcode = mysql_stmt_errno(S->stmt); stmt 100 ext/pdo_mysql/mysql_driver.c if (S && S->stmt) { stmt 101 ext/pdo_mysql/mysql_driver.c strcpy(*pdo_err, mysql_stmt_sqlstate(S->stmt)); stmt 117 ext/pdo_mysql/mysql_driver.c static int pdo_mysql_fetch_error_func(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval *info) stmt 123 ext/pdo_mysql/mysql_driver.c PDO_DBG_INF_FMT("dbh=%p stmt=%p", dbh, stmt); stmt 124 ext/pdo_mysql/mysql_driver.c if (stmt) { stmt 125 ext/pdo_mysql/mysql_driver.c pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data; stmt 162 ext/pdo_mysql/mysql_driver.c static int mysql_handle_preparer(pdo_dbh_t *dbh, const char *sql, size_t sql_len, pdo_stmt_t *stmt, zval *driver_options) stmt 176 ext/pdo_mysql/mysql_driver.c stmt->driver_data = S; stmt 177 ext/pdo_mysql/mysql_driver.c stmt->methods = &mysql_stmt_methods; stmt 187 ext/pdo_mysql/mysql_driver.c stmt->supports_placeholders = PDO_PLACEHOLDER_POSITIONAL; stmt 188 ext/pdo_mysql/mysql_driver.c ret = pdo_parse_params(stmt, (char*)sql, sql_len, &nsql, &nsql_len); stmt 196 ext/pdo_mysql/mysql_driver.c strcpy(dbh->error_code, stmt->error_code); stmt 200 ext/pdo_mysql/mysql_driver.c if (!(S->stmt = mysql_stmt_init(H->server))) { stmt 208 ext/pdo_mysql/mysql_driver.c if (mysql_stmt_prepare(S->stmt, sql, sql_len)) { stmt 227 ext/pdo_mysql/mysql_driver.c S->num_params = mysql_stmt_param_count(S->stmt); stmt 247 ext/pdo_mysql/mysql_driver.c stmt->supports_placeholders = PDO_PLACEHOLDER_NONE; stmt 36 ext/pdo_mysql/mysql_statement.c # define pdo_mysql_stmt_execute_prepared(stmt) pdo_mysql_stmt_execute_prepared_mysqlnd(stmt) stmt 38 ext/pdo_mysql/mysql_statement.c # define pdo_mysql_stmt_close(stmt) mysqlnd_stmt_close(stmt, 0) stmt 40 ext/pdo_mysql/mysql_statement.c # define pdo_mysql_stmt_execute_prepared(stmt) pdo_mysql_stmt_execute_prepared_libmysql(stmt) stmt 42 ext/pdo_mysql/mysql_statement.c # define pdo_mysql_stmt_close(stmt) mysql_stmt_close(stmt) stmt 47 ext/pdo_mysql/mysql_statement.c static int pdo_mysql_stmt_dtor(pdo_stmt_t *stmt) /* {{{ */ stmt 49 ext/pdo_mysql/mysql_statement.c pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data; stmt 52 ext/pdo_mysql/mysql_statement.c PDO_DBG_INF_FMT("stmt=%p", S->stmt); stmt 59 ext/pdo_mysql/mysql_statement.c pefree(S->einfo.errmsg, stmt->dbh->is_persistent); stmt 62 ext/pdo_mysql/mysql_statement.c if (S->stmt) { stmt 63 ext/pdo_mysql/mysql_statement.c pdo_mysql_stmt_close(S->stmt); stmt 64 ext/pdo_mysql/mysql_statement.c S->stmt = NULL; stmt 81 ext/pdo_mysql/mysql_statement.c for (i = 0; i < stmt->column_count; i++) { stmt 91 ext/pdo_mysql/mysql_statement.c if (IS_OBJ_VALID(EG(objects_store).object_buckets[Z_OBJ_HANDLE(stmt->database_object_handle)]) stmt 92 ext/pdo_mysql/mysql_statement.c && (!(GC_FLAGS(Z_OBJ(stmt->database_object_handle)) & IS_OBJ_FREE_CALLED))) { stmt 107 ext/pdo_mysql/mysql_statement.c if (!S->stmt && S->current_data) { stmt 117 ext/pdo_mysql/mysql_statement.c static void pdo_mysql_stmt_set_row_count(pdo_stmt_t *stmt) /* {{{ */ stmt 120 ext/pdo_mysql/mysql_statement.c pdo_mysql_stmt *S = stmt->driver_data; stmt 121 ext/pdo_mysql/mysql_statement.c row_count = (zend_long) mysql_stmt_affected_rows(S->stmt); stmt 123 ext/pdo_mysql/mysql_statement.c stmt->row_count = row_count; stmt 128 ext/pdo_mysql/mysql_statement.c static int pdo_mysql_fill_stmt_from_result(pdo_stmt_t *stmt) /* {{{ */ stmt 130 ext/pdo_mysql/mysql_statement.c pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data; stmt 145 ext/pdo_mysql/mysql_statement.c pdo_mysql_error_stmt(stmt); stmt 149 ext/pdo_mysql/mysql_statement.c stmt->row_count = (zend_long) mysql_num_rows(S->result); stmt 150 ext/pdo_mysql/mysql_statement.c stmt->column_count = (int) mysql_num_fields(S->result); stmt 154 ext/pdo_mysql/mysql_statement.c stmt->row_count = (zend_long) row_count; stmt 162 ext/pdo_mysql/mysql_statement.c static int pdo_mysql_stmt_execute_prepared_libmysql(pdo_stmt_t *stmt) /* {{{ */ stmt 164 ext/pdo_mysql/mysql_statement.c pdo_mysql_stmt *S = stmt->driver_data; stmt 170 ext/pdo_mysql/mysql_statement.c if (mysql_stmt_bind_param(S->stmt, S->params) || mysql_stmt_execute(S->stmt)) { stmt 174 ext/pdo_mysql/mysql_statement.c pdo_mysql_error_stmt(stmt); stmt 175 ext/pdo_mysql/mysql_statement.c if (mysql_stmt_errno(S->stmt) == 2057) { stmt 177 ext/pdo_mysql/mysql_statement.c S->stmt = NULL; stmt 186 ext/pdo_mysql/mysql_statement.c S->result = mysql_stmt_result_metadata(S->stmt); stmt 192 ext/pdo_mysql/mysql_statement.c for (i = 0; i < stmt->column_count; i++) { stmt 200 ext/pdo_mysql/mysql_statement.c stmt->column_count = (int)mysql_num_fields(S->result); stmt 201 ext/pdo_mysql/mysql_statement.c S->bound_result = ecalloc(stmt->column_count, sizeof(MYSQL_BIND)); stmt 202 ext/pdo_mysql/mysql_statement.c S->out_null = ecalloc(stmt->column_count, sizeof(my_bool)); stmt 203 ext/pdo_mysql/mysql_statement.c S->out_length = ecalloc(stmt->column_count, sizeof(zend_ulong)); stmt 206 ext/pdo_mysql/mysql_statement.c for (i = 0; i < stmt->column_count; i++) { stmt 209 ext/pdo_mysql/mysql_statement.c mysql_stmt_attr_set(S->stmt, STMT_ATTR_UPDATE_MAX_LENGTH, &on); stmt 254 ext/pdo_mysql/mysql_statement.c if (mysql_stmt_bind_result(S->stmt, S->bound_result)) { stmt 255 ext/pdo_mysql/mysql_statement.c pdo_mysql_error_stmt(stmt); stmt 261 ext/pdo_mysql/mysql_statement.c mysql_stmt_store_result(S->stmt); stmt 266 ext/pdo_mysql/mysql_statement.c pdo_mysql_stmt_set_row_count(stmt); stmt 273 ext/pdo_mysql/mysql_statement.c static int pdo_mysql_stmt_execute_prepared_mysqlnd(pdo_stmt_t *stmt) /* {{{ */ stmt 275 ext/pdo_mysql/mysql_statement.c pdo_mysql_stmt *S = stmt->driver_data; stmt 281 ext/pdo_mysql/mysql_statement.c if (mysql_stmt_execute(S->stmt)) { stmt 282 ext/pdo_mysql/mysql_statement.c pdo_mysql_error_stmt(stmt); stmt 293 ext/pdo_mysql/mysql_statement.c stmt->column_count = mysql_stmt_field_count(S->stmt); stmt 294 ext/pdo_mysql/mysql_statement.c for (i = 0; i < stmt->column_count; i++) { stmt 295 ext/pdo_mysql/mysql_statement.c mysqlnd_stmt_bind_one_result(S->stmt, i); stmt 298 ext/pdo_mysql/mysql_statement.c S->result = mysqlnd_stmt_result_metadata(S->stmt); stmt 303 ext/pdo_mysql/mysql_statement.c if (mysql_stmt_store_result(S->stmt)) { stmt 309 ext/pdo_mysql/mysql_statement.c pdo_mysql_stmt_set_row_count(stmt); stmt 315 ext/pdo_mysql/mysql_statement.c static int pdo_mysql_stmt_execute(pdo_stmt_t *stmt) /* {{{ */ stmt 317 ext/pdo_mysql/mysql_statement.c pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data; stmt 320 ext/pdo_mysql/mysql_statement.c PDO_DBG_INF_FMT("stmt=%p", S->stmt); stmt 322 ext/pdo_mysql/mysql_statement.c if (S->stmt) { stmt 323 ext/pdo_mysql/mysql_statement.c PDO_DBG_RETURN(pdo_mysql_stmt_execute_prepared(stmt)); stmt 332 ext/pdo_mysql/mysql_statement.c if (mysql_real_query(H->server, stmt->active_query_string, stmt->active_query_stringlen) != 0) { stmt 333 ext/pdo_mysql/mysql_statement.c pdo_mysql_error_stmt(stmt); stmt 337 ext/pdo_mysql/mysql_statement.c PDO_DBG_RETURN(pdo_mysql_fill_stmt_from_result(stmt)); stmt 341 ext/pdo_mysql/mysql_statement.c static int pdo_mysql_stmt_next_rowset(pdo_stmt_t *stmt) /* {{{ */ stmt 343 ext/pdo_mysql/mysql_statement.c pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data; stmt 349 ext/pdo_mysql/mysql_statement.c PDO_DBG_INF_FMT("stmt=%p", S->stmt); stmt 353 ext/pdo_mysql/mysql_statement.c if (!mysqlnd_stmt_more_results(S->stmt)) { stmt 356 ext/pdo_mysql/mysql_statement.c if (mysqlnd_stmt_next_result(S->stmt)) { stmt 360 ext/pdo_mysql/mysql_statement.c if (!mysqlnd_stmt_more_results(S->stmt)) { stmt 379 ext/pdo_mysql/mysql_statement.c stmt->column_count = mysql_stmt_field_count(S->stmt); stmt 380 ext/pdo_mysql/mysql_statement.c for (i = 0; i < stmt->column_count; i++) { stmt 381 ext/pdo_mysql/mysql_statement.c mysqlnd_stmt_bind_one_result(S->stmt, i); stmt 385 ext/pdo_mysql/mysql_statement.c S->result = mysqlnd_stmt_result_metadata(S->stmt); stmt 391 ext/pdo_mysql/mysql_statement.c if (mysql_stmt_store_result(S->stmt)) { stmt 396 ext/pdo_mysql/mysql_statement.c row_count = (zend_long) mysql_stmt_affected_rows(S->stmt); stmt 398 ext/pdo_mysql/mysql_statement.c stmt->row_count = row_count; stmt 406 ext/pdo_mysql/mysql_statement.c if (S->stmt) { stmt 408 ext/pdo_mysql/mysql_statement.c stmt->column_count = (int)mysql_num_fields(S->result); stmt 410 ext/pdo_mysql/mysql_statement.c mysql_stmt_free_result(S->stmt); stmt 424 ext/pdo_mysql/mysql_statement.c pdo_mysql_error_stmt(stmt); stmt 427 ext/pdo_mysql/mysql_statement.c PDO_DBG_RETURN(pdo_mysql_fill_stmt_from_result(stmt)); stmt 431 ext/pdo_mysql/mysql_statement.c pdo_mysql_error_stmt(stmt); stmt 434 ext/pdo_mysql/mysql_statement.c PDO_DBG_RETURN(pdo_mysql_fill_stmt_from_result(stmt)); stmt 453 ext/pdo_mysql/mysql_statement.c static int pdo_mysql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *param, enum pdo_param_event event_type) /* {{{ */ stmt 459 ext/pdo_mysql/mysql_statement.c pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data; stmt 462 ext/pdo_mysql/mysql_statement.c PDO_DBG_INF_FMT("stmt=%p", S->stmt); stmt 464 ext/pdo_mysql/mysql_statement.c if (S->stmt && param->is_param) { stmt 469 ext/pdo_mysql/mysql_statement.c strcpy(stmt->error_code, "HY093"); stmt 487 ext/pdo_mysql/mysql_statement.c strcpy(stmt->error_code, "HY093"); stmt 499 ext/pdo_mysql/mysql_statement.c mysqlnd_stmt_bind_one_param(S->stmt, param->paramno, parameter, MYSQL_TYPE_NULL); stmt 533 ext/pdo_mysql/mysql_statement.c pdo_raise_impl_error(stmt->dbh, stmt, "HY105", "Expected a stream resource"); stmt 553 ext/pdo_mysql/mysql_statement.c mysqlnd_stmt_bind_one_param(S->stmt, param->paramno, parameter, MYSQL_TYPE_VAR_STRING); stmt 557 ext/pdo_mysql/mysql_statement.c mysqlnd_stmt_bind_one_param(S->stmt, param->paramno, parameter, MYSQL_TYPE_LONGLONG); stmt 559 ext/pdo_mysql/mysql_statement.c mysqlnd_stmt_bind_one_param(S->stmt, param->paramno, parameter, MYSQL_TYPE_LONG); stmt 563 ext/pdo_mysql/mysql_statement.c mysqlnd_stmt_bind_one_param(S->stmt, param->paramno, parameter, MYSQL_TYPE_DOUBLE); stmt 613 ext/pdo_mysql/mysql_statement.c static int pdo_mysql_stmt_fetch(pdo_stmt_t *stmt, enum pdo_fetch_orientation ori, zend_long offset) /* {{{ */ stmt 615 ext/pdo_mysql/mysql_statement.c pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data; stmt 620 ext/pdo_mysql/mysql_statement.c PDO_DBG_INF_FMT("stmt=%p", S->stmt); stmt 621 ext/pdo_mysql/mysql_statement.c if (S->stmt) { stmt 622 ext/pdo_mysql/mysql_statement.c if (FAIL == mysqlnd_stmt_fetch(S->stmt, &fetched_anything) || fetched_anything == FALSE) { stmt 631 ext/pdo_mysql/mysql_statement.c if (S->stmt) { stmt 632 ext/pdo_mysql/mysql_statement.c ret = mysql_stmt_fetch(S->stmt); stmt 642 ext/pdo_mysql/mysql_statement.c pdo_mysql_error_stmt(stmt); stmt 652 ext/pdo_mysql/mysql_statement.c strcpy(stmt->error_code, "HY000"); stmt 656 ext/pdo_mysql/mysql_statement.c if (!S->stmt && S->current_data) { stmt 667 ext/pdo_mysql/mysql_statement.c pdo_mysql_error_stmt(stmt); stmt 677 ext/pdo_mysql/mysql_statement.c static int pdo_mysql_stmt_describe(pdo_stmt_t *stmt, int colno) /* {{{ */ stmt 679 ext/pdo_mysql/mysql_statement.c pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data; stmt 680 ext/pdo_mysql/mysql_statement.c struct pdo_column_data *cols = stmt->columns; stmt 684 ext/pdo_mysql/mysql_statement.c PDO_DBG_INF_FMT("stmt=%p", S->stmt); stmt 689 ext/pdo_mysql/mysql_statement.c if (colno >= stmt->column_count) { stmt 700 ext/pdo_mysql/mysql_statement.c for (i = 0; i < stmt->column_count; i++) { stmt 712 ext/pdo_mysql/mysql_statement.c if (S->stmt) { stmt 724 ext/pdo_mysql/mysql_statement.c static int pdo_mysql_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, size_t *len, int *caller_frees) /* {{{ */ stmt 726 ext/pdo_mysql/mysql_statement.c pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data; stmt 729 ext/pdo_mysql/mysql_statement.c PDO_DBG_INF_FMT("stmt=%p", S->stmt); stmt 735 ext/pdo_mysql/mysql_statement.c if (!S->stmt) { stmt 741 ext/pdo_mysql/mysql_statement.c if (colno >= stmt->column_count) { stmt 746 ext/pdo_mysql/mysql_statement.c if (S->stmt) { stmt 747 ext/pdo_mysql/mysql_statement.c Z_TRY_ADDREF(S->stmt->data->result_bind[colno].zv); stmt 748 ext/pdo_mysql/mysql_statement.c *ptr = (char*)&S->stmt->data->result_bind[colno].zv; stmt 753 ext/pdo_mysql/mysql_statement.c if (S->stmt) { stmt 762 ext/pdo_mysql/mysql_statement.c strcpy(stmt->error_code, "01004"); /* truncated */ stmt 825 ext/pdo_mysql/mysql_statement.c static int pdo_mysql_stmt_col_meta(pdo_stmt_t *stmt, zend_long colno, zval *return_value) /* {{{ */ stmt 827 ext/pdo_mysql/mysql_statement.c pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data; stmt 833 ext/pdo_mysql/mysql_statement.c PDO_DBG_INF_FMT("stmt=%p", S->stmt); stmt 837 ext/pdo_mysql/mysql_statement.c if (colno >= stmt->column_count) { stmt 895 ext/pdo_mysql/mysql_statement.c static int pdo_mysql_stmt_cursor_closer(pdo_stmt_t *stmt) /* {{{ */ stmt 897 ext/pdo_mysql/mysql_statement.c pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data; stmt 900 ext/pdo_mysql/mysql_statement.c PDO_DBG_INF_FMT("stmt=%p", S->stmt); stmt 905 ext/pdo_mysql/mysql_statement.c if (S->stmt) { stmt 907 ext/pdo_mysql/mysql_statement.c retval = mysql_stmt_free_result(S->stmt); stmt 135 ext/pdo_mysql/php_pdo_mysql_int.h MYSQLND_STMT *stmt; stmt 137 ext/pdo_mysql/php_pdo_mysql_int.h MYSQL_STMT *stmt; stmt 154 ext/pdo_mysql/php_pdo_mysql_int.h extern int _pdo_mysql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file, int line); stmt 156 ext/pdo_mysql/php_pdo_mysql_int.h #define pdo_mysql_error_stmt(s) _pdo_mysql_error(stmt->dbh, stmt, __FILE__, __LINE__) stmt 36 ext/pdo_oci/oci_driver.c static int pdo_oci_fetch_error_func(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval *info) /* {{{ */ stmt 43 ext/pdo_oci/oci_driver.c if (stmt) { stmt 44 ext/pdo_oci/oci_driver.c pdo_oci_stmt *S = (pdo_oci_stmt*)stmt->driver_data; stmt 60 ext/pdo_oci/oci_driver.c ub4 _oci_error(OCIError *err, pdo_dbh_t *dbh, pdo_stmt_t *stmt, char *what, sword status, int isinit, const char *file, int line) /* {{{ */ stmt 69 ext/pdo_oci/oci_driver.c if (stmt) { stmt 70 ext/pdo_oci/oci_driver.c S = (pdo_oci_stmt*)stmt->driver_data; stmt 72 ext/pdo_oci/oci_driver.c pdo_err = &stmt->error_code; stmt 176 ext/pdo_oci/oci_driver.c if (stmt) { stmt 185 ext/pdo_oci/oci_driver.c strcpy(dbh->error_code, stmt->error_code); stmt 251 ext/pdo_oci/oci_driver.c static int oci_handle_preparer(pdo_dbh_t *dbh, const char *sql, size_t sql_len, pdo_stmt_t *stmt, zval *driver_options) /* {{{ */ stmt 269 ext/pdo_oci/oci_driver.c stmt->supports_placeholders = PDO_PLACEHOLDER_NAMED; stmt 270 ext/pdo_oci/oci_driver.c ret = pdo_parse_params(stmt, (char*)sql, sql_len, &nsql, &nsql_len); stmt 278 ext/pdo_oci/oci_driver.c strcpy(dbh->error_code, stmt->error_code); stmt 284 ext/pdo_oci/oci_driver.c OCIHandleAlloc(H->env, (dvoid*)&S->stmt, OCI_HTYPE_STMT, 0, NULL); stmt 290 ext/pdo_oci/oci_driver.c H->last_err = OCIStmtPrepare(S->stmt, H->err, (text*)sql, (ub4) sql_len, OCI_NTV_SYNTAX, OCI_DEFAULT); stmt 297 ext/pdo_oci/oci_driver.c OCIHandleFree(S->stmt, OCI_HTYPE_STMT); stmt 306 ext/pdo_oci/oci_driver.c H->last_err = OCIAttrSet(S->stmt, OCI_HTYPE_STMT, &prefetch, 0, stmt 310 ext/pdo_oci/oci_driver.c H->last_err = OCIAttrSet(S->stmt, OCI_HTYPE_STMT, &prefetch, 0, stmt 314 ext/pdo_oci/oci_driver.c stmt->driver_data = S; stmt 315 ext/pdo_oci/oci_driver.c stmt->methods = &oci_stmt_methods; stmt 328 ext/pdo_oci/oci_driver.c OCIStmt *stmt; stmt 333 ext/pdo_oci/oci_driver.c OCIHandleAlloc(H->env, (dvoid*)&stmt, OCI_HTYPE_STMT, 0, NULL); stmt 335 ext/pdo_oci/oci_driver.c H->last_err = OCIStmtPrepare(stmt, H->err, (text*)sql, (ub4) sql_len, OCI_NTV_SYNTAX, OCI_DEFAULT); stmt 338 ext/pdo_oci/oci_driver.c OCIHandleFree(stmt, OCI_HTYPE_STMT); stmt 342 ext/pdo_oci/oci_driver.c H->last_err = OCIAttrGet(stmt, OCI_HTYPE_STMT, &stmt_type, 0, OCI_ATTR_STMT_TYPE, H->err); stmt 346 ext/pdo_oci/oci_driver.c OCIHandleFree(stmt, OCI_HTYPE_STMT); stmt 352 ext/pdo_oci/oci_driver.c H->last_err = OCIStmtExecute(H->svc, stmt, H->err, 1, 0, NULL, NULL, stmt 359 ext/pdo_oci/oci_driver.c H->last_err = OCIAttrGet(stmt, OCI_HTYPE_STMT, &rowcount, 0, OCI_ATTR_ROW_COUNT, H->err); stmt 363 ext/pdo_oci/oci_driver.c OCIHandleFree(stmt, OCI_HTYPE_STMT); stmt 39 ext/pdo_oci/oci_statement.c S->last_err = _oci_error(S->err, stmt->dbh, stmt, #name, S->last_err, FALSE, __FILE__, __LINE__); \ stmt 48 ext/pdo_oci/oci_statement.c S->last_err = _oci_error(S->err, stmt->dbh, stmt, #name ": " #msg, S->last_err, FALSE, __FILE__, __LINE__); \ stmt 54 ext/pdo_oci/oci_statement.c static php_stream *oci_create_lob_stream(zval *dbh, pdo_stmt_t *stmt, OCILobLocator *lob); stmt 65 ext/pdo_oci/oci_statement.c static int oci_stmt_dtor(pdo_stmt_t *stmt) /* {{{ */ stmt 67 ext/pdo_oci/oci_statement.c pdo_oci_stmt *S = (pdo_oci_stmt*)stmt->driver_data; stmt 68 ext/pdo_oci/oci_statement.c HashTable *BC = stmt->bound_columns; stmt 69 ext/pdo_oci/oci_statement.c HashTable *BP = stmt->bound_params; stmt 73 ext/pdo_oci/oci_statement.c if (S->stmt) { stmt 76 ext/pdo_oci/oci_statement.c OCIStmtFetch(S->stmt, S->err, 0, OCI_FETCH_NEXT, OCI_DEFAULT); stmt 79 ext/pdo_oci/oci_statement.c OCIHandleFree(S->stmt, OCI_HTYPE_STMT); stmt 80 ext/pdo_oci/oci_statement.c S->stmt = NULL; stmt 90 ext/pdo_oci/oci_statement.c FREE_HASHTABLE(stmt->bound_columns); stmt 91 ext/pdo_oci/oci_statement.c stmt->bound_columns = NULL; stmt 96 ext/pdo_oci/oci_statement.c FREE_HASHTABLE(stmt->bound_params); stmt 97 ext/pdo_oci/oci_statement.c stmt->bound_params = NULL; stmt 101 ext/pdo_oci/oci_statement.c pefree(S->einfo.errmsg, stmt->dbh->is_persistent); stmt 106 ext/pdo_oci/oci_statement.c for (i = 0; i < stmt->column_count; i++) { stmt 125 ext/pdo_oci/oci_statement.c stmt->driver_data = NULL; stmt 130 ext/pdo_oci/oci_statement.c static int oci_stmt_execute(pdo_stmt_t *stmt) /* {{{ */ stmt 132 ext/pdo_oci/oci_statement.c pdo_oci_stmt *S = (pdo_oci_stmt*)stmt->driver_data; stmt 138 ext/pdo_oci/oci_statement.c (S->stmt, OCI_HTYPE_STMT, &S->stmt_type, 0, OCI_ATTR_STMT_TYPE, S->err)); stmt 141 ext/pdo_oci/oci_statement.c if (stmt->executed) { stmt 143 ext/pdo_oci/oci_statement.c OCIStmtFetch(S->stmt, S->err, 0, OCI_FETCH_NEXT, OCI_DEFAULT); stmt 151 ext/pdo_oci/oci_statement.c if (stmt->dbh->auto_commit && !stmt->dbh->in_txn) { stmt 157 ext/pdo_oci/oci_statement.c STMT_CALL(OCIStmtExecute, (S->H->svc, S->stmt, S->err, stmt 161 ext/pdo_oci/oci_statement.c if (!stmt->executed) { stmt 167 ext/pdo_oci/oci_statement.c (S->stmt, OCI_HTYPE_STMT, &colcount, 0, OCI_ATTR_PARAM_COUNT, S->err)); stmt 169 ext/pdo_oci/oci_statement.c stmt->column_count = (int)colcount; stmt 173 ext/pdo_oci/oci_statement.c for (i = 0; i < stmt->column_count; i++) { stmt 192 ext/pdo_oci/oci_statement.c (S->stmt, OCI_HTYPE_STMT, &rowcount, 0, OCI_ATTR_ROW_COUNT, S->err)); stmt 193 ext/pdo_oci/oci_statement.c stmt->row_count = (long)rowcount; stmt 281 ext/pdo_oci/oci_statement.c static int oci_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *param, enum pdo_param_event event_type) /* {{{ */ stmt 283 ext/pdo_oci/oci_statement.c pdo_oci_stmt *S = (pdo_oci_stmt*)stmt->driver_data; stmt 344 ext/pdo_oci/oci_statement.c STMT_CALL(OCIBindByName, (S->stmt, stmt 350 ext/pdo_oci/oci_statement.c STMT_CALL(OCIBindByPos, (S->stmt, stmt 397 ext/pdo_oci/oci_statement.c stm = oci_create_lob_stream(&stmt->database_object_handle, stmt, (OCILobLocator*)P->thing); stmt 462 ext/pdo_oci/oci_statement.c static int oci_stmt_fetch(pdo_stmt_t *stmt, enum pdo_fetch_orientation ori, zend_long offset) /* {{{ */ stmt 467 ext/pdo_oci/oci_statement.c pdo_oci_stmt *S = (pdo_oci_stmt*)stmt->driver_data; stmt 478 ext/pdo_oci/oci_statement.c S->last_err = OCIStmtFetch2(S->stmt, S->err, 1, ociori, (sb4) offset, OCI_DEFAULT); stmt 480 ext/pdo_oci/oci_statement.c S->last_err = OCIStmtFetch(S->stmt, S->err, 1, OCI_FETCH_NEXT, OCI_DEFAULT); stmt 525 ext/pdo_oci/oci_statement.c static int oci_stmt_describe(pdo_stmt_t *stmt, int colno) /* {{{ */ stmt 527 ext/pdo_oci/oci_statement.c pdo_oci_stmt *S = (pdo_oci_stmt*)stmt->driver_data; stmt 532 ext/pdo_oci/oci_statement.c struct pdo_column_data *col = &stmt->columns[colno]; stmt 536 ext/pdo_oci/oci_statement.c STMT_CALL(OCIParamGet, (S->stmt, OCI_HTYPE_STMT, S->err, (dvoid*)¶m, colno+1)); stmt 615 ext/pdo_oci/oci_statement.c STMT_CALL(OCIDefineByPos, (S->stmt, &S->cols[colno].def, S->err, colno+1, stmt 635 ext/pdo_oci/oci_statement.c pdo_stmt_t *stmt; stmt 687 ext/pdo_oci/oci_statement.c pdo_stmt_t *stmt = self->stmt; stmt 690 ext/pdo_oci/oci_statement.c zend_object *obj = &stmt->std; stmt 734 ext/pdo_oci/oci_statement.c static php_stream *oci_create_lob_stream(zval *dbh, pdo_stmt_t *stmt, OCILobLocator *lob) stmt 742 ext/pdo_oci/oci_statement.c self->stmt = stmt; stmt 743 ext/pdo_oci/oci_statement.c self->S = (pdo_oci_stmt*)stmt->driver_data; stmt 752 ext/pdo_oci/oci_statement.c obj = &stmt->std; stmt 762 ext/pdo_oci/oci_statement.c static int oci_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, size_t *len, int *caller_frees) /* {{{ */ stmt 764 ext/pdo_oci/oci_statement.c pdo_oci_stmt *S = (pdo_oci_stmt*)stmt->driver_data; stmt 778 ext/pdo_oci/oci_statement.c *ptr = (char*)oci_create_lob_stream(&stmt->database_object_handle, stmt, (OCILobLocator*)C->data); stmt 63 ext/pdo_oci/php_pdo_oci_int.h OCIStmt *stmt; stmt 90 ext/pdo_oci/php_pdo_oci_int.h ub4 _oci_error(OCIError *err, pdo_dbh_t *dbh, pdo_stmt_t *stmt, char *what, sword status, int isinit, const char *file, int line); stmt 93 ext/pdo_oci/php_pdo_oci_int.h #define oci_stmt_error(w) _oci_error(S->err, stmt->dbh, stmt, w, S->last_err, FALSE, __FILE__, __LINE__) stmt 34 ext/pdo_odbc/odbc_driver.c static int pdo_odbc_fetch_error_func(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval *info) stmt 41 ext/pdo_odbc/odbc_driver.c if (stmt) { stmt 42 ext/pdo_odbc/odbc_driver.c S = (pdo_odbc_stmt*)stmt->driver_data; stmt 59 ext/pdo_odbc/odbc_driver.c void pdo_odbc_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, PDO_ODBC_HSTMT statement, char *what, const char *file, int line) /* {{{ */ stmt 70 ext/pdo_odbc/odbc_driver.c if (stmt) { stmt 71 ext/pdo_odbc/odbc_driver.c S = (pdo_odbc_stmt*)stmt->driver_data; stmt 74 ext/pdo_odbc/odbc_driver.c pdo_err = &stmt->error_code; stmt 78 ext/pdo_odbc/odbc_driver.c statement = S->stmt; stmt 145 ext/pdo_odbc/odbc_driver.c static int odbc_handle_preparer(pdo_dbh_t *dbh, const char *sql, size_t sql_len, pdo_stmt_t *stmt, zval *driver_options) stmt 160 ext/pdo_odbc/odbc_driver.c stmt->supports_placeholders = PDO_PLACEHOLDER_POSITIONAL; stmt 161 ext/pdo_odbc/odbc_driver.c ret = pdo_parse_params(stmt, (char*)sql, sql_len, &nsql, &nsql_len); stmt 168 ext/pdo_odbc/odbc_driver.c strcpy(dbh->error_code, stmt->error_code); stmt 173 ext/pdo_odbc/odbc_driver.c rc = SQLAllocHandle(SQL_HANDLE_STMT, H->dbc, &S->stmt); stmt 186 ext/pdo_odbc/odbc_driver.c rc = SQLSetStmtAttr(S->stmt, SQL_ATTR_CURSOR_SCROLLABLE, (void*)SQL_SCROLLABLE, 0); stmt 189 ext/pdo_odbc/odbc_driver.c SQLFreeHandle(SQL_HANDLE_STMT, S->stmt); stmt 197 ext/pdo_odbc/odbc_driver.c rc = SQLPrepare(S->stmt, (char*)sql, SQL_NTS); stmt 202 ext/pdo_odbc/odbc_driver.c stmt->driver_data = S; stmt 203 ext/pdo_odbc/odbc_driver.c stmt->methods = &odbc_stmt_methods; stmt 213 ext/pdo_odbc/odbc_driver.c strcpy(dbh->error_code, stmt->error_code); stmt 228 ext/pdo_odbc/odbc_driver.c PDO_ODBC_HSTMT stmt; stmt 230 ext/pdo_odbc/odbc_driver.c rc = SQLAllocHandle(SQL_HANDLE_STMT, H->dbc, &stmt); stmt 236 ext/pdo_odbc/odbc_driver.c rc = SQLExecDirect(stmt, (char *)sql, sql_len); stmt 251 ext/pdo_odbc/odbc_driver.c rc = SQLRowCount(stmt, &row_count); stmt 260 ext/pdo_odbc/odbc_driver.c SQLFreeHandle(SQL_HANDLE_STMT, stmt); stmt 60 ext/pdo_odbc/odbc_stmt.c static int pdo_odbc_utf82ucs2(pdo_stmt_t *stmt, int is_unicode, const char *buf, stmt 65 ext/pdo_odbc/odbc_stmt.c pdo_odbc_stmt *S = (pdo_odbc_stmt*)stmt->driver_data; stmt 95 ext/pdo_odbc/odbc_stmt.c static int pdo_odbc_ucs22utf8(pdo_stmt_t *stmt, int is_unicode, const char *buf, stmt 100 ext/pdo_odbc/odbc_stmt.c pdo_odbc_stmt *S = (pdo_odbc_stmt*)stmt->driver_data; stmt 126 ext/pdo_odbc/odbc_stmt.c static void free_cols(pdo_stmt_t *stmt, pdo_odbc_stmt *S) stmt 131 ext/pdo_odbc/odbc_stmt.c for (i = 0; i < stmt->column_count; i++) { stmt 141 ext/pdo_odbc/odbc_stmt.c static int odbc_stmt_dtor(pdo_stmt_t *stmt) stmt 143 ext/pdo_odbc/odbc_stmt.c pdo_odbc_stmt *S = (pdo_odbc_stmt*)stmt->driver_data; stmt 145 ext/pdo_odbc/odbc_stmt.c if (S->stmt != SQL_NULL_HANDLE) { stmt 146 ext/pdo_odbc/odbc_stmt.c if (stmt->executed) { stmt 147 ext/pdo_odbc/odbc_stmt.c SQLCloseCursor(S->stmt); stmt 149 ext/pdo_odbc/odbc_stmt.c SQLFreeHandle(SQL_HANDLE_STMT, S->stmt); stmt 150 ext/pdo_odbc/odbc_stmt.c S->stmt = SQL_NULL_HANDLE; stmt 153 ext/pdo_odbc/odbc_stmt.c free_cols(stmt, S); stmt 162 ext/pdo_odbc/odbc_stmt.c static int odbc_stmt_execute(pdo_stmt_t *stmt) stmt 165 ext/pdo_odbc/odbc_stmt.c pdo_odbc_stmt *S = (pdo_odbc_stmt*)stmt->driver_data; stmt 169 ext/pdo_odbc/odbc_stmt.c if (stmt->executed) { stmt 170 ext/pdo_odbc/odbc_stmt.c SQLCloseCursor(S->stmt); stmt 173 ext/pdo_odbc/odbc_stmt.c rc = SQLExecute(S->stmt); stmt 178 ext/pdo_odbc/odbc_stmt.c rc = SQLParamData(S->stmt, (SQLPOINTER*)¶m); stmt 196 ext/pdo_odbc/odbc_stmt.c switch (pdo_odbc_utf82ucs2(stmt, P->is_unicode, stmt 201 ext/pdo_odbc/odbc_stmt.c SQLPutData(S->stmt, Z_STRVAL_P(parameter), stmt 205 ext/pdo_odbc/odbc_stmt.c SQLPutData(S->stmt, S->convbuf, ulen); stmt 209 ext/pdo_odbc/odbc_stmt.c SQLCloseCursor(S->stmt); stmt 225 ext/pdo_odbc/odbc_stmt.c SQLCloseCursor(S->stmt); stmt 242 ext/pdo_odbc/odbc_stmt.c SQLPutData(S->stmt, buf, len); stmt 264 ext/pdo_odbc/odbc_stmt.c SQLRowCount(S->stmt, &row_count); stmt 265 ext/pdo_odbc/odbc_stmt.c stmt->row_count = row_count; stmt 267 ext/pdo_odbc/odbc_stmt.c if (!stmt->executed) { stmt 272 ext/pdo_odbc/odbc_stmt.c SQLNumResultCols(S->stmt, &colcount); stmt 274 ext/pdo_odbc/odbc_stmt.c stmt->column_count = (int)colcount; stmt 282 ext/pdo_odbc/odbc_stmt.c static int odbc_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *param, stmt 285 ext/pdo_odbc/odbc_stmt.c pdo_odbc_stmt *S = (pdo_odbc_stmt*)stmt->driver_data; stmt 323 ext/pdo_odbc/odbc_stmt.c rc = SQLDescribeParam(S->stmt, (SQLUSMALLINT) param->paramno+1, &sqltype, &precision, &scale, &nullable); stmt 380 ext/pdo_odbc/odbc_stmt.c rc = SQLBindParameter(S->stmt, (SQLUSMALLINT) param->paramno+1, stmt 462 ext/pdo_odbc/odbc_stmt.c switch (pdo_odbc_utf82ucs2(stmt, P->is_unicode, stmt 502 ext/pdo_odbc/odbc_stmt.c switch (pdo_odbc_ucs22utf8(stmt, P->is_unicode, P->outbuf, P->len, &ulen)) { stmt 526 ext/pdo_odbc/odbc_stmt.c static int odbc_stmt_fetch(pdo_stmt_t *stmt, stmt 531 ext/pdo_odbc/odbc_stmt.c pdo_odbc_stmt *S = (pdo_odbc_stmt*)stmt->driver_data; stmt 541 ext/pdo_odbc/odbc_stmt.c strcpy(stmt->error_code, "HY106"); stmt 544 ext/pdo_odbc/odbc_stmt.c rc = SQLFetchScroll(S->stmt, odbcori, offset); stmt 564 ext/pdo_odbc/odbc_stmt.c static int odbc_stmt_describe(pdo_stmt_t *stmt, int colno) stmt 566 ext/pdo_odbc/odbc_stmt.c pdo_odbc_stmt *S = (pdo_odbc_stmt*)stmt->driver_data; stmt 567 ext/pdo_odbc/odbc_stmt.c struct pdo_column_data *col = &stmt->columns[colno]; stmt 573 ext/pdo_odbc/odbc_stmt.c rc = SQLDescribeCol(S->stmt, colno+1, S->cols[colno].colname, stmt 584 ext/pdo_odbc/odbc_stmt.c rc = SQLColAttribute(S->stmt, colno+1, stmt 610 ext/pdo_odbc/odbc_stmt.c rc = SQLBindCol(S->stmt, colno+1, stmt 630 ext/pdo_odbc/odbc_stmt.c static int odbc_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, zend_ulong *len, int *caller_frees) stmt 632 ext/pdo_odbc/odbc_stmt.c pdo_odbc_stmt *S = (pdo_odbc_stmt*)stmt->driver_data; stmt 646 ext/pdo_odbc/odbc_stmt.c rc = SQLGetData(S->stmt, colno+1, C->is_unicode ? SQL_C_BINARY : SQL_C_CHAR, C->data, stmt 673 ext/pdo_odbc/odbc_stmt.c rc = SQLGetData(S->stmt, colno+1, SQL_C_CHAR, buf2, 256, &C->fetched_len); stmt 737 ext/pdo_odbc/odbc_stmt.c switch (pdo_odbc_ucs22utf8(stmt, C->is_unicode, *ptr, *len, &ulen)) { stmt 757 ext/pdo_odbc/odbc_stmt.c static int odbc_stmt_set_param(pdo_stmt_t *stmt, zend_long attr, zval *val) stmt 760 ext/pdo_odbc/odbc_stmt.c pdo_odbc_stmt *S = (pdo_odbc_stmt*)stmt->driver_data; stmt 765 ext/pdo_odbc/odbc_stmt.c rc = SQLSetCursorName(S->stmt, Z_STRVAL_P(val), Z_STRLEN_P(val)); stmt 784 ext/pdo_odbc/odbc_stmt.c static int odbc_stmt_get_attr(pdo_stmt_t *stmt, zend_long attr, zval *val) stmt 787 ext/pdo_odbc/odbc_stmt.c pdo_odbc_stmt *S = (pdo_odbc_stmt*)stmt->driver_data; stmt 794 ext/pdo_odbc/odbc_stmt.c rc = SQLGetCursorName(S->stmt, buf, sizeof(buf), &len); stmt 816 ext/pdo_odbc/odbc_stmt.c static int odbc_stmt_next_rowset(pdo_stmt_t *stmt) stmt 820 ext/pdo_odbc/odbc_stmt.c pdo_odbc_stmt *S = (pdo_odbc_stmt*)stmt->driver_data; stmt 825 ext/pdo_odbc/odbc_stmt.c rc = SQLMoreResults(S->stmt); stmt 831 ext/pdo_odbc/odbc_stmt.c free_cols(stmt, S); stmt 833 ext/pdo_odbc/odbc_stmt.c SQLNumResultCols(S->stmt, &colcount); stmt 834 ext/pdo_odbc/odbc_stmt.c stmt->column_count = (int)colcount; stmt 148 ext/pdo_odbc/php_pdo_odbc_int.h PDO_ODBC_HSTMT stmt; stmt 170 ext/pdo_odbc/php_pdo_odbc_int.h void pdo_odbc_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, PDO_ODBC_HSTMT statement, char *what, const char *file, int line); stmt 172 ext/pdo_odbc/php_pdo_odbc_int.h #define pdo_odbc_stmt_error(what) pdo_odbc_error(stmt->dbh, stmt, SQL_NULL_HSTMT, what, __FILE__, __LINE__) stmt 173 ext/pdo_odbc/php_pdo_odbc_int.h #define pdo_odbc_doer_error(what) pdo_odbc_error(dbh, NULL, stmt, what, __FILE__, __LINE__) stmt 77 ext/pdo_pgsql/pgsql_driver.c int _pdo_pgsql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, int errcode, const char *sqlstate, const char *msg, const char *file, int line) /* {{{ */ stmt 80 ext/pdo_pgsql/pgsql_driver.c pdo_error_type *pdo_err = stmt ? &stmt->error_code : &dbh->error_code; stmt 122 ext/pdo_pgsql/pgsql_driver.c static int pdo_pgsql_fetch_error_func(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval *info) /* {{{ */ stmt 233 ext/pdo_pgsql/pgsql_driver.c static int pgsql_handle_preparer(pdo_dbh_t *dbh, const char *sql, size_t sql_len, pdo_stmt_t *stmt, zval *driver_options) stmt 245 ext/pdo_pgsql/pgsql_driver.c stmt->driver_data = S; stmt 246 ext/pdo_pgsql/pgsql_driver.c stmt->methods = &pgsql_stmt_methods; stmt 270 ext/pdo_pgsql/pgsql_driver.c stmt->supports_placeholders = PDO_PLACEHOLDER_NAMED; stmt 271 ext/pdo_pgsql/pgsql_driver.c stmt->named_rewrite_template = "$%d"; stmt 272 ext/pdo_pgsql/pgsql_driver.c ret = pdo_parse_params(stmt, (char*)sql, sql_len, &nsql, &nsql_len); stmt 279 ext/pdo_pgsql/pgsql_driver.c strcpy(dbh->error_code, stmt->error_code); stmt 298 ext/pdo_pgsql/pgsql_driver.c stmt->supports_placeholders = PDO_PLACEHOLDER_NONE; stmt 47 ext/pdo_pgsql/pgsql_statement.c static int pgsql_stmt_dtor(pdo_stmt_t *stmt) stmt 49 ext/pdo_pgsql/pgsql_statement.c pdo_pgsql_stmt *S = (pdo_pgsql_stmt*)stmt->driver_data; stmt 112 ext/pdo_pgsql/pgsql_statement.c stmt->driver_data = NULL; stmt 116 ext/pdo_pgsql/pgsql_statement.c static int pgsql_stmt_execute(pdo_stmt_t *stmt) stmt 118 ext/pdo_pgsql/pgsql_statement.c pdo_pgsql_stmt *S = (pdo_pgsql_stmt*)stmt->driver_data; stmt 139 ext/pdo_pgsql/pgsql_statement.c spprintf(&q, 0, "DECLARE %s SCROLL CURSOR WITH HOLD FOR %s", S->cursor_name, stmt->active_query_string); stmt 146 ext/pdo_pgsql/pgsql_statement.c pdo_pgsql_error_stmt(stmt, status, pdo_pgsql_sqlstate(S->result)); stmt 165 ext/pdo_pgsql/pgsql_statement.c stmt->bound_params ? zend_hash_num_elements(stmt->bound_params) : 0, stmt 193 ext/pdo_pgsql/pgsql_statement.c pdo_pgsql_error_stmt(stmt, status, sqlstate); stmt 200 ext/pdo_pgsql/pgsql_statement.c stmt->bound_params ? stmt 201 ext/pdo_pgsql/pgsql_statement.c zend_hash_num_elements(stmt->bound_params) : stmt 207 ext/pdo_pgsql/pgsql_statement.c } else if (stmt->supports_placeholders == PDO_PLACEHOLDER_NAMED) { stmt 210 ext/pdo_pgsql/pgsql_statement.c stmt->bound_params ? zend_hash_num_elements(stmt->bound_params) : 0, stmt 218 ext/pdo_pgsql/pgsql_statement.c S->result = PQexec(H->server, stmt->active_query_string); stmt 223 ext/pdo_pgsql/pgsql_statement.c pdo_pgsql_error_stmt(stmt, status, pdo_pgsql_sqlstate(S->result)); stmt 227 ext/pdo_pgsql/pgsql_statement.c if (!stmt->executed && (!stmt->column_count || S->cols == NULL)) { stmt 228 ext/pdo_pgsql/pgsql_statement.c stmt->column_count = (int) PQnfields(S->result); stmt 229 ext/pdo_pgsql/pgsql_statement.c S->cols = ecalloc(stmt->column_count, sizeof(pdo_pgsql_column)); stmt 233 ext/pdo_pgsql/pgsql_statement.c ZEND_ATOL(stmt->row_count, PQcmdTuples(S->result)); stmt 236 ext/pdo_pgsql/pgsql_statement.c stmt->row_count = (zend_long)PQntuples(S->result); stmt 242 ext/pdo_pgsql/pgsql_statement.c static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *param, stmt 245 ext/pdo_pgsql/pgsql_statement.c pdo_pgsql_stmt *S = (pdo_pgsql_stmt*)stmt->driver_data; stmt 247 ext/pdo_pgsql/pgsql_statement.c if (stmt->supports_placeholders == PDO_PLACEHOLDER_NAMED && param->is_param) { stmt 264 ext/pdo_pgsql/pgsql_statement.c if (stmt->bound_param_map && (namevar = zend_hash_find_ptr(stmt->bound_param_map, stmt 269 ext/pdo_pgsql/pgsql_statement.c pdo_raise_impl_error(stmt->dbh, stmt, "HY093", ZSTR_VAL(param->name)); stmt 284 ext/pdo_pgsql/pgsql_statement.c if (!stmt->bound_param_map) { stmt 289 ext/pdo_pgsql/pgsql_statement.c zend_hash_num_elements(stmt->bound_param_map), stmt 292 ext/pdo_pgsql/pgsql_statement.c zend_hash_num_elements(stmt->bound_param_map), stmt 295 ext/pdo_pgsql/pgsql_statement.c zend_hash_num_elements(stmt->bound_param_map), stmt 298 ext/pdo_pgsql/pgsql_statement.c zend_hash_num_elements(stmt->bound_param_map), stmt 304 ext/pdo_pgsql/pgsql_statement.c if (param->paramno >= zend_hash_num_elements(stmt->bound_params)) { stmt 305 ext/pdo_pgsql/pgsql_statement.c pdo_raise_impl_error(stmt->dbh, stmt, "HY093", "parameter was not defined"); stmt 345 ext/pdo_pgsql/pgsql_statement.c pdo_pgsql_error_stmt(stmt, PGRES_FATAL_ERROR, "HY105"); stmt 388 ext/pdo_pgsql/pgsql_statement.c static int pgsql_stmt_fetch(pdo_stmt_t *stmt, stmt 391 ext/pdo_pgsql/pgsql_statement.c pdo_pgsql_stmt *S = (pdo_pgsql_stmt*)stmt->driver_data; stmt 416 ext/pdo_pgsql/pgsql_statement.c pdo_pgsql_error_stmt(stmt, status, pdo_pgsql_sqlstate(S->result)); stmt 427 ext/pdo_pgsql/pgsql_statement.c if (S->current_row < stmt->row_count) { stmt 436 ext/pdo_pgsql/pgsql_statement.c static int pgsql_stmt_describe(pdo_stmt_t *stmt, int colno) stmt 438 ext/pdo_pgsql/pgsql_statement.c pdo_pgsql_stmt *S = (pdo_pgsql_stmt*)stmt->driver_data; stmt 439 ext/pdo_pgsql/pgsql_statement.c struct pdo_column_data *cols = stmt->columns; stmt 461 ext/pdo_pgsql/pgsql_statement.c if (stmt->bound_columns && ( stmt 462 ext/pdo_pgsql/pgsql_statement.c (param = zend_hash_index_find_ptr(stmt->bound_columns, colno)) != NULL || stmt 463 ext/pdo_pgsql/pgsql_statement.c (param = zend_hash_find_ptr(stmt->bound_columns, cols[colno].name)) != NULL)) { stmt 497 ext/pdo_pgsql/pgsql_statement.c static int pgsql_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, zend_ulong *len, int *caller_frees ) stmt 499 ext/pdo_pgsql/pgsql_statement.c pdo_pgsql_stmt *S = (pdo_pgsql_stmt*)stmt->driver_data; stmt 500 ext/pdo_pgsql/pgsql_statement.c struct pdo_column_data *cols = stmt->columns; stmt 536 ext/pdo_pgsql/pgsql_statement.c *ptr = (char*)pdo_pgsql_create_lob_stream(&stmt->database_object_handle, loid, oid); stmt 576 ext/pdo_pgsql/pgsql_statement.c static int pgsql_stmt_get_column_meta(pdo_stmt_t *stmt, zend_long colno, zval *return_value) stmt 578 ext/pdo_pgsql/pgsql_statement.c pdo_pgsql_stmt *S = (pdo_pgsql_stmt*)stmt->driver_data; stmt 587 ext/pdo_pgsql/pgsql_statement.c if (colno >= stmt->column_count) { stmt 619 ext/pdo_pgsql/pgsql_statement.c static int pdo_pgsql_stmt_cursor_closer(pdo_stmt_t *stmt) stmt 621 ext/pdo_pgsql/pgsql_statement.c pdo_pgsql_stmt *S = (pdo_pgsql_stmt*)stmt->driver_data; stmt 82 ext/pdo_pgsql/php_pdo_pgsql_int.h extern int _pdo_pgsql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, int errcode, const char *sqlstate, const char *msg, const char *file, int line); stmt 66 ext/pdo_sqlite/php_pdo_sqlite_int.h sqlite3_stmt *stmt; stmt 73 ext/pdo_sqlite/php_pdo_sqlite_int.h extern int _pdo_sqlite_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file, int line); stmt 75 ext/pdo_sqlite/php_pdo_sqlite_int.h #define pdo_sqlite_error_stmt(s) _pdo_sqlite_error(stmt->dbh, stmt, __FILE__, __LINE__) stmt 34 ext/pdo_sqlite/sqlite_driver.c int _pdo_sqlite_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file, int line) /* {{{ */ stmt 37 ext/pdo_sqlite/sqlite_driver.c pdo_error_type *pdo_err = stmt ? &stmt->error_code : &dbh->error_code; stmt 89 ext/pdo_sqlite/sqlite_driver.c static int pdo_sqlite_fetch_error_func(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval *info) stmt 178 ext/pdo_sqlite/sqlite_driver.c static int sqlite_handle_preparer(pdo_dbh_t *dbh, const char *sql, size_t sql_len, pdo_stmt_t *stmt, zval *driver_options) stmt 186 ext/pdo_sqlite/sqlite_driver.c stmt->driver_data = S; stmt 187 ext/pdo_sqlite/sqlite_driver.c stmt->methods = &sqlite_stmt_methods; stmt 188 ext/pdo_sqlite/sqlite_driver.c stmt->supports_placeholders = PDO_PLACEHOLDER_POSITIONAL|PDO_PLACEHOLDER_NAMED; stmt 196 ext/pdo_sqlite/sqlite_driver.c i = sqlite3_prepare(H->db, sql, sql_len, &S->stmt, &tail); stmt 34 ext/pdo_sqlite/sqlite_statement.c static int pdo_sqlite_stmt_dtor(pdo_stmt_t *stmt) stmt 36 ext/pdo_sqlite/sqlite_statement.c pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt->driver_data; stmt 38 ext/pdo_sqlite/sqlite_statement.c if (S->stmt) { stmt 39 ext/pdo_sqlite/sqlite_statement.c sqlite3_finalize(S->stmt); stmt 40 ext/pdo_sqlite/sqlite_statement.c S->stmt = NULL; stmt 46 ext/pdo_sqlite/sqlite_statement.c static int pdo_sqlite_stmt_execute(pdo_stmt_t *stmt) stmt 48 ext/pdo_sqlite/sqlite_statement.c pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt->driver_data; stmt 50 ext/pdo_sqlite/sqlite_statement.c if (stmt->executed && !S->done) { stmt 51 ext/pdo_sqlite/sqlite_statement.c sqlite3_reset(S->stmt); stmt 55 ext/pdo_sqlite/sqlite_statement.c switch (sqlite3_step(S->stmt)) { stmt 58 ext/pdo_sqlite/sqlite_statement.c stmt->column_count = sqlite3_data_count(S->stmt); stmt 62 ext/pdo_sqlite/sqlite_statement.c stmt->column_count = sqlite3_column_count(S->stmt); stmt 63 ext/pdo_sqlite/sqlite_statement.c stmt->row_count = sqlite3_changes(S->H->db); stmt 64 ext/pdo_sqlite/sqlite_statement.c sqlite3_reset(S->stmt); stmt 69 ext/pdo_sqlite/sqlite_statement.c sqlite3_reset(S->stmt); stmt 73 ext/pdo_sqlite/sqlite_statement.c pdo_sqlite_error_stmt(stmt); stmt 78 ext/pdo_sqlite/sqlite_statement.c static int pdo_sqlite_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *param, stmt 81 ext/pdo_sqlite/sqlite_statement.c pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt->driver_data; stmt 86 ext/pdo_sqlite/sqlite_statement.c if (stmt->executed && !S->done) { stmt 87 ext/pdo_sqlite/sqlite_statement.c sqlite3_reset(S->stmt); stmt 94 ext/pdo_sqlite/sqlite_statement.c param->paramno = sqlite3_bind_parameter_index(S->stmt, ZSTR_VAL(param->name)) - 1; stmt 102 ext/pdo_sqlite/sqlite_statement.c if (sqlite3_bind_null(S->stmt, param->paramno + 1) == SQLITE_OK) { stmt 105 ext/pdo_sqlite/sqlite_statement.c pdo_sqlite_error_stmt(stmt); stmt 116 ext/pdo_sqlite/sqlite_statement.c if (sqlite3_bind_null(S->stmt, param->paramno + 1) == SQLITE_OK) { stmt 122 ext/pdo_sqlite/sqlite_statement.c if (SQLITE_OK == sqlite3_bind_int64(S->stmt, param->paramno + 1, Z_LVAL_P(parameter))) { stmt 126 ext/pdo_sqlite/sqlite_statement.c if (SQLITE_OK == sqlite3_bind_int(S->stmt, param->paramno + 1, Z_LVAL_P(parameter))) { stmt 131 ext/pdo_sqlite/sqlite_statement.c pdo_sqlite_error_stmt(stmt); stmt 148 ext/pdo_sqlite/sqlite_statement.c pdo_raise_impl_error(stmt->dbh, stmt, "HY105", "Expected a stream resource"); stmt 152 ext/pdo_sqlite/sqlite_statement.c if (sqlite3_bind_null(S->stmt, param->paramno + 1) == SQLITE_OK) { stmt 155 ext/pdo_sqlite/sqlite_statement.c pdo_sqlite_error_stmt(stmt); stmt 161 ext/pdo_sqlite/sqlite_statement.c if (SQLITE_OK == sqlite3_bind_blob(S->stmt, param->paramno + 1, stmt 177 ext/pdo_sqlite/sqlite_statement.c if (sqlite3_bind_null(S->stmt, param->paramno + 1) == SQLITE_OK) { stmt 182 ext/pdo_sqlite/sqlite_statement.c if (SQLITE_OK == sqlite3_bind_text(S->stmt, param->paramno + 1, stmt 189 ext/pdo_sqlite/sqlite_statement.c pdo_sqlite_error_stmt(stmt); stmt 201 ext/pdo_sqlite/sqlite_statement.c static int pdo_sqlite_stmt_fetch(pdo_stmt_t *stmt, stmt 204 ext/pdo_sqlite/sqlite_statement.c pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt->driver_data; stmt 206 ext/pdo_sqlite/sqlite_statement.c if (!S->stmt) { stmt 216 ext/pdo_sqlite/sqlite_statement.c i = sqlite3_step(S->stmt); stmt 223 ext/pdo_sqlite/sqlite_statement.c sqlite3_reset(S->stmt); stmt 227 ext/pdo_sqlite/sqlite_statement.c sqlite3_reset(S->stmt); stmt 229 ext/pdo_sqlite/sqlite_statement.c pdo_sqlite_error_stmt(stmt); stmt 234 ext/pdo_sqlite/sqlite_statement.c static int pdo_sqlite_stmt_describe(pdo_stmt_t *stmt, int colno) stmt 236 ext/pdo_sqlite/sqlite_statement.c pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt->driver_data; stmt 239 ext/pdo_sqlite/sqlite_statement.c if(colno >= sqlite3_column_count(S->stmt)) { stmt 241 ext/pdo_sqlite/sqlite_statement.c pdo_sqlite_error_stmt(stmt); stmt 245 ext/pdo_sqlite/sqlite_statement.c str = sqlite3_column_name(S->stmt, colno); stmt 246 ext/pdo_sqlite/sqlite_statement.c stmt->columns[colno].name = zend_string_init(str, strlen(str), 0); stmt 247 ext/pdo_sqlite/sqlite_statement.c stmt->columns[colno].maxlen = 0xffffffff; stmt 248 ext/pdo_sqlite/sqlite_statement.c stmt->columns[colno].precision = 0; stmt 250 ext/pdo_sqlite/sqlite_statement.c switch (sqlite3_column_type(S->stmt, colno)) { stmt 257 ext/pdo_sqlite/sqlite_statement.c stmt->columns[colno].param_type = PDO_PARAM_STR; stmt 264 ext/pdo_sqlite/sqlite_statement.c static int pdo_sqlite_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, zend_ulong *len, int *caller_frees) stmt 266 ext/pdo_sqlite/sqlite_statement.c pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt->driver_data; stmt 267 ext/pdo_sqlite/sqlite_statement.c if (!S->stmt) { stmt 270 ext/pdo_sqlite/sqlite_statement.c if(colno >= sqlite3_data_count(S->stmt)) { stmt 272 ext/pdo_sqlite/sqlite_statement.c pdo_sqlite_error_stmt(stmt); stmt 275 ext/pdo_sqlite/sqlite_statement.c switch (sqlite3_column_type(S->stmt, colno)) { stmt 282 ext/pdo_sqlite/sqlite_statement.c *ptr = (char*)sqlite3_column_blob(S->stmt, colno); stmt 283 ext/pdo_sqlite/sqlite_statement.c *len = sqlite3_column_bytes(S->stmt, colno); stmt 287 ext/pdo_sqlite/sqlite_statement.c *ptr = (char*)sqlite3_column_text(S->stmt, colno); stmt 288 ext/pdo_sqlite/sqlite_statement.c *len = sqlite3_column_bytes(S->stmt, colno); stmt 293 ext/pdo_sqlite/sqlite_statement.c static int pdo_sqlite_stmt_col_meta(pdo_stmt_t *stmt, zend_long colno, zval *return_value) stmt 295 ext/pdo_sqlite/sqlite_statement.c pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt->driver_data; stmt 299 ext/pdo_sqlite/sqlite_statement.c if (!S->stmt) { stmt 302 ext/pdo_sqlite/sqlite_statement.c if(colno >= sqlite3_data_count(S->stmt)) { stmt 304 ext/pdo_sqlite/sqlite_statement.c pdo_sqlite_error_stmt(stmt); stmt 311 ext/pdo_sqlite/sqlite_statement.c switch (sqlite3_column_type(S->stmt, colno)) { stmt 331 ext/pdo_sqlite/sqlite_statement.c str = sqlite3_column_decltype(S->stmt, colno); stmt 337 ext/pdo_sqlite/sqlite_statement.c str = sqlite3_column_table_name(S->stmt, colno); stmt 348 ext/pdo_sqlite/sqlite_statement.c static int pdo_sqlite_stmt_cursor_closer(pdo_stmt_t *stmt) stmt 350 ext/pdo_sqlite/sqlite_statement.c pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt->driver_data; stmt 351 ext/pdo_sqlite/sqlite_statement.c sqlite3_reset(S->stmt); stmt 125 ext/sqlite3/php_sqlite3_structs.h sqlite3_stmt *stmt; stmt 485 ext/sqlite3/sqlite3.c errcode = sqlite3_prepare_v2(db_obj->db, ZSTR_VAL(sql), ZSTR_LEN(sql), &(stmt_obj->stmt), NULL); stmt 510 ext/sqlite3/sqlite3.c zval stmt; stmt 535 ext/sqlite3/sqlite3.c object_init_ex(&stmt, php_sqlite3_stmt_entry); stmt 536 ext/sqlite3/sqlite3.c stmt_obj = Z_SQLITE3_STMT_P(&stmt); stmt 540 ext/sqlite3/sqlite3.c return_code = sqlite3_prepare_v2(db_obj->db, ZSTR_VAL(sql), ZSTR_LEN(sql), &(stmt_obj->stmt), NULL); stmt 543 ext/sqlite3/sqlite3.c zval_ptr_dtor(&stmt); stmt 553 ext/sqlite3/sqlite3.c ZVAL_COPY_VALUE(&result->stmt_obj_zval, &stmt); stmt 555 ext/sqlite3/sqlite3.c return_code = sqlite3_step(result->stmt_obj->stmt); stmt 564 ext/sqlite3/sqlite3.c free_item->stmt_obj_zval = stmt; stmt 566 ext/sqlite3/sqlite3.c sqlite3_reset(result->stmt_obj->stmt); stmt 571 ext/sqlite3/sqlite3.c sqlite3_finalize(stmt_obj->stmt); stmt 579 ext/sqlite3/sqlite3.c static void sqlite_value_to_zval(sqlite3_stmt *stmt, int column, zval *data) /* {{{ */ stmt 581 ext/sqlite3/sqlite3.c switch (sqlite3_column_type(stmt, column)) { stmt 583 ext/sqlite3/sqlite3.c if ((sqlite3_column_int64(stmt, column)) >= INT_MAX || sqlite3_column_int64(stmt, column) <= INT_MIN) { stmt 584 ext/sqlite3/sqlite3.c ZVAL_STRINGL(data, (char *)sqlite3_column_text(stmt, column), sqlite3_column_bytes(stmt, column)); stmt 586 ext/sqlite3/sqlite3.c ZVAL_LONG(data, sqlite3_column_int64(stmt, column)); stmt 591 ext/sqlite3/sqlite3.c ZVAL_DOUBLE(data, sqlite3_column_double(stmt, column)); stmt 599 ext/sqlite3/sqlite3.c ZVAL_STRING(data, (char*)sqlite3_column_text(stmt, column)); stmt 604 ext/sqlite3/sqlite3.c ZVAL_STRINGL(data, (char*)sqlite3_column_blob(stmt, column), sqlite3_column_bytes(stmt, column)); stmt 619 ext/sqlite3/sqlite3.c sqlite3_stmt *stmt; stmt 641 ext/sqlite3/sqlite3.c return_code = sqlite3_prepare_v2(db_obj->db, ZSTR_VAL(sql), ZSTR_LEN(sql), &stmt, NULL); stmt 647 ext/sqlite3/sqlite3.c return_code = sqlite3_step(stmt); stmt 653 ext/sqlite3/sqlite3.c sqlite_value_to_zval(stmt, 0, return_value); stmt 657 ext/sqlite3/sqlite3.c for (i = 0; i < sqlite3_data_count(stmt); i++) { stmt 659 ext/sqlite3/sqlite3.c sqlite_value_to_zval(stmt, i, &data); stmt 660 ext/sqlite3/sqlite3.c add_assoc_zval(return_value, (char*)sqlite3_column_name(stmt, i), &data); stmt 678 ext/sqlite3/sqlite3.c sqlite3_finalize(stmt); stmt 1265 ext/sqlite3/sqlite3.c SQLITE3_CHECK_INITIALIZED_STMT(stmt_obj->stmt, SQLite3Stmt); stmt 1267 ext/sqlite3/sqlite3.c RETURN_LONG(sqlite3_bind_parameter_count(stmt_obj->stmt)); stmt 1306 ext/sqlite3/sqlite3.c SQLITE3_CHECK_INITIALIZED_STMT(stmt_obj->stmt, SQLite3Stmt); stmt 1308 ext/sqlite3/sqlite3.c if (sqlite3_reset(stmt_obj->stmt) != SQLITE_OK) { stmt 1309 ext/sqlite3/sqlite3.c php_sqlite3_error(stmt_obj->db_obj, "Unable to reset statement: %s", sqlite3_errmsg(sqlite3_db_handle(stmt_obj->stmt))); stmt 1329 ext/sqlite3/sqlite3.c SQLITE3_CHECK_INITIALIZED_STMT(stmt_obj->stmt, SQLite3Stmt); stmt 1331 ext/sqlite3/sqlite3.c if (sqlite3_clear_bindings(stmt_obj->stmt) != SQLITE_OK) { stmt 1332 ext/sqlite3/sqlite3.c php_sqlite3_error(stmt_obj->db_obj, "Unable to clear statement: %s", sqlite3_errmsg(sqlite3_db_handle(stmt_obj->stmt))); stmt 1353 ext/sqlite3/sqlite3.c SQLITE3_CHECK_INITIALIZED_STMT(stmt_obj->stmt, SQLite3Stmt); stmt 1356 ext/sqlite3/sqlite3.c if (sqlite3_stmt_readonly(stmt_obj->stmt)) { stmt 1364 ext/sqlite3/sqlite3.c static int register_bound_parameter_to_sqlite(struct php_sqlite3_bound_param *param, php_sqlite3_stmt *stmt) /* {{{ */ stmt 1367 ext/sqlite3/sqlite3.c hash = stmt->bound_params; stmt 1372 ext/sqlite3/sqlite3.c stmt->bound_params = hash; stmt 1387 ext/sqlite3/sqlite3.c param->param_number = sqlite3_bind_parameter_index(stmt->stmt, ZSTR_VAL(param->name)); stmt 1429 ext/sqlite3/sqlite3.c SQLITE3_CHECK_INITIALIZED_STMT(stmt_obj->stmt, SQLite3Stmt); stmt 1464 ext/sqlite3/sqlite3.c SQLITE3_CHECK_INITIALIZED_STMT(stmt_obj->stmt, SQLite3Stmt); stmt 1509 ext/sqlite3/sqlite3.c sqlite3_bind_null(stmt_obj->stmt, param->param_number); stmt 1517 ext/sqlite3/sqlite3.c sqlite3_bind_int64(stmt_obj->stmt, param->param_number, Z_LVAL_P(parameter)); stmt 1519 ext/sqlite3/sqlite3.c sqlite3_bind_int(stmt_obj->stmt, param->param_number, Z_LVAL_P(parameter)); stmt 1525 ext/sqlite3/sqlite3.c sqlite3_bind_double(stmt_obj->stmt, param->param_number, Z_DVAL_P(parameter)); stmt 1544 ext/sqlite3/sqlite3.c sqlite3_bind_blob(stmt_obj->stmt, param->param_number, ZSTR_VAL(buffer), ZSTR_LEN(buffer), SQLITE_TRANSIENT); stmt 1547 ext/sqlite3/sqlite3.c sqlite3_bind_null(stmt_obj->stmt, param->param_number); stmt 1554 ext/sqlite3/sqlite3.c sqlite3_bind_text(stmt_obj->stmt, param->param_number, Z_STRVAL_P(parameter), Z_STRLEN_P(parameter), SQLITE_STATIC); stmt 1558 ext/sqlite3/sqlite3.c sqlite3_bind_null(stmt_obj->stmt, param->param_number); stmt 1568 ext/sqlite3/sqlite3.c return_code = sqlite3_step(stmt_obj->stmt); stmt 1574 ext/sqlite3/sqlite3.c sqlite3_reset(stmt_obj->stmt); stmt 1586 ext/sqlite3/sqlite3.c sqlite3_reset(stmt_obj->stmt); stmt 1589 ext/sqlite3/sqlite3.c php_sqlite3_error(stmt_obj->db_obj, "Unable to execute statement: %s", sqlite3_errmsg(sqlite3_db_handle(stmt_obj->stmt))); stmt 1630 ext/sqlite3/sqlite3.c errcode = sqlite3_prepare_v2(db_obj->db, ZSTR_VAL(sql), ZSTR_LEN(sql), &(stmt_obj->stmt), NULL); stmt 1661 ext/sqlite3/sqlite3.c RETURN_LONG(sqlite3_column_count(result_obj->stmt_obj->stmt)); stmt 1680 ext/sqlite3/sqlite3.c column_name = (char*) sqlite3_column_name(result_obj->stmt_obj->stmt, column); stmt 1709 ext/sqlite3/sqlite3.c RETURN_LONG(sqlite3_column_type(result_obj->stmt_obj->stmt, column)); stmt 1729 ext/sqlite3/sqlite3.c ret = sqlite3_step(result_obj->stmt_obj->stmt); stmt 1739 ext/sqlite3/sqlite3.c for (i = 0; i < sqlite3_data_count(result_obj->stmt_obj->stmt); i++) { stmt 1742 ext/sqlite3/sqlite3.c sqlite_value_to_zval(result_obj->stmt_obj->stmt, i, &data); stmt 1754 ext/sqlite3/sqlite3.c add_assoc_zval(return_value, (char*)sqlite3_column_name(result_obj->stmt_obj->stmt, i), &data); stmt 1765 ext/sqlite3/sqlite3.c php_sqlite3_error(result_obj->db_obj, "Unable to execute statement: %s", sqlite3_errmsg(sqlite3_db_handle(result_obj->stmt_obj->stmt))); stmt 1784 ext/sqlite3/sqlite3.c if (sqlite3_reset(result_obj->stmt_obj->stmt) != SQLITE_OK) { stmt 1813 ext/sqlite3/sqlite3.c sqlite3_reset(result_obj->stmt_obj->stmt); stmt 2012 ext/sqlite3/sqlite3.c sqlite3_finalize(free_item->stmt_obj->stmt); stmt 2027 ext/sqlite3/sqlite3.c return ((*free_list)->stmt_obj->initialised && statement == (*free_list)->stmt_obj->stmt); stmt 2099 ext/sqlite3/sqlite3.c zend_llist_del_element(&(intern->db_obj->free_list), intern->stmt, stmt 2121 ext/sqlite3/sqlite3.c sqlite3_reset(intern->stmt_obj->stmt);