Lines Matching refs:conn
281 result->unbuf->m.free_result(result->unbuf, result->conn? result->conn->stats : NULL); in MYSQLND_METHOD()
304 if (result->conn) { in MYSQLND_METHOD()
305 result->conn->m->free_reference(result->conn); in MYSQLND_METHOD()
306 result->conn = NULL; in MYSQLND_METHOD()
332 MYSQLND_METHOD(mysqlnd_res, read_result_metadata)(MYSQLND_RES * result, MYSQLND_CONN_DATA * conn) in MYSQLND_METHOD()
349 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
356 if (FAIL == result->meta->m->read_metadata(result->meta, conn, result)) { in MYSQLND_METHOD()
378 mysqlnd_query_read_result_set_header(MYSQLND_CONN_DATA * conn, MYSQLND_STMT * s) in mysqlnd_query_read_result_set_header() argument
390 conn->payload_decoder_factory->m.init_rset_header_packet(&rset_header); in mysqlnd_query_read_result_set_header()
391 UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status); in mysqlnd_query_read_result_set_header()
393 if (FAIL == (ret = PACKET_READ(conn, &rset_header))) { in mysqlnd_query_read_result_set_header()
394 if (conn->error_info->error_no != CR_SERVER_GONE_ERROR) { in mysqlnd_query_read_result_set_header()
410 …UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_… in mysqlnd_query_read_result_set_header()
415 COPY_CLIENT_ERROR(conn->error_info, rset_header.error_info); in mysqlnd_query_read_result_set_header()
419 SET_CONNECTION_STATE(&conn->state, CONN_READY); in mysqlnd_query_read_result_set_header()
422 conn->error_info->error_no = 0; in mysqlnd_query_read_result_set_header()
428 conn->last_query_type = QUERY_LOAD_LOCAL; in mysqlnd_query_read_result_set_header()
429 …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()
430 SET_CONNECTION_STATE(&conn->state, CONN_SENDING_LOAD_DATA); in mysqlnd_query_read_result_set_header()
431 ret = mysqlnd_handle_local_infile(conn, rset_header.info_or_local_file.s, &is_warning); in mysqlnd_query_read_result_set_header()
432 …SET_CONNECTION_STATE(&conn->state, (ret == PASS || is_warning == TRUE)? CONN_READY:CONN_QUIT_SENT… in mysqlnd_query_read_result_set_header()
433 MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_NON_RSET_QUERY); in mysqlnd_query_read_result_set_header()
438 conn->last_query_type = QUERY_UPSERT; in mysqlnd_query_read_result_set_header()
439 conn->field_count = rset_header.field_count; in mysqlnd_query_read_result_set_header()
440 UPSERT_STATUS_RESET(conn->upsert_status); in mysqlnd_query_read_result_set_header()
441 UPSERT_STATUS_SET_WARNINGS(conn->upsert_status, rset_header.warning_count); in mysqlnd_query_read_result_set_header()
442 UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, rset_header.server_status); in mysqlnd_query_read_result_set_header()
443 UPSERT_STATUS_SET_AFFECTED_ROWS(conn->upsert_status, rset_header.affected_rows); in mysqlnd_query_read_result_set_header()
444 UPSERT_STATUS_SET_LAST_INSERT_ID(conn->upsert_status, rset_header.last_insert_id); in mysqlnd_query_read_result_set_header()
445 SET_NEW_MESSAGE(conn->last_message.s, conn->last_message.l, in mysqlnd_query_read_result_set_header()
448 if (UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status) & SERVER_MORE_RESULTS_EXISTS) { in mysqlnd_query_read_result_set_header()
449 SET_CONNECTION_STATE(&conn->state, CONN_NEXT_RESULT_PENDING); in mysqlnd_query_read_result_set_header()
451 SET_CONNECTION_STATE(&conn->state, CONN_READY); in mysqlnd_query_read_result_set_header()
454 MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_NON_RSET_QUERY); in mysqlnd_query_read_result_set_header()
461 SET_EMPTY_MESSAGE(conn->last_message.s, conn->last_message.l); in mysqlnd_query_read_result_set_header()
463 MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_RSET_QUERY); in mysqlnd_query_read_result_set_header()
464 UPSERT_STATUS_RESET(conn->upsert_status); in mysqlnd_query_read_result_set_header()
466 UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status); in mysqlnd_query_read_result_set_header()
468 conn->last_query_type = QUERY_SELECT; in mysqlnd_query_read_result_set_header()
469 SET_CONNECTION_STATE(&conn->state, CONN_FETCHING_DATA); in mysqlnd_query_read_result_set_header()
471 conn->field_count = rset_header.field_count; in mysqlnd_query_read_result_set_header()
473 result = conn->current_result = conn->m->result_init(rset_header.field_count); in mysqlnd_query_read_result_set_header()
482 result = stmt->result = conn->m->result_init(rset_header.field_count); in mysqlnd_query_read_result_set_header()
500 SET_OOM_ERROR(conn->error_info); in mysqlnd_query_read_result_set_header()
505 if (FAIL == (ret = result->m.read_result_metadata(result, conn))) { in mysqlnd_query_read_result_set_header()
507 if (!stmt && conn->current_result) { in mysqlnd_query_read_result_set_header()
508 mnd_efree(conn->current_result); in mysqlnd_query_read_result_set_header()
509 conn->current_result = NULL; in mysqlnd_query_read_result_set_header()
516 conn->payload_decoder_factory->m.init_eof_packet(&fields_eof); in mysqlnd_query_read_result_set_header()
517 if (FAIL == (ret = PACKET_READ(conn, &fields_eof))) { in mysqlnd_query_read_result_set_header()
521 conn->current_result = NULL; in mysqlnd_query_read_result_set_header()
534 UPSERT_STATUS_SET_WARNINGS(conn->upsert_status, fields_eof.warning_count); in mysqlnd_query_read_result_set_header()
542 UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, fields_eof.server_status); in mysqlnd_query_read_result_set_header()
550 MYSQLND_INC_CONN_STATISTIC(conn->stats, statistic); in mysqlnd_query_read_result_set_header()
655 MYSQLND_CONN_DATA * const conn = result->conn; in MYSQLND_METHOD() local
665 if (!conn || GET_CONNECTION_STATE(&conn->state) != CONN_FETCHING_DATA) { in MYSQLND_METHOD()
666 …SET_CLIENT_ERROR(conn->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync); in MYSQLND_METHOD()
683 if (PASS == (ret = PACKET_READ(conn, row_packet)) && !row_packet->eof) { in MYSQLND_METHOD()
684 result->unbuf->m.free_last_data(result->unbuf, conn->stats); in MYSQLND_METHOD()
691 MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_ROWS_FETCHED_FROM_CLIENT_NORMAL_UNBUF); in MYSQLND_METHOD()
700 conn->options->int_and_float_native, in MYSQLND_METHOD()
701 conn->stats); in MYSQLND_METHOD()
735 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
743 COPY_CLIENT_ERROR(conn->error_info, row_packet->error_info); in MYSQLND_METHOD()
746 if (GET_CONNECTION_STATE(&conn->state) != CONN_QUIT_SENT) { in MYSQLND_METHOD()
747 SET_CONNECTION_STATE(&conn->state, CONN_READY); in MYSQLND_METHOD()
755 UPSERT_STATUS_RESET(conn->upsert_status); in MYSQLND_METHOD()
756 UPSERT_STATUS_SET_WARNINGS(conn->upsert_status, row_packet->warning_count); in MYSQLND_METHOD()
757 UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, row_packet->server_status); in MYSQLND_METHOD()
762 if (UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status) & SERVER_MORE_RESULTS_EXISTS) { in MYSQLND_METHOD()
763 SET_CONNECTION_STATE(&conn->state, CONN_NEXT_RESULT_PENDING); in MYSQLND_METHOD()
765 SET_CONNECTION_STATE(&conn->state, CONN_READY); in MYSQLND_METHOD()
767 result->unbuf->m.free_last_data(result->unbuf, conn->stats); in MYSQLND_METHOD()
787 MYSQLND_CONN_DATA * const conn = result->conn; in MYSQLND_METHOD() local
797 if (GET_CONNECTION_STATE(&conn->state) != CONN_FETCHING_DATA) { in MYSQLND_METHOD()
798 …SET_CLIENT_ERROR(conn->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync); in MYSQLND_METHOD()
815 if (PASS == (ret = PACKET_READ(conn, row_packet)) && !row_packet->eof) { in MYSQLND_METHOD()
816 result->unbuf->m.free_last_data(result->unbuf, conn->stats); in MYSQLND_METHOD()
823 MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_ROWS_FETCHED_FROM_CLIENT_NORMAL_UNBUF); in MYSQLND_METHOD()
832 conn->options->int_and_float_native, in MYSQLND_METHOD()
833 conn->stats); in MYSQLND_METHOD()
883 COPY_CLIENT_ERROR(conn->error_info, row_packet->error_info); in MYSQLND_METHOD()
886 if (GET_CONNECTION_STATE(&conn->state) != CONN_QUIT_SENT) { in MYSQLND_METHOD()
887 SET_CONNECTION_STATE(&conn->state, CONN_READY); in MYSQLND_METHOD()
895 UPSERT_STATUS_RESET(conn->upsert_status); in MYSQLND_METHOD()
896 UPSERT_STATUS_SET_WARNINGS(conn->upsert_status, row_packet->warning_count); in MYSQLND_METHOD()
897 UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, row_packet->server_status); in MYSQLND_METHOD()
902 if (UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status) & SERVER_MORE_RESULTS_EXISTS) { in MYSQLND_METHOD()
903 SET_CONNECTION_STATE(&conn->state, CONN_NEXT_RESULT_PENDING); in MYSQLND_METHOD()
905 SET_CONNECTION_STATE(&conn->state, CONN_READY); in MYSQLND_METHOD()
907 result->unbuf->m.free_last_data(result->unbuf, conn->stats); in MYSQLND_METHOD()
923 MYSQLND_CONN_DATA * const conn = result->conn; in MYSQLND_METHOD() local
926 SET_EMPTY_ERROR(conn->error_info); in MYSQLND_METHOD()
948 conn->payload_decoder_factory->m.init_row_packet(row_packet); in MYSQLND_METHOD()
959 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
973 MYSQLND_CONN_DATA * const conn = result->conn; in MYSQLND_METHOD() local
992 conn->options->int_and_float_native, in MYSQLND_METHOD()
993 conn->stats); in MYSQLND_METHOD()
1032 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
1067 MYSQLND_CONN_DATA * const conn = result->conn; in MYSQLND_METHOD() local
1082 conn->options->int_and_float_native, in MYSQLND_METHOD()
1083 conn->stats); in MYSQLND_METHOD()
1153 MYSQLND_CONN_DATA * const conn = result->conn; in MYSQLND_METHOD() local
1167 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
1175 conn->options->int_and_float_native, in MYSQLND_METHOD()
1176 conn->stats); in MYSQLND_METHOD()
1269 MYSQLND_METHOD(mysqlnd_res, store_result_fetch_data)(MYSQLND_CONN_DATA * const conn, MYSQLND_RES * … in MYSQLND_METHOD()
1288 conn->payload_decoder_factory->m.init_row_packet(&row_packet); in MYSQLND_METHOD()
1298 while (FAIL != (ret = PACKET_READ(conn, &row_packet)) && !row_packet.eof) { in MYSQLND_METHOD()
1317 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
1327 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
1350 MYSQLND_INC_CONN_STATISTIC_W_VALUE(conn->stats, in MYSQLND_METHOD()
1357 UPSERT_STATUS_RESET(conn->upsert_status); in MYSQLND_METHOD()
1358 UPSERT_STATUS_SET_WARNINGS(conn->upsert_status, row_packet.warning_count); in MYSQLND_METHOD()
1359 UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, row_packet.server_status); in MYSQLND_METHOD()
1365 UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, in MYSQLND_METHOD()
1366 UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status) & ~SERVER_MORE_RESULTS_EXISTS); in MYSQLND_METHOD()
1373 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
1380 if (UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status) & SERVER_MORE_RESULTS_EXISTS) { in MYSQLND_METHOD()
1381 SET_CONNECTION_STATE(&conn->state, CONN_NEXT_RESULT_PENDING); in MYSQLND_METHOD()
1383 SET_CONNECTION_STATE(&conn->state, CONN_READY); in MYSQLND_METHOD()
1390 UPSERT_STATUS_SET_AFFECTED_ROWS(conn->upsert_status, set->row_count); in MYSQLND_METHOD()
1395 UPSERT_STATUS_GET_WARNINGS(conn->upsert_status), in MYSQLND_METHOD()
1396 UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status)); in MYSQLND_METHOD()
1409 MYSQLND_CONN_DATA * const conn, in MYSQLND_METHOD()
1419 result->conn = conn->m->get_reference(conn); in MYSQLND_METHOD()
1422 SET_CONNECTION_STATE(&conn->state, CONN_FETCHING_DATA); in MYSQLND_METHOD()
1427 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
1434 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
1439 …ret = result->m.store_result_fetch_data(conn, result, result->meta, row_buffers, flags & MYSQLND_S… in MYSQLND_METHOD()
1443 COPY_CLIENT_ERROR(conn->error_info, result->stored_data->error_info); in MYSQLND_METHOD()
1445 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
1456 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
1462 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
1477 UPSERT_STATUS_SET_AFFECTED_ROWS(conn->upsert_status, result->stored_data->row_count); in MYSQLND_METHOD()
1497 MYSQLND_CONN_DATA * const conn = result->conn; in MYSQLND_METHOD() local
1500 MYSQLND_INC_CONN_STATISTIC(conn->stats, in MYSQLND_METHOD()
1519 MYSQLND_INC_CONN_STATISTIC(result->conn? result->conn->stats : NULL, in MYSQLND_METHOD()
1634 const MYSQLND_CONN_DATA * const conn = result->conn; in MYSQLND_METHOD() local
1639 conn->stats, in MYSQLND_METHOD()
1640 conn->options->int_and_float_native)) in MYSQLND_METHOD()
1671 const MYSQLND_CONN_DATA * const conn = result->conn; in MYSQLND_METHOD() local
1676 conn->stats, in MYSQLND_METHOD()
1677 conn->options->int_and_float_native)) in MYSQLND_METHOD()
1699 const MYSQLND_CONN_DATA * const conn = result->conn; in MYSQLND_METHOD() local
1703 conn->stats, in MYSQLND_METHOD()
1704 conn->options->int_and_float_native)) in MYSQLND_METHOD()
1812 if (result->conn) { in MYSQLND_METHOD()
1813 …SET_CLIENT_ERROR(result->conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "fetch_all can be… in MYSQLND_METHOD()