Loading src/database/sqlite.cpp +19 −25 Original line number Diff line number Diff line Loading @@ -88,8 +88,9 @@ namespace blogi { if(!prep) continue; do { int pcode = sqlite3_step(prep); int pcode; while( ( pcode = sqlite3_step(prep) ) !=SQLITE_DONE ) { if(pcode==SQLITE_ERROR){ libhttppp::HTTPException exp; Loading @@ -99,13 +100,9 @@ namespace blogi { throw exp; } if(pcode==SQLITE_BUSY){ continue; } if(pcode==SQLITE_ROW){ int i; for(i=0; i < sqlite3_data_count(prep); ++i){ for(i=0; i < sqlite3_column_count(prep); ++i){ if(!res.firstRow){ res.firstRow = new DBResult::Data(rcount,i,(const char*)sqlite3_column_text(prep,i),sqlite3_column_bytes(prep,i)); lastdat=res.firstRow; Loading @@ -114,16 +111,13 @@ namespace blogi { lastdat=lastdat->nextData; } } if(i>0) ++rcount; } sqlite3_stmt *next; next=sqlite3_next_stmt(_dbconn, prep); } sqlite3_finalize(prep); prep=next; }while(prep); }while(cssql < ssql+sql->length()); }while(cssql != ssql+sql->length()); sqllock.store(false); delete[] ssql; return rcount; Loading Loading
src/database/sqlite.cpp +19 −25 Original line number Diff line number Diff line Loading @@ -88,8 +88,9 @@ namespace blogi { if(!prep) continue; do { int pcode = sqlite3_step(prep); int pcode; while( ( pcode = sqlite3_step(prep) ) !=SQLITE_DONE ) { if(pcode==SQLITE_ERROR){ libhttppp::HTTPException exp; Loading @@ -99,13 +100,9 @@ namespace blogi { throw exp; } if(pcode==SQLITE_BUSY){ continue; } if(pcode==SQLITE_ROW){ int i; for(i=0; i < sqlite3_data_count(prep); ++i){ for(i=0; i < sqlite3_column_count(prep); ++i){ if(!res.firstRow){ res.firstRow = new DBResult::Data(rcount,i,(const char*)sqlite3_column_text(prep,i),sqlite3_column_bytes(prep,i)); lastdat=res.firstRow; Loading @@ -114,16 +111,13 @@ namespace blogi { lastdat=lastdat->nextData; } } if(i>0) ++rcount; } sqlite3_stmt *next; next=sqlite3_next_stmt(_dbconn, prep); } sqlite3_finalize(prep); prep=next; }while(prep); }while(cssql < ssql+sql->length()); }while(cssql != ssql+sql->length()); sqllock.store(false); delete[] ssql; return rcount; Loading