Lines Matching refs:zSql
56 static void prepareAndRun(sqlite3 *db, const char *zSql, int bQuiet){
65 if (!bQuiet) printf("SQL statement: [%s]\n", zSql);
67 rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, &stmtTail);
97 char *zSql;
189 zSql = malloc( nSql+1 );
191 nSql = fread(zSql, 1, nSql, in);
192 zSql[nSql] = 0;
205 if( zSql[j]==';' ){
207 char c = zSql[j+1];
208 zSql[j+1] = 0;
209 isComplete = sqlite3_complete(&zSql[i]);
210 zSql[j+1] = c;
212 zSql[j] = 0;
213 while( i<j && isspace(zSql[i]) ){ i++; }
216 if( n>=6 && memcmp(&zSql[i], ".crash",6)==0 ) exit(1);
219 prepareAndRun(db, &zSql[i], bQuiet);
221 zSql[j] = ';';