Lines Matching refs:conn
279 result->unbuf->m.free_result(result->unbuf, result->conn? result->conn->stats : NULL); in MYSQLND_METHOD()
302 if (result->conn) { in MYSQLND_METHOD()
303 result->conn->m->free_reference(result->conn); in MYSQLND_METHOD()
304 result->conn = NULL; in MYSQLND_METHOD()
330 MYSQLND_METHOD(mysqlnd_res, read_result_metadata)(MYSQLND_RES * result, MYSQLND_CONN_DATA * conn) in MYSQLND_METHOD()
347 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
354 if (FAIL == result->meta->m->read_metadata(result->meta, conn, result)) { in MYSQLND_METHOD()
376 mysqlnd_query_read_result_set_header(MYSQLND_CONN_DATA * conn, MYSQLND_STMT * s) in mysqlnd_query_read_result_set_header() argument
388 conn->payload_decoder_factory->m.init_rset_header_packet(&rset_header); in mysqlnd_query_read_result_set_header()
389 UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status); in mysqlnd_query_read_result_set_header()
391 if (FAIL == (ret = PACKET_READ(conn, &rset_header))) { in mysqlnd_query_read_result_set_header()
392 if (conn->error_info->error_no != CR_SERVER_GONE_ERROR) { in mysqlnd_query_read_result_set_header()
408 …UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_… in mysqlnd_query_read_result_set_header()
413 COPY_CLIENT_ERROR(conn->error_info, rset_header.error_info); in mysqlnd_query_read_result_set_header()
417 SET_CONNECTION_STATE(&conn->state, CONN_READY); in mysqlnd_query_read_result_set_header()
420 conn->error_info->error_no = 0; in mysqlnd_query_read_result_set_header()
426 conn->last_query_type = QUERY_LOAD_LOCAL; in mysqlnd_query_read_result_set_header()
427 …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()
428 SET_CONNECTION_STATE(&conn->state, CONN_SENDING_LOAD_DATA); in mysqlnd_query_read_result_set_header()
429 ret = mysqlnd_handle_local_infile(conn, rset_header.info_or_local_file.s, &is_warning); in mysqlnd_query_read_result_set_header()
430 …SET_CONNECTION_STATE(&conn->state, (ret == PASS || is_warning == TRUE)? CONN_READY:CONN_QUIT_SENT… in mysqlnd_query_read_result_set_header()
431 MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_NON_RSET_QUERY); in mysqlnd_query_read_result_set_header()
436 conn->last_query_type = QUERY_UPSERT; in mysqlnd_query_read_result_set_header()
437 conn->field_count = rset_header.field_count; in mysqlnd_query_read_result_set_header()
438 UPSERT_STATUS_RESET(conn->upsert_status); in mysqlnd_query_read_result_set_header()
439 UPSERT_STATUS_SET_WARNINGS(conn->upsert_status, rset_header.warning_count); in mysqlnd_query_read_result_set_header()
440 UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, rset_header.server_status); in mysqlnd_query_read_result_set_header()
441 UPSERT_STATUS_SET_AFFECTED_ROWS(conn->upsert_status, rset_header.affected_rows); in mysqlnd_query_read_result_set_header()
442 UPSERT_STATUS_SET_LAST_INSERT_ID(conn->upsert_status, rset_header.last_insert_id); in mysqlnd_query_read_result_set_header()
443 SET_NEW_MESSAGE(conn->last_message.s, conn->last_message.l, in mysqlnd_query_read_result_set_header()
446 if (UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status) & SERVER_MORE_RESULTS_EXISTS) { in mysqlnd_query_read_result_set_header()
447 SET_CONNECTION_STATE(&conn->state, CONN_NEXT_RESULT_PENDING); in mysqlnd_query_read_result_set_header()
449 SET_CONNECTION_STATE(&conn->state, CONN_READY); in mysqlnd_query_read_result_set_header()
452 MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_NON_RSET_QUERY); in mysqlnd_query_read_result_set_header()
459 SET_EMPTY_MESSAGE(conn->last_message.s, conn->last_message.l); in mysqlnd_query_read_result_set_header()
461 MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_RSET_QUERY); in mysqlnd_query_read_result_set_header()
462 UPSERT_STATUS_RESET(conn->upsert_status); in mysqlnd_query_read_result_set_header()
464 UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status); in mysqlnd_query_read_result_set_header()
466 conn->last_query_type = QUERY_SELECT; in mysqlnd_query_read_result_set_header()
467 SET_CONNECTION_STATE(&conn->state, CONN_FETCHING_DATA); in mysqlnd_query_read_result_set_header()
469 conn->field_count = rset_header.field_count; in mysqlnd_query_read_result_set_header()
471 result = conn->current_result = conn->m->result_init(rset_header.field_count); in mysqlnd_query_read_result_set_header()
480 result = stmt->result = conn->m->result_init(rset_header.field_count); in mysqlnd_query_read_result_set_header()
498 SET_OOM_ERROR(conn->error_info); in mysqlnd_query_read_result_set_header()
503 if (FAIL == (ret = result->m.read_result_metadata(result, conn))) { in mysqlnd_query_read_result_set_header()
505 if (!stmt && conn->current_result) { in mysqlnd_query_read_result_set_header()
506 mnd_efree(conn->current_result); in mysqlnd_query_read_result_set_header()
507 conn->current_result = NULL; in mysqlnd_query_read_result_set_header()
514 conn->payload_decoder_factory->m.init_eof_packet(&fields_eof); in mysqlnd_query_read_result_set_header()
515 if (FAIL == (ret = PACKET_READ(conn, &fields_eof))) { in mysqlnd_query_read_result_set_header()
519 conn->current_result = NULL; in mysqlnd_query_read_result_set_header()
532 UPSERT_STATUS_SET_WARNINGS(conn->upsert_status, fields_eof.warning_count); in mysqlnd_query_read_result_set_header()
540 UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, fields_eof.server_status); in mysqlnd_query_read_result_set_header()
548 MYSQLND_INC_CONN_STATISTIC(conn->stats, statistic); in mysqlnd_query_read_result_set_header()
653 MYSQLND_CONN_DATA * const conn = result->conn; in MYSQLND_METHOD() local
663 if (!conn || GET_CONNECTION_STATE(&conn->state) != CONN_FETCHING_DATA) { in MYSQLND_METHOD()
664 …SET_CLIENT_ERROR(conn->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync); in MYSQLND_METHOD()
681 if (PASS == (ret = PACKET_READ(conn, row_packet)) && !row_packet->eof) { in MYSQLND_METHOD()
682 result->unbuf->m.free_last_data(result->unbuf, conn->stats); in MYSQLND_METHOD()
689 MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_ROWS_FETCHED_FROM_CLIENT_NORMAL_UNBUF); in MYSQLND_METHOD()
698 conn->options->int_and_float_native, in MYSQLND_METHOD()
699 conn->stats); in MYSQLND_METHOD()
733 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
741 COPY_CLIENT_ERROR(conn->error_info, row_packet->error_info); in MYSQLND_METHOD()
744 if (GET_CONNECTION_STATE(&conn->state) != CONN_QUIT_SENT) { in MYSQLND_METHOD()
745 SET_CONNECTION_STATE(&conn->state, CONN_READY); in MYSQLND_METHOD()
753 UPSERT_STATUS_RESET(conn->upsert_status); in MYSQLND_METHOD()
754 UPSERT_STATUS_SET_WARNINGS(conn->upsert_status, row_packet->warning_count); in MYSQLND_METHOD()
755 UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, row_packet->server_status); in MYSQLND_METHOD()
760 if (UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status) & SERVER_MORE_RESULTS_EXISTS) { in MYSQLND_METHOD()
761 SET_CONNECTION_STATE(&conn->state, CONN_NEXT_RESULT_PENDING); in MYSQLND_METHOD()
763 SET_CONNECTION_STATE(&conn->state, CONN_READY); in MYSQLND_METHOD()
765 result->unbuf->m.free_last_data(result->unbuf, conn->stats); in MYSQLND_METHOD()
785 MYSQLND_CONN_DATA * const conn = result->conn; in MYSQLND_METHOD() local
795 if (GET_CONNECTION_STATE(&conn->state) != CONN_FETCHING_DATA) { in MYSQLND_METHOD()
796 …SET_CLIENT_ERROR(conn->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync); in MYSQLND_METHOD()
813 if (PASS == (ret = PACKET_READ(conn, row_packet)) && !row_packet->eof) { in MYSQLND_METHOD()
814 result->unbuf->m.free_last_data(result->unbuf, conn->stats); in MYSQLND_METHOD()
821 MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_ROWS_FETCHED_FROM_CLIENT_NORMAL_UNBUF); in MYSQLND_METHOD()
830 conn->options->int_and_float_native, in MYSQLND_METHOD()
831 conn->stats); in MYSQLND_METHOD()
881 COPY_CLIENT_ERROR(conn->error_info, row_packet->error_info); in MYSQLND_METHOD()
884 if (GET_CONNECTION_STATE(&conn->state) != CONN_QUIT_SENT) { in MYSQLND_METHOD()
885 SET_CONNECTION_STATE(&conn->state, CONN_READY); in MYSQLND_METHOD()
893 UPSERT_STATUS_RESET(conn->upsert_status); in MYSQLND_METHOD()
894 UPSERT_STATUS_SET_WARNINGS(conn->upsert_status, row_packet->warning_count); in MYSQLND_METHOD()
895 UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, row_packet->server_status); in MYSQLND_METHOD()
900 if (UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status) & SERVER_MORE_RESULTS_EXISTS) { in MYSQLND_METHOD()
901 SET_CONNECTION_STATE(&conn->state, CONN_NEXT_RESULT_PENDING); in MYSQLND_METHOD()
903 SET_CONNECTION_STATE(&conn->state, CONN_READY); in MYSQLND_METHOD()
905 result->unbuf->m.free_last_data(result->unbuf, conn->stats); in MYSQLND_METHOD()
921 MYSQLND_CONN_DATA * const conn = result->conn; in MYSQLND_METHOD() local
924 SET_EMPTY_ERROR(conn->error_info); in MYSQLND_METHOD()
946 conn->payload_decoder_factory->m.init_row_packet(row_packet); in MYSQLND_METHOD()
957 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
971 MYSQLND_CONN_DATA * const conn = result->conn; in MYSQLND_METHOD() local
990 conn->options->int_and_float_native, in MYSQLND_METHOD()
991 conn->stats); in MYSQLND_METHOD()
1030 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
1065 MYSQLND_CONN_DATA * const conn = result->conn; in MYSQLND_METHOD() local
1080 conn->options->int_and_float_native, in MYSQLND_METHOD()
1081 conn->stats); in MYSQLND_METHOD()
1151 MYSQLND_CONN_DATA * const conn = result->conn; in MYSQLND_METHOD() local
1165 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
1173 conn->options->int_and_float_native, in MYSQLND_METHOD()
1174 conn->stats); in MYSQLND_METHOD()
1267 MYSQLND_METHOD(mysqlnd_res, store_result_fetch_data)(MYSQLND_CONN_DATA * const conn, MYSQLND_RES * … in MYSQLND_METHOD()
1286 conn->payload_decoder_factory->m.init_row_packet(&row_packet); in MYSQLND_METHOD()
1296 while (FAIL != (ret = PACKET_READ(conn, &row_packet)) && !row_packet.eof) { in MYSQLND_METHOD()
1315 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
1325 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
1348 MYSQLND_INC_CONN_STATISTIC_W_VALUE(conn->stats, in MYSQLND_METHOD()
1355 UPSERT_STATUS_RESET(conn->upsert_status); in MYSQLND_METHOD()
1356 UPSERT_STATUS_SET_WARNINGS(conn->upsert_status, row_packet.warning_count); in MYSQLND_METHOD()
1357 UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, row_packet.server_status); in MYSQLND_METHOD()
1363 UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, in MYSQLND_METHOD()
1364 UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status) & ~SERVER_MORE_RESULTS_EXISTS); in MYSQLND_METHOD()
1371 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
1378 if (UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status) & SERVER_MORE_RESULTS_EXISTS) { in MYSQLND_METHOD()
1379 SET_CONNECTION_STATE(&conn->state, CONN_NEXT_RESULT_PENDING); in MYSQLND_METHOD()
1381 SET_CONNECTION_STATE(&conn->state, CONN_READY); in MYSQLND_METHOD()
1388 UPSERT_STATUS_SET_AFFECTED_ROWS(conn->upsert_status, set->row_count); in MYSQLND_METHOD()
1393 UPSERT_STATUS_GET_WARNINGS(conn->upsert_status), in MYSQLND_METHOD()
1394 UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status)); in MYSQLND_METHOD()
1407 MYSQLND_CONN_DATA * const conn, in MYSQLND_METHOD()
1417 result->conn = conn->m->get_reference(conn); in MYSQLND_METHOD()
1420 SET_CONNECTION_STATE(&conn->state, CONN_FETCHING_DATA); in MYSQLND_METHOD()
1425 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
1432 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
1437 …ret = result->m.store_result_fetch_data(conn, result, result->meta, row_buffers, flags & MYSQLND_S… in MYSQLND_METHOD()
1441 COPY_CLIENT_ERROR(conn->error_info, result->stored_data->error_info); in MYSQLND_METHOD()
1443 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
1454 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
1460 SET_OOM_ERROR(conn->error_info); in MYSQLND_METHOD()
1475 UPSERT_STATUS_SET_AFFECTED_ROWS(conn->upsert_status, result->stored_data->row_count); in MYSQLND_METHOD()
1495 MYSQLND_CONN_DATA * const conn = result->conn; in MYSQLND_METHOD() local
1498 MYSQLND_INC_CONN_STATISTIC(conn->stats, in MYSQLND_METHOD()
1517 MYSQLND_INC_CONN_STATISTIC(result->conn? result->conn->stats : NULL, in MYSQLND_METHOD()
1632 const MYSQLND_CONN_DATA * const conn = result->conn; in MYSQLND_METHOD() local
1637 conn->stats, in MYSQLND_METHOD()
1638 conn->options->int_and_float_native)) in MYSQLND_METHOD()
1669 const MYSQLND_CONN_DATA * const conn = result->conn; in MYSQLND_METHOD() local
1674 conn->stats, in MYSQLND_METHOD()
1675 conn->options->int_and_float_native)) in MYSQLND_METHOD()
1697 const MYSQLND_CONN_DATA * const conn = result->conn; in MYSQLND_METHOD() local
1701 conn->stats, in MYSQLND_METHOD()
1702 conn->options->int_and_float_native)) in MYSQLND_METHOD()
1810 if (result->conn) { in MYSQLND_METHOD()
1811 …SET_CLIENT_ERROR(result->conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "fetch_all can be… in MYSQLND_METHOD()