MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / act_set_statistics

Function act_set_statistics

src/gpre/sql.cpp:4343–4369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4341//
4342
4343static act* act_set_statistics()
4344{
4345 gpre_req* request = MSC_request(REQ_ddl);
4346 STS stats = (STS) MSC_alloc(STS_LEN);
4347
4348 if (gpreGlob.isc_databases && !gpreGlob.isc_databases->dbb_next)
4349 request->req_database = gpreGlob.isc_databases;
4350 else
4351 PAR_error("Can SET STATISTICS in context of single database only");
4352
4353 if (MSC_match(KW_INDEX))
4354 {
4355 stats->sts_flags = STS_index;
4356 stats->sts_name = (STR) MSC_alloc(NAME_SIZE + 1);
4357 SQL_resolve_identifier("<index name>", stats->sts_name->str_string, NAME_SIZE + 1);
4358 if (gpreGlob.token_global.tok_length >= NAME_SIZE)
4359 PAR_error("Index name too long");
4360
4361 PAR_get_token();
4362 }
4363 else
4364 CPR_s_error("INDEX");
4365
4366 act* action = (act*) MSC_action(request, ACT_statistics);
4367 action->act_object = (ref*) stats;
4368 return action;
4369}
4370
4371
4372//____________________________________________________________

Callers 1

act_setFunction · 0.85

Calls 8

MSC_requestFunction · 0.85
MSC_allocFunction · 0.85
MSC_matchFunction · 0.85
SQL_resolve_identifierFunction · 0.85
PAR_get_tokenFunction · 0.85
CPR_s_errorFunction · 0.85
MSC_actionFunction · 0.85
PAR_errorFunction · 0.70

Tested by

no test coverage detected