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

Function act_alter_index

src/gpre/sql.cpp:1318–1345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1316//
1317
1318static act* act_alter_index()
1319{
1320 // create request block
1321
1322 gpre_req* request = MSC_request(REQ_ddl);
1323
1324 char i_name[NAME_SIZE + 1];
1325 SQL_resolve_identifier("<index name>", i_name, NAME_SIZE + 1);
1326 if (gpreGlob.token_global.tok_length >= NAME_SIZE)
1327 PAR_error("Index name too long");
1328
1329 PAR_get_token();
1330
1331 gpre_index* index = make_index(request, i_name);
1332
1333 if (MSC_match(KW_ACTIVE))
1334 index->ind_flags |= IND_active;
1335 else if (MSC_match(KW_INACTIVE))
1336 index->ind_flags |= IND_inactive;
1337 else
1338 PAR_error("Unsupported ALTER INDEX option");
1339
1340 act* action = MSC_action(request, ACT_alter_index);
1341 action->act_object = (ref*) index;
1342 action->act_whenever = gen_whenever();
1343
1344 return action;
1345}
1346
1347
1348//____________________________________________________________

Callers 1

act_alterFunction · 0.85

Calls 8

MSC_requestFunction · 0.85
SQL_resolve_identifierFunction · 0.85
PAR_get_tokenFunction · 0.85
make_indexFunction · 0.85
MSC_matchFunction · 0.85
MSC_actionFunction · 0.85
PAR_errorFunction · 0.70
gen_wheneverFunction · 0.70

Tested by

no test coverage detected