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

Method request_buf_open_index

plugin/handler_socket/libhsclient/hstcpcli.cpp:159–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157}
158
159void
160hstcpcli::request_buf_open_index(size_t pst_id, const char *dbn,
161 const char *tbl, const char *idx, const char *retflds, const char *filflds)
162{
163 if (num_req_sent > 0 || num_req_rcvd > 0) {
164 close();
165 set_error(-1, "request_buf_open_index: protocol out of sync");
166 return;
167 }
168 const string_ref dbn_ref(dbn, strlen(dbn));
169 const string_ref tbl_ref(tbl, strlen(tbl));
170 const string_ref idx_ref(idx, strlen(idx));
171 const string_ref rfs_ref(retflds, strlen(retflds));
172 writebuf.append_literal("P\t");
173 append_uint32(writebuf, pst_id); // FIXME size_t ?
174 writebuf.append_literal("\t");
175 writebuf.append(dbn_ref.begin(), dbn_ref.end());
176 writebuf.append_literal("\t");
177 writebuf.append(tbl_ref.begin(), tbl_ref.end());
178 writebuf.append_literal("\t");
179 writebuf.append(idx_ref.begin(), idx_ref.end());
180 writebuf.append_literal("\t");
181 writebuf.append(rfs_ref.begin(), rfs_ref.end());
182 if (filflds != 0) {
183 const string_ref fls_ref(filflds, strlen(filflds));
184 writebuf.append_literal("\t");
185 writebuf.append(fls_ref.begin(), fls_ref.end());
186 }
187 writebuf.append_literal("\n");
188 ++num_req_bufd;
189}
190
191void
192hstcpcli::request_buf_auth(const char *secret, const char *typ)

Callers 3

hstcpcli_mainFunction · 0.80
runMethod · 0.80
test_11Method · 0.80

Calls 5

append_uint32Function · 0.85
append_literalMethod · 0.80
appendMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by 1

test_11Method · 0.64