Lines Matching refs:conn
93 result->unbuf->m.free_result(result->unbuf, result->conn? result->conn->stats : NULL); in MYSQLND_METHOD()
116 if (result->conn) { in MYSQLND_METHOD()
117 result->conn->m->free_reference(result->conn); in MYSQLND_METHOD()
118 result->conn = NULL; in MYSQLND_METHOD()
130 MYSQLND_METHOD(mysqlnd_res, read_result_metadata)(MYSQLND_RES * result, MYSQLND_CONN_DATA * conn) in MYSQLND_METHOD()
150 if (FAIL == result->meta->m->read_metadata(result->meta, conn, result)) { in MYSQLND_METHOD()
172 mysqlnd_query_read_result_set_header(MYSQLND_CONN_DATA * conn, MYSQLND_STMT * s) in mysqlnd_query_read_result_set_header() argument
184 conn->payload_decoder_factory->m.init_rset_header_packet(&rset_header); in mysqlnd_query_read_result_set_header()
185 UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status); in mysqlnd_query_read_result_set_header()
187 if (FAIL == (ret = PACKET_READ(conn, &rset_header))) { in mysqlnd_query_read_result_set_header()
188 if (conn->error_info->error_no != CR_SERVER_GONE_ERROR) { in mysqlnd_query_read_result_set_header()
204 …UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_… in mysqlnd_query_read_result_set_header()
209 COPY_CLIENT_ERROR(conn->error_info, rset_header.error_info); in mysqlnd_query_read_result_set_header()
213 SET_CONNECTION_STATE(&conn->state, CONN_READY); in mysqlnd_query_read_result_set_header()
216 conn->error_info->error_no = 0; in mysqlnd_query_read_result_set_header()
222 conn->last_query_type = QUERY_LOAD_LOCAL; in mysqlnd_query_read_result_set_header()
223 …conn->field_count = 0; /* overwrite previous value, or the last value could be used and lead to bu… in mysqlnd_query_read_result_set_header()
224 SET_CONNECTION_STATE(&conn->state, CONN_SENDING_LOAD_DATA); in mysqlnd_query_read_result_set_header()
225 ret = mysqlnd_handle_local_infile(conn, rset_header.info_or_local_file.s, &is_warning); in mysqlnd_query_read_result_set_header()
226 …SET_CONNECTION_STATE(&conn->state, (ret == PASS || is_warning == TRUE)? CONN_READY:CONN_QUIT_SENT… in mysqlnd_query_read_result_set_header()
227 MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_NON_RSET_QUERY); in mysqlnd_query_read_result_set_header()
232 conn->last_query_type = QUERY_UPSERT; in mysqlnd_query_read_result_set_header()
233 conn->field_count = rset_header.field_count; in mysqlnd_query_read_result_set_header()
234 UPSERT_STATUS_RESET(conn->upsert_status); in mysqlnd_query_read_result_set_header()
235 UPSERT_STATUS_SET_WARNINGS(conn->upsert_status, rset_header.warning_count); in mysqlnd_query_read_result_set_header()
236 UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, rset_header.server_status); in mysqlnd_query_read_result_set_header()
237 UPSERT_STATUS_SET_AFFECTED_ROWS(conn->upsert_status, rset_header.affected_rows); in mysqlnd_query_read_result_set_header()
238 UPSERT_STATUS_SET_LAST_INSERT_ID(conn->upsert_status, rset_header.last_insert_id); in mysqlnd_query_read_result_set_header()
239 …mysqlnd_set_string(&conn->last_message, rset_header.info_or_local_file.s, rset_header.info_or_loca… in mysqlnd_query_read_result_set_header()
241 if (UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status) & SERVER_MORE_RESULTS_EXISTS) { in mysqlnd_query_read_result_set_header()
242 SET_CONNECTION_STATE(&conn->state, CONN_NEXT_RESULT_PENDING); in mysqlnd_query_read_result_set_header()
244 SET_CONNECTION_STATE(&conn->state, CONN_READY); in mysqlnd_query_read_result_set_header()
247 MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_NON_RSET_QUERY); in mysqlnd_query_read_result_set_header()
254 mysqlnd_set_string(&conn->last_message, NULL, 0); in mysqlnd_query_read_result_set_header()
256 MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_RSET_QUERY); in mysqlnd_query_read_result_set_header()
257 UPSERT_STATUS_RESET(conn->upsert_status); in mysqlnd_query_read_result_set_header()
259 UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status); in mysqlnd_query_read_result_set_header()
261 conn->last_query_type = QUERY_SELECT; in mysqlnd_query_read_result_set_header()
262 SET_CONNECTION_STATE(&conn->state, CONN_FETCHING_DATA); in mysqlnd_query_read_result_set_header()
264 conn->field_count = rset_header.field_count; in mysqlnd_query_read_result_set_header()
266 result = conn->current_result = conn->m->result_init(rset_header.field_count); in mysqlnd_query_read_result_set_header()
275 result = stmt->result = conn->m->result_init(rset_header.field_count); in mysqlnd_query_read_result_set_header()
291 stmt->result = conn->m->result_init(rset_header.field_count); in mysqlnd_query_read_result_set_header()
297 SET_OOM_ERROR(conn->error_info); in mysqlnd_query_read_result_set_header()
302 if (FAIL == (ret = result->m.read_result_metadata(result, conn))) { in mysqlnd_query_read_result_set_header()
304 if (!stmt && conn->current_result) { in mysqlnd_query_read_result_set_header()
305 conn->current_result->m.free_result(conn->current_result, TRUE); in mysqlnd_query_read_result_set_header()
306 conn->current_result = NULL; in mysqlnd_query_read_result_set_header()
313 conn->payload_decoder_factory->m.init_eof_packet(&fields_eof); in mysqlnd_query_read_result_set_header()
314 if (FAIL == (ret = PACKET_READ(conn, &fields_eof))) { in mysqlnd_query_read_result_set_header()
318 conn->current_result = NULL; in mysqlnd_query_read_result_set_header()
331 UPSERT_STATUS_SET_WARNINGS(conn->upsert_status, fields_eof.warning_count); in mysqlnd_query_read_result_set_header()
339 UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, fields_eof.server_status); in mysqlnd_query_read_result_set_header()
347 MYSQLND_INC_CONN_STATISTIC(conn->stats, statistic); in mysqlnd_query_read_result_set_header()
419 MYSQLND_CONN_DATA * const conn = result->conn; in MYSQLND_METHOD() local
429 if (GET_CONNECTION_STATE(&conn->state) != CONN_FETCHING_DATA) { in MYSQLND_METHOD()
430 …SET_CLIENT_ERROR(conn->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync); in MYSQLND_METHOD()
441 if (PASS == (ret = PACKET_READ(conn, row_packet)) && !row_packet->eof) { in MYSQLND_METHOD()
445 MYSQLND_INC_CONN_STATISTIC(conn->stats, set->stmt in MYSQLND_METHOD()
455 row_packet->fields_metadata, conn->options->int_and_float_native, conn->stats); in MYSQLND_METHOD()
474 COPY_CLIENT_ERROR(conn->error_info, row_packet->error_info); in MYSQLND_METHOD()
480 if (GET_CONNECTION_STATE(&conn->state) != CONN_QUIT_SENT) { in MYSQLND_METHOD()
481 SET_CONNECTION_STATE(&conn->state, CONN_READY); in MYSQLND_METHOD()
489 UPSERT_STATUS_RESET(conn->upsert_status); in MYSQLND_METHOD()
490 UPSERT_STATUS_SET_WARNINGS(conn->upsert_status, row_packet->warning_count); in MYSQLND_METHOD()
491 UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, row_packet->server_status); in MYSQLND_METHOD()
496 if (UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status) & SERVER_MORE_RESULTS_EXISTS) { in MYSQLND_METHOD()
497 SET_CONNECTION_STATE(&conn->state, CONN_NEXT_RESULT_PENDING); in MYSQLND_METHOD()
499 SET_CONNECTION_STATE(&conn->state, CONN_READY); in MYSQLND_METHOD()
516 MYSQLND_CONN_DATA * const conn = result->conn; in MYSQLND_METHOD() local
519 SET_EMPTY_ERROR(conn->error_info); in MYSQLND_METHOD()
538 conn->payload_decoder_factory->m.init_row_packet(row_packet); in MYSQLND_METHOD()
565 MYSQLND_CONN_DATA * const conn = result->conn; in MYSQLND_METHOD() local
573 conn->options->int_and_float_native, in MYSQLND_METHOD()
574 conn->stats); in MYSQLND_METHOD()
623 MYSQLND_METHOD(mysqlnd_res, store_result_fetch_data)(MYSQLND_CONN_DATA * const conn, MYSQLND_RES * … in MYSQLND_METHOD()
642 conn->payload_decoder_factory->m.init_row_packet(&row_packet); in MYSQLND_METHOD()
650 while (FAIL != (ret = PACKET_READ(conn, &row_packet)) && !row_packet.eof) { in MYSQLND_METHOD()
669 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
689 MYSQLND_INC_CONN_STATISTIC_W_VALUE(conn->stats, in MYSQLND_METHOD()
696 UPSERT_STATUS_RESET(conn->upsert_status); in MYSQLND_METHOD()
697 UPSERT_STATUS_SET_WARNINGS(conn->upsert_status, row_packet.warning_count); in MYSQLND_METHOD()
698 UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, row_packet.server_status); in MYSQLND_METHOD()
704 UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, in MYSQLND_METHOD()
705 UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status) & ~SERVER_MORE_RESULTS_EXISTS); in MYSQLND_METHOD()
712 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
719 if (UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status) & SERVER_MORE_RESULTS_EXISTS) { in MYSQLND_METHOD()
720 SET_CONNECTION_STATE(&conn->state, CONN_NEXT_RESULT_PENDING); in MYSQLND_METHOD()
722 SET_CONNECTION_STATE(&conn->state, CONN_READY); in MYSQLND_METHOD()
729 UPSERT_STATUS_SET_AFFECTED_ROWS(conn->upsert_status, set->row_count); in MYSQLND_METHOD()
734 UPSERT_STATUS_GET_WARNINGS(conn->upsert_status), in MYSQLND_METHOD()
735 UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status)); in MYSQLND_METHOD()
748 MYSQLND_CONN_DATA * const conn, in MYSQLND_METHOD()
758 result->conn = conn->m->get_reference(conn); in MYSQLND_METHOD()
761 SET_CONNECTION_STATE(&conn->state, CONN_FETCHING_DATA); in MYSQLND_METHOD()
766 ret = result->m.store_result_fetch_data(conn, result, result->meta, row_buffers, stmt != NULL); in MYSQLND_METHOD()
770 COPY_CLIENT_ERROR(conn->error_info, result->stored_data->error_info); in MYSQLND_METHOD()
772 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
780 UPSERT_STATUS_SET_AFFECTED_ROWS(conn->upsert_status, result->stored_data->row_count); in MYSQLND_METHOD()
800 MYSQLND_CONN_DATA * const conn = result->conn; in MYSQLND_METHOD() local
803 MYSQLND_INC_CONN_STATISTIC(conn->stats, in MYSQLND_METHOD()
808 MYSQLND_INC_CONN_STATISTIC(conn->stats, in MYSQLND_METHOD()
824 MYSQLND_INC_CONN_STATISTIC(result->conn? result->conn->stats : NULL, in MYSQLND_METHOD()
977 MYSQLND_CONN_DATA *conn = result->conn; in MYSQLND_METHOD() local
978 if (conn) { in MYSQLND_METHOD()
979 SET_EMPTY_ERROR(conn->error_info); in MYSQLND_METHOD()