mirror of https://github.com/mattn/go-sqlite3.git
Backup.Step may handle SQLITE_BUSY / SQLITE_LOCKED specifically. Close #133
This commit is contained in:
parent
acf1dd667b
commit
817f281a0d
|
@ -41,7 +41,7 @@ func (b *SQLiteBackup) Step(p int) (bool, error) {
|
|||
ret := C.sqlite3_backup_step(b.b, C.int(p))
|
||||
if ret == C.SQLITE_DONE {
|
||||
return true, nil
|
||||
} else if ret != 0 {
|
||||
} else if ret != 0 && ret != C.SQLITE_LOCKED && ret != C.SQLITE_BUSY {
|
||||
return false, Error{Code: ErrNo(ret)}
|
||||
}
|
||||
return false, nil
|
||||
|
|
Loading…
Reference in New Issue