[patch] SQL typo in PhotoStore.cs



I was getting a traceback on startup from f-spot, after removing the
photos.db :

dawn% ./f-spot
*** Running uninstalled f-spot ***
Unable to find active server: Unable to determine the address of the message bus
Unhandled Exception: System.ApplicationException: Sqlite error: near ")": syntax error
in <0x00225> Mono.Data.SqliteClient.SqliteCommand:Prepare ()
in <0x00085> Mono.Data.SqliteClient.SqliteCommand:ExecuteReader (CommandBehavior behavior, Boolean want_results, System.Int32 rows_affected)
in <0x00023> Mono.Data.SqliteClient.SqliteCommand:ExecuteNonQuery ()
in [0x0008d] (at /home/jaq/src/f-spot/f-spot/src/PhotoStore.cs:590) PhotoStore:.ctor (Mono.Data.SqliteClient.SqliteConnection connection, Boolean is_new, .TagStore tag_store)
in [0x0008b] (at /home/jaq/src/f-spot/f-spot/src/Db.cs:220) Db:.ctor (System.String path, Boolean create_if_missing)
in [0x000bc] (at /home/jaq/src/f-spot/f-spot/src/main.cs:42) Driver:Main (System.String[] args)

It appears to be caused by an extra comma in the CREATE TABLE query for
photo_versions:

Index: src/PhotoStore.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/PhotoStore.cs,v
retrieving revision 1.75
diff -u -r1.75 PhotoStore.cs
--- src/PhotoStore.cs   4 Dec 2005 08:51:13 -0000       1.75
+++ src/PhotoStore.cs   5 Dec 2005 06:57:54 -0000
@@ -583,7 +583,7 @@
                        "CREATE TABLE photo_versions (    " +
                        "       photo_id        INTEGER,  " +
                        "       version_id      INTEGER,  " +
-                       "       name            STRING,   " +
+                       "       name            STRING   " +
                        ")";

                command.ExecuteNonQuery ();




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]