[banshee] Fix sqlite3_last_insert_rowid return type to long
- From: Bertrand Lorentz <blorentz src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [banshee] Fix sqlite3_last_insert_rowid return type to long
- Date: Mon, 28 Sep 2009 15:26:08 +0000 (UTC)
commit e4685d5104fdebb8ee582f3184885a12d66f7fce
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date: Mon Sep 28 17:21:09 2009 +0200
Fix sqlite3_last_insert_rowid return type to long
The long value is converted back to int in HyenaSqliteConnection, to
avoid unnecessary API breakage. Fixes BGO#547218.
.../Hyena.Data.Sqlite/HyenaSqliteConnection.cs | 4 ++--
.../Mono.Data.Sqlite/Mono.Data.Sqlite/SQLite3.cs | 2 +-
.../Mono.Data.Sqlite/SQLiteBase.cs | 2 +-
.../Mono.Data.Sqlite/SQLiteCommand.cs | 2 +-
.../Mono.Data.Sqlite/SQLiteConnection.cs | 2 +-
.../Mono.Data.Sqlite/UnsafeNativeMethods.cs | 2 +-
6 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/Libraries/Hyena/Hyena.Data.Sqlite/HyenaSqliteConnection.cs b/src/Libraries/Hyena/Hyena.Data.Sqlite/HyenaSqliteConnection.cs
index e3c059d..503568f 100644
--- a/src/Libraries/Hyena/Hyena.Data.Sqlite/HyenaSqliteConnection.cs
+++ b/src/Libraries/Hyena/Hyena.Data.Sqlite/HyenaSqliteConnection.cs
@@ -218,14 +218,14 @@ namespace Hyena.Data.Sqlite
{
command.CommandType = HyenaCommandType.Execute;;
QueueCommand(command);
- return (int) command.WaitForResult (this);
+ return Convert.ToInt32 (command.WaitForResult (this));
}
public int Execute (HyenaSqliteCommand command, params object [] param_values)
{
command.CommandType = HyenaCommandType.Execute;;
QueueCommand(command, param_values);
- return (int) command.WaitForResult (this);
+ return Convert.ToInt32 (command.WaitForResult (this));
}
public int Execute (string command_str, params object [] param_values)
diff --git a/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLite3.cs b/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLite3.cs
index 00bd232..6c86468 100644
--- a/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLite3.cs
+++ b/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLite3.cs
@@ -665,7 +665,7 @@ namespace Mono.Data.Sqlite
}
}
- internal override int GetLastInsertRowId ()
+ internal override long GetLastInsertRowId ()
{
return UnsafeNativeMethods.sqlite3_last_insert_rowid (_sql);
}
diff --git a/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteBase.cs b/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteBase.cs
index 35f7535..25a06f0 100644
--- a/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteBase.cs
+++ b/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteBase.cs
@@ -177,7 +177,7 @@ namespace Mono.Data.Sqlite
internal abstract void SetCommitHook(SqliteCommitCallback func);
internal abstract void SetRollbackHook(SqliteRollbackCallback func);
- internal abstract int GetLastInsertRowId ();
+ internal abstract long GetLastInsertRowId ();
internal abstract object GetValue(SqliteStatement stmt, int index, SqliteType typ);
diff --git a/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteCommand.cs b/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteCommand.cs
index f954b74..759266e 100644
--- a/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteCommand.cs
+++ b/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteCommand.cs
@@ -648,7 +648,7 @@ namespace Mono.Data.Sqlite
return new SqliteCommand(this);
}
- public int LastInsertRowID ()
+ public long LastInsertRowID ()
{
return _cnn.LastInsertRowId;
}
diff --git a/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteConnection.cs b/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteConnection.cs
index aa9b0ed..f6f6263 100644
--- a/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteConnection.cs
+++ b/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteConnection.cs
@@ -1957,7 +1957,7 @@ namespace Mono.Data.Sqlite
get { return 3; }
}
- public int LastInsertRowId {
+ public long LastInsertRowId {
get { return _sql.GetLastInsertRowId (); }
}
diff --git a/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/UnsafeNativeMethods.cs b/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/UnsafeNativeMethods.cs
index 3ff2498..6ad9d91 100644
--- a/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/UnsafeNativeMethods.cs
+++ b/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/UnsafeNativeMethods.cs
@@ -305,7 +305,7 @@ namespace Mono.Data.Sqlite
internal static extern int sqlite3_table_cursor(IntPtr stmt, int db, int tableRootPage);
[DllImport(SQLITE_DLL)]
- internal static extern int sqlite3_last_insert_rowid(IntPtr db);
+ internal static extern long sqlite3_last_insert_rowid(IntPtr db);
}
}
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]