Lines Matching refs:pStmt
108 sqlite3_stmt *pStmt = 0; in prep_sql() local
114 rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0); in prep_sql()
121 return pStmt; in prep_sql()
131 sqlite3_stmt *pStmt = 0; in run_sql() local
138 rc = sqlite3_prepare_v2(p->db, zSql, -1, &pStmt, 0); in run_sql()
145 while( (rc = sqlite3_step(pStmt))!=SQLITE_DONE ){ in run_sql()
147 sqlite3_reset(pStmt); in run_sql()
166 sqlite3_finalize(pStmt); in run_sql()
289 sqlite3_stmt *pStmt; in worker_thread() local
300 pStmt = prep_sql(p->db, "SELECT count(a) FROM t1 WHERE tid=%d", p->tid); in worker_thread()
301 worker_trace(p, "query [%s]", sqlite3_sql(pStmt)); in worker_thread()
302 rc = sqlite3_step(pStmt); in worker_thread()
304 worker_error(p, "Failed to step: %s", sqlite3_sql(pStmt)); in worker_thread()
305 }else if( sqlite3_column_int(pStmt, 0)!=400 ){ in worker_thread()
306 worker_error(p, "Wrong result: %d", sqlite3_column_int(pStmt,0)); in worker_thread()
308 sqlite3_finalize(pStmt); in worker_thread()
332 pStmt = prep_sql(p->db, in worker_thread()
339 worker_trace(p, "query [%s]", sqlite3_sql(pStmt)); in worker_thread()
341 rc = sqlite3_step(pStmt); in worker_thread()
343 worker_error(p, "Failed to step: %s", sqlite3_sql(pStmt)); in worker_thread()
348 sqlite3_finalize(pStmt); in worker_thread()