MCPcopy Create free account
hub / github.com/anse1/sqlsmith / select_for_update

Method select_for_update

grammar.cc:284–304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

282
283
284select_for_update::select_for_update(prod *p, struct scope *s, bool lateral)
285 : query_spec(p,s,lateral)
286{
287 static const char *modes[] = {
288 "update",
289 "share",
290 "no key update",
291 "key share",
292 };
293
294 try {
295 for_update_verify v1;
296 this->accept(&v1);
297
298 } catch (const char* reason) {
299 lockmode = 0;
300 return;
301 }
302 lockmode = modes[d6()%(sizeof(modes)/sizeof(*modes))];
303 set_quantifier = ""; // disallow distinct
304}
305
306void select_for_update::out(std::ostream &out) {
307 query_spec::out(out);

Callers

nothing calls this directly

Calls 2

d6Function · 0.85
acceptMethod · 0.45

Tested by

no test coverage detected