GNOME Bugzilla – Bug 486913
DB upgrade from v3 to v7 fails
Last modified: 2007-10-20 09:17: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]
Created attachment 97255 [details] [review] drop-temp-table-on-update.patch actually I couldn't test it, but shouldn't harm ;)
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
sorry, it _is_ a bug
fixed in r3429
Works for me, thanks!