| 614 | } |
| 615 | |
| 616 | int |
| 617 | hs_longrun_thread_hs::op_read(record_value& rec) |
| 618 | { |
| 619 | const std::string k = rec.key; |
| 620 | const string_ref op_ref("=", 1); |
| 621 | const string_ref op_args[1] = { |
| 622 | to_string_ref(k), |
| 623 | }; |
| 624 | cli->request_buf_exec_generic(0, op_ref, op_args, 1, 1, 0, |
| 625 | string_ref(), 0, 0, 0, 0); |
| 626 | cli->request_send(); |
| 627 | if (check_hs_error("op_read_send", 0) != 0) { return 1; } |
| 628 | size_t num_flds = 0; |
| 629 | size_t num_rows = 0; |
| 630 | cli->response_recv(num_flds); |
| 631 | if (check_hs_error("op_read_recv", 0) != 0) { return 1; } |
| 632 | const string_ref *row = cli->get_next_row(); |
| 633 | std::string rrec[4]; |
| 634 | if (row != 0 && num_flds == 4) { |
| 635 | for (int i = 0; i < 4; ++i) { |
| 636 | rrec[i] = to_string(row[i]); |
| 637 | } |
| 638 | ++num_rows; |
| 639 | } |
| 640 | row = cli->get_next_row(); |
| 641 | if (row != 0) { |
| 642 | ++num_rows; |
| 643 | } |
| 644 | cli->response_buf_remove(); |
| 645 | return verify_read(k, num_rows, num_flds, rrec, rec); |
| 646 | } |
| 647 | |
| 648 | int |
| 649 | hs_longrun_thread_hs::op_readnolock(int key) |
nothing calls this directly
no test coverage detected