After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 486913 - DB upgrade from v3 to v7 fails
DB upgrade from v3 to v7 fails
Status: RESOLVED FIXED
Product: f-spot
Classification: Other
Component: General
SVN
Other Linux
: Normal normal
: ---
Assigned To: F-spot maintainers
F-spot maintainers
Depends on:
Blocks:
 
 
Reported: 2007-10-15 18:41 UTC by Maxxer
Modified: 2007-10-20 09:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
drop-temp-table-on-update.patch (646 bytes, patch)
2007-10-15 18:42 UTC, Maxxer
committed Details | Review

Description Maxxer 2007-10-15 18:41:00 UTC
Reported by Neilen Marais on the mailing list.

DB upgrade from v3 to v7 fails due to already existing temporary table.

$ ./f-spot
Initializing Mono.Addins
Starting new FSpot server
Updating F-Spot Database
Updated database from version 3 to 3.1
Updated database from version 3.1 to 4
Will add a roll_id field to photos!
Will rename imports to rolls!
Cleaning weird descriptions, fixes bug #324425.
Updated database from version 4 to 5
Updated database from version 5 to 6

Unhandled Exception: Mono.Data.SqliteClient.SqliteSyntaxException: table photos_temp already exists
  at Mono.Data.SqliteClient.SqliteCommand.GetNextStatement (IntPtr pzStart, System.IntPtr& pzTail, System.IntPtr& pStmt) [0x00000] 
  at Mono.Data.SqliteClient.SqliteCommand.ExecuteReader (CommandBehavior behavior, Boolean want_results, System.Int32& rows_affected) [0x00000] 
  at Mono.Data.SqliteClient.SqliteCommand.ExecuteNonQuery () [0x00000] 
  at Banshee.Database.QueuedSqliteCommand.Execute () [0x00000]
Comment 1 Maxxer 2007-10-15 18:42:47 UTC
Created attachment 97255 [details] [review]
drop-temp-table-on-update.patch

actually I couldn't test it, but shouldn't harm ;)
Comment 2 Stephane Delcroix 2007-10-16 07:59:30 UTC
This issue shouldn't happen, the temporary table is created as TEMP. It's maybe a bug in sqlite, but shouldn't happen.

and actually, your patch could harm... on sqlite2
Comment 3 Stephane Delcroix 2007-10-16 08:20:28 UTC
sorry, it _is_ a bug
Comment 4 Stephane Delcroix 2007-10-16 08:28:27 UTC
fixed in r3429
Comment 5 Neilen Marais 2007-10-20 09:17:00 UTC
Works for me, thanks!