| 581 | } |
| 582 | |
| 583 | int |
| 584 | hs_longrun_thread_hs::op_update(record_value& rec) |
| 585 | { |
| 586 | const std::string k = rec.key; |
| 587 | const std::string v1 = "uv1_" + k + "_" + to_stdstring(arg.id); |
| 588 | const std::string v2 = "uv2_" + k + "_" + to_stdstring(arg.id); |
| 589 | const std::string v3 = "uv3_" + k + "_" + to_stdstring(arg.id); |
| 590 | const string_ref op_ref("=", 1); |
| 591 | const string_ref op_args[1] = { |
| 592 | to_string_ref(k), |
| 593 | }; |
| 594 | const string_ref modop_ref("U", 1); |
| 595 | const string_ref modop_args[4] = { |
| 596 | to_string_ref(k), |
| 597 | to_string_ref(v1), |
| 598 | to_string_ref(v2), |
| 599 | to_string_ref(v3) |
| 600 | }; |
| 601 | cli->request_buf_exec_generic(0, op_ref, op_args, 1, 1, 0, |
| 602 | modop_ref, modop_args, 4, 0, 0); |
| 603 | cli->request_send(); |
| 604 | if (check_hs_error("op_update_send", &rec) != 0) { return 1; } |
| 605 | size_t numflds = 0; |
| 606 | cli->response_recv(numflds); |
| 607 | if (check_hs_error("op_update_recv", &rec) != 0) { return 1; } |
| 608 | const string_ref *row = cli->get_next_row(); |
| 609 | uint32_t num_rows = row |
| 610 | ? atoi_uint32_nocheck(row[0].begin(), row[0].end()) : 0; |
| 611 | cli->response_buf_remove(); |
| 612 | const bool cur_unknown_state = (num_rows == 1); |
| 613 | return verify_update(k, v1, v2, v3, rec, num_rows, cur_unknown_state); |
| 614 | } |
| 615 | |
| 616 | int |
| 617 | hs_longrun_thread_hs::op_read(record_value& rec) |
nothing calls this directly
no test coverage detected