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()
170 mysqlnd_query_read_result_set_header(MYSQLND_CONN_DATA * conn, MYSQLND_STMT * s) in mysqlnd_query_read_result_set_header() argument
182 conn->payload_decoder_factory->m.init_rset_header_packet(&rset_header); in mysqlnd_query_read_result_set_header()
183 UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status); in mysqlnd_query_read_result_set_header()
185 if (FAIL == (ret = PACKET_READ(conn, &rset_header))) { in mysqlnd_query_read_result_set_header()
186 …if (conn->error_info->error_no != CR_SERVER_GONE_ERROR && conn->error_info->error_no != CR_CLIENT_… in mysqlnd_query_read_result_set_header()
202 …UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_… in mysqlnd_query_read_result_set_header()
207 COPY_CLIENT_ERROR(conn->error_info, rset_header.error_info); in mysqlnd_query_read_result_set_header()
211 SET_CONNECTION_STATE(&conn->state, CONN_READY); in mysqlnd_query_read_result_set_header()
214 conn->error_info->error_no = 0; in mysqlnd_query_read_result_set_header()
220 conn->last_query_type = QUERY_LOAD_LOCAL; in mysqlnd_query_read_result_set_header()
221 …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()
222 SET_CONNECTION_STATE(&conn->state, CONN_SENDING_LOAD_DATA); in mysqlnd_query_read_result_set_header()
223 ret = mysqlnd_handle_local_infile(conn, rset_header.info_or_local_file.s, &is_warning); in mysqlnd_query_read_result_set_header()
224 …SET_CONNECTION_STATE(&conn->state, (ret == PASS || is_warning == TRUE)? CONN_READY:CONN_QUIT_SENT… in mysqlnd_query_read_result_set_header()
225 MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_NON_RSET_QUERY); in mysqlnd_query_read_result_set_header()
230 conn->last_query_type = QUERY_UPSERT; in mysqlnd_query_read_result_set_header()
231 conn->field_count = rset_header.field_count; in mysqlnd_query_read_result_set_header()
232 UPSERT_STATUS_RESET(conn->upsert_status); in mysqlnd_query_read_result_set_header()
233 UPSERT_STATUS_SET_WARNINGS(conn->upsert_status, rset_header.warning_count); in mysqlnd_query_read_result_set_header()
234 UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, rset_header.server_status); in mysqlnd_query_read_result_set_header()
235 UPSERT_STATUS_SET_AFFECTED_ROWS(conn->upsert_status, rset_header.affected_rows); in mysqlnd_query_read_result_set_header()
236 UPSERT_STATUS_SET_LAST_INSERT_ID(conn->upsert_status, rset_header.last_insert_id); in mysqlnd_query_read_result_set_header()
237 …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()
239 if (UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status) & SERVER_MORE_RESULTS_EXISTS) { in mysqlnd_query_read_result_set_header()
240 SET_CONNECTION_STATE(&conn->state, CONN_NEXT_RESULT_PENDING); in mysqlnd_query_read_result_set_header()
242 SET_CONNECTION_STATE(&conn->state, CONN_READY); in mysqlnd_query_read_result_set_header()
245 MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_NON_RSET_QUERY); in mysqlnd_query_read_result_set_header()
252 mysqlnd_set_string(&conn->last_message, NULL, 0); in mysqlnd_query_read_result_set_header()
254 MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_RSET_QUERY); in mysqlnd_query_read_result_set_header()
255 UPSERT_STATUS_RESET(conn->upsert_status); in mysqlnd_query_read_result_set_header()
257 UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status); in mysqlnd_query_read_result_set_header()
259 conn->last_query_type = QUERY_SELECT; in mysqlnd_query_read_result_set_header()
260 SET_CONNECTION_STATE(&conn->state, CONN_FETCHING_DATA); in mysqlnd_query_read_result_set_header()
262 conn->field_count = rset_header.field_count; in mysqlnd_query_read_result_set_header()
264 result = conn->current_result = conn->m->result_init(rset_header.field_count); in mysqlnd_query_read_result_set_header()
273 result = stmt->result = conn->m->result_init(rset_header.field_count); in mysqlnd_query_read_result_set_header()
289 stmt->result = conn->m->result_init(rset_header.field_count); in mysqlnd_query_read_result_set_header()
295 SET_OOM_ERROR(conn->error_info); in mysqlnd_query_read_result_set_header()
300 if (FAIL == (ret = result->m.read_result_metadata(result, conn))) { in mysqlnd_query_read_result_set_header()
302 if (!stmt && conn->current_result) { in mysqlnd_query_read_result_set_header()
303 conn->current_result->m.free_result(conn->current_result, TRUE); in mysqlnd_query_read_result_set_header()
304 conn->current_result = NULL; in mysqlnd_query_read_result_set_header()
311 conn->payload_decoder_factory->m.init_eof_packet(&fields_eof); in mysqlnd_query_read_result_set_header()
312 if (FAIL == (ret = PACKET_READ(conn, &fields_eof))) { in mysqlnd_query_read_result_set_header()
316 conn->current_result = NULL; in mysqlnd_query_read_result_set_header()
329 UPSERT_STATUS_SET_WARNINGS(conn->upsert_status, fields_eof.warning_count); in mysqlnd_query_read_result_set_header()
337 UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, fields_eof.server_status); in mysqlnd_query_read_result_set_header()
345 MYSQLND_INC_CONN_STATISTIC(conn->stats, statistic); in mysqlnd_query_read_result_set_header()
417 MYSQLND_CONN_DATA * const conn = result->conn; in MYSQLND_METHOD() local
427 if (GET_CONNECTION_STATE(&conn->state) != CONN_FETCHING_DATA) { in MYSQLND_METHOD()
428 …SET_CLIENT_ERROR(conn->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync); in MYSQLND_METHOD()
439 if (PASS == (ret = PACKET_READ(conn, row_packet)) && !row_packet->eof) { in MYSQLND_METHOD()
443 MYSQLND_INC_CONN_STATISTIC(conn->stats, set->stmt in MYSQLND_METHOD()
453 row_packet->fields_metadata, conn->options->int_and_float_native, conn->stats); in MYSQLND_METHOD()
472 COPY_CLIENT_ERROR(conn->error_info, row_packet->error_info); in MYSQLND_METHOD()
478 if (GET_CONNECTION_STATE(&conn->state) != CONN_QUIT_SENT) { in MYSQLND_METHOD()
479 SET_CONNECTION_STATE(&conn->state, CONN_READY); in MYSQLND_METHOD()
487 UPSERT_STATUS_RESET(conn->upsert_status); in MYSQLND_METHOD()
488 UPSERT_STATUS_SET_WARNINGS(conn->upsert_status, row_packet->warning_count); in MYSQLND_METHOD()
489 UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, row_packet->server_status); in MYSQLND_METHOD()
494 if (UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status) & SERVER_MORE_RESULTS_EXISTS) { in MYSQLND_METHOD()
495 SET_CONNECTION_STATE(&conn->state, CONN_NEXT_RESULT_PENDING); in MYSQLND_METHOD()
497 SET_CONNECTION_STATE(&conn->state, CONN_READY); in MYSQLND_METHOD()
514 MYSQLND_CONN_DATA * const conn = result->conn; in MYSQLND_METHOD() local
517 SET_EMPTY_ERROR(conn->error_info); in MYSQLND_METHOD()
536 conn->payload_decoder_factory->m.init_row_packet(row_packet); in MYSQLND_METHOD()
563 MYSQLND_CONN_DATA * const conn = result->conn; in MYSQLND_METHOD() local
571 conn->options->int_and_float_native, in MYSQLND_METHOD()
572 conn->stats); in MYSQLND_METHOD()
621 MYSQLND_METHOD(mysqlnd_res, store_result_fetch_data)(MYSQLND_CONN_DATA * const conn, MYSQLND_RES * … in MYSQLND_METHOD()
640 conn->payload_decoder_factory->m.init_row_packet(&row_packet); in MYSQLND_METHOD()
648 while (FAIL != (ret = PACKET_READ(conn, &row_packet)) && !row_packet.eof) { in MYSQLND_METHOD()
667 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
687 MYSQLND_INC_CONN_STATISTIC_W_VALUE(conn->stats, in MYSQLND_METHOD()
694 UPSERT_STATUS_RESET(conn->upsert_status); in MYSQLND_METHOD()
695 UPSERT_STATUS_SET_WARNINGS(conn->upsert_status, row_packet.warning_count); in MYSQLND_METHOD()
696 UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, row_packet.server_status); in MYSQLND_METHOD()
702 UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, in MYSQLND_METHOD()
703 UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status) & ~SERVER_MORE_RESULTS_EXISTS); in MYSQLND_METHOD()
710 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
717 if (UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status) & SERVER_MORE_RESULTS_EXISTS) { in MYSQLND_METHOD()
718 SET_CONNECTION_STATE(&conn->state, CONN_NEXT_RESULT_PENDING); in MYSQLND_METHOD()
720 SET_CONNECTION_STATE(&conn->state, CONN_READY); in MYSQLND_METHOD()
727 UPSERT_STATUS_SET_AFFECTED_ROWS(conn->upsert_status, set->row_count); in MYSQLND_METHOD()
732 UPSERT_STATUS_GET_WARNINGS(conn->upsert_status), in MYSQLND_METHOD()
733 UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status)); in MYSQLND_METHOD()
746 MYSQLND_CONN_DATA * const conn, in MYSQLND_METHOD()
756 result->conn = conn->m->get_reference(conn); in MYSQLND_METHOD()
759 SET_CONNECTION_STATE(&conn->state, CONN_FETCHING_DATA); in MYSQLND_METHOD()
764 ret = result->m.store_result_fetch_data(conn, result, result->meta, row_buffers, stmt != NULL); in MYSQLND_METHOD()
768 COPY_CLIENT_ERROR(conn->error_info, result->stored_data->error_info); in MYSQLND_METHOD()
770 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
778 UPSERT_STATUS_SET_AFFECTED_ROWS(conn->upsert_status, result->stored_data->row_count); in MYSQLND_METHOD()
798 MYSQLND_CONN_DATA * const conn = result->conn; in MYSQLND_METHOD() local
801 MYSQLND_INC_CONN_STATISTIC(conn->stats, in MYSQLND_METHOD()
806 MYSQLND_INC_CONN_STATISTIC(conn->stats, in MYSQLND_METHOD()
822 MYSQLND_INC_CONN_STATISTIC(result->conn? result->conn->stats : NULL, in MYSQLND_METHOD()
975 MYSQLND_CONN_DATA *conn = result->conn; in MYSQLND_METHOD() local
976 if (conn) { in MYSQLND_METHOD()
977 SET_EMPTY_ERROR(conn->error_info); in MYSQLND_METHOD()