*sqlite3: fixed for linux

git-svn-id: svn://ultimatepp.org/upp/trunk@2297 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2010-04-02 08:28:59 +00:00
parent 0fa197276c
commit 564c28762e

View file

@ -151,7 +151,7 @@ bool Sqlite3Connection::Execute() {
// Make sure that compiling the statement never fails.
ASSERT(NULL != current_stmt);
int retcode;
dword ticks_start = ::GetTickCount();
dword ticks_start = GetTickCount();
int sleep_ms = 1;
do{
retcode = sqlite3_step(current_stmt);
@ -163,7 +163,7 @@ bool Sqlite3Connection::Execute() {
}
}//else infinite retry
if(retcode==SQLITE_LOCKED) sqlite3_reset(current_stmt);
::Sleep(sleep_ms);
Sleep(sleep_ms);
if(sleep_ms<128) sleep_ms += sleep_ms;
}while(1);
if ((retcode != SQLITE_DONE) && (retcode != SQLITE_ROW)) {
@ -345,7 +345,7 @@ int Sqlite3Session::SqlExecRetry(const char *sql)
if(busy_timeout>0){
if((int)(GetTickCount()-ticks_start)>busy_timeout) break;
}//else infinite retry
::Sleep(sleep_ms);
Sleep(sleep_ms);
if(sleep_ms<128) sleep_ms += sleep_ms;
}while(1);
return retcode;