MCPcopy Create free account
hub / github.com/apache/cloudberry / addScript

Function addScript

src/bin/pgbench/pgbench.c:5452–5471  ·  view source on GitHub ↗

append a script to the list of scripts to process */

Source from the content-addressed store, hash-verified

5450
5451/* append a script to the list of scripts to process */
5452static void
5453addScript(ParsedScript script)
5454{
5455 if (script.commands == NULL || script.commands[0] == NULL)
5456 {
5457 pg_log_fatal("empty command list for script \"%s\"", script.desc);
5458 exit(1);
5459 }
5460
5461 if (num_scripts >= MAX_SCRIPTS)
5462 {
5463 pg_log_fatal("at most %d SQL scripts are allowed", MAX_SCRIPTS);
5464 exit(1);
5465 }
5466
5467 CheckConditional(script);
5468
5469 sql_script[num_scripts] = script;
5470 num_scripts++;
5471}
5472
5473/*
5474 * Print progress report.

Callers 1

ParseScriptFunction · 0.85

Calls 1

CheckConditionalFunction · 0.85

Tested by

no test coverage detected