diff options
| author | Rob Holland <rob@inversepath.com> | 2008-05-12 11:39:43 +0100 |
|---|---|---|
| committer | Rob Holland <rob@inversepath.com> | 2008-05-12 11:39:43 +0100 |
| commit | e8951c3e6367b39c6668c0a252c0ed4b9fcb2a3d (patch) | |
| tree | c37e8bca5578a902c0a01c97ea012adcea51c4ee /lib/sqlite3 | |
| parent | 2198de6b7f2aa6ef6dc135877fc9d179e5739225 (diff) | |
| download | third_party-sqlite3-ruby-e8951c3e6367b39c6668c0a252c0ed4b9fcb2a3d.tar.gz third_party-sqlite3-ruby-e8951c3e6367b39c6668c0a252c0ed4b9fcb2a3d.tar.xz third_party-sqlite3-ruby-e8951c3e6367b39c6668c0a252c0ed4b9fcb2a3d.zip | |
Work around a quirk in SQLite's error reporting by calling sqlite3_reset to produce a more informative error code upon a failure from sqlite3_step.
Diffstat (limited to 'lib/sqlite3')
| -rw-r--r-- | lib/sqlite3/resultset.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sqlite3/resultset.rb b/lib/sqlite3/resultset.rb index 7b815fd..cfa5873 100644 --- a/lib/sqlite3/resultset.rb +++ b/lib/sqlite3/resultset.rb @@ -33,6 +33,9 @@ module SQLite3 # to the first row of the result set. def commence result = @driver.step( @stmt.handle ) + if result == Constants::ErrorCode::ERROR + @driver.reset( @stmt.handle ) + end check result @first_row = true end |
