MCPcopy Create free account
hub / github.com/DeNA/HandlerSocket-Plugin-for-MySQL / request_buf_open_index

Method request_buf_open_index

libhsclient/hstcpcli.cpp:158–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Tested by 1

test_11Method · 0.64