| 282 | |
| 283 | |
| 284 | select_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 | |
| 306 | void select_for_update::out(std::ostream &out) { |
| 307 | query_spec::out(out); |