diff options
Diffstat (limited to 'misc/cdcollect/files')
-rw-r--r-- | misc/cdcollect/files/patch-src_DBsql.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/misc/cdcollect/files/patch-src_DBsql.cs b/misc/cdcollect/files/patch-src_DBsql.cs new file mode 100644 index 000000000000..8fb253b77e7d --- /dev/null +++ b/misc/cdcollect/files/patch-src_DBsql.cs @@ -0,0 +1,19 @@ + +$FreeBSD$ + +--- src/DBsql.cs.orig ++++ src/DBsql.cs +@@ -958,10 +958,10 @@ + private int sql_command_id (string comm) + { + IDbCommand command = sqlite_connection.CreateCommand (); +- command.CommandText = comm; +- command.ExecuteScalar (); ++ command.CommandText = comm + "; SELECT last_insert_rowid() AS [ID]"; ++ string s = command.ExecuteScalar ().ToString (); + command.Dispose (); +- return (((SqliteConnection)sqlite_connection).LastInsertRowId); ++ return Int32.Parse (s); + } + + private void sql_command (string comm) |