MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / speedtest1_exec

Function speedtest1_exec

test/sqlite/speedtest1.c:323–338  ·  view source on GitHub ↗

Run SQL */

Source from the content-addressed store, hash-verified

321
322/* Run SQL */
323void speedtest1_exec(const char *zFormat, ...){
324 va_list ap;
325 char *zSql;
326 va_start(ap, zFormat);
327 zSql = sqlite3_vmprintf(zFormat, ap);
328 va_end(ap);
329 if( g.bSqlOnly ){
330 printSql(zSql);
331 }else{
332 char *zErrMsg = 0;
333 int rc = sqlite3_exec(g.db, zSql, 0, 0, &zErrMsg);
334 if( zErrMsg ) fatal_error("SQL error: %s\n%s\n", zErrMsg, zSql);
335 if( rc!=SQLITE_OK ) fatal_error("exec error: %s\n", sqlite3_errmsg(g.db));
336 }
337 sqlite3_free(zSql);
338}
339
340/* Prepare an SQL statement */
341void speedtest1_prepare(const char *zFormat, ...){

Callers 3

testset_mainFunction · 0.85
testset_rtreeFunction · 0.85
mainFunction · 0.85

Calls 2

printSqlFunction · 0.85
fatal_errorFunction · 0.85

Tested by

no test coverage detected