MCPcopy Create free account
hub / github.com/MariaDB/server / op_read

Method op_read

plugin/handler_socket/client/hslongrun.cpp:616–646  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

614}
615
616int
617hs_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
648int
649hs_longrun_thread_hs::op_readnolock(int key)

Callers

nothing calls this directly

Calls 13

to_string_refFunction · 0.85
string_refClass · 0.85
mysql_real_queryFunction · 0.85
mysql_num_fieldsFunction · 0.85
mysql_fetch_rowFunction · 0.85
stringClass · 0.85
request_sendMethod · 0.80
response_recvMethod · 0.80
response_buf_removeMethod · 0.80
to_stringFunction · 0.70
get_next_rowMethod · 0.45

Tested by

no test coverage detected