MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / sql_set_sqlengine_state

Function sql_set_sqlengine_state

db/sqlinterfaces.c:1404–1420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1402}
1403
1404void sql_set_sqlengine_state(struct sqlclntstate *clnt, char *file, int line,
1405 int newstate)
1406{
1407 if (gbl_track_sqlengine_states)
1408 logmsg(LOGMSG_USER, "%p: %p %s:%d %d->%d\n", (void *)pthread_self(), clnt, file, line, clnt->ctrl_sqlengine,
1409 newstate);
1410
1411 if (newstate == SQLENG_WRONG_STATE) {
1412 logmsg(LOGMSG_ERROR, "sqlengine entering wrong state from state %d file %s line %d.\n",
1413 clnt->ctrl_sqlengine, file, line);
1414 }
1415
1416 clnt->sqlengine_state_file = file;
1417 clnt->sqlengine_state_line = line;
1418 clnt->last_sqlengine_state = clnt->ctrl_sqlengine;
1419 clnt->ctrl_sqlengine = newstate;
1420}
1421
1422/* skip spaces and tabs, requires at least one space */
1423static inline char *skipws(char *str)

Callers 15

osql_clean_sqlclntstateFunction · 0.85
snapshot_as_ofFunction · 0.85
handle_sql_beginFunction · 0.85
handle_sql_wrongstateFunction · 0.85
abort_dbtranFunction · 0.85
start_new_transactionFunction · 0.85
sqlite3BtreeCommitFunction · 0.85
sqlite3BtreeRollbackFunction · 0.85
chunk_transactionFunction · 0.85
run_sql_thd_return_llFunction · 0.85

Calls 1

logmsgFunction · 0.50

Tested by

no test coverage detected