Bug 8885 - SQLite int64
Summary: SQLite int64
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Android
Classification: Xamarin
Component: BCL Class Libraries ()
Version: 4.2.x
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-12-11 13:56 UTC by Goncalo Oliveira
Modified: 2012-12-12 05:14 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_REPRODUCIBLE

Description Goncalo Oliveira 2012-12-11 13:56:49 UTC
MFA 4.4.41

Exception: Number overflow

logcat
12-11 18:45:32.066: I/mono(1856): [ERROR] FATAL UNHANDLED EXCEPTION: System.OverflowException: Number overflow.
12-11 18:45:32.066: I/mono(1856):   at System.Convert.ToInt32 (Int64 value) [0x00000] in <filename unknown>:0 
12-11 18:45:32.066: I/mono(1856):   at System.Int64.System.IConvertible.ToInt32 (IFormatProvider provider) [0x00000] in <filename unknown>:0 
12-11 18:45:32.066: I/mono(1856):   at System.Convert.ToType (System.Object value, System.Type conversionType, IFormatProvider provider, Boolean try_target_to_type) [0x00000] in <filename unknown>:0 
12-11 18:45:32.066: I/mono(1856):   at System.Convert.ChangeType (System.Object value, System.Type conversionType, IFormatProvider provider) [0x00000] in <filename unknown>:0 
12-11 18:45:32.066: I/mono(1856):   at Mono.Data.Sqlite.SQLite3.GetValue (Mono.Data.Sqlite.SqliteStatement stmt, Int32 index, Mono.Data.Sqlite.SQLiteType typ) [0x00000] in <filename unknown>:0 
12-11 18:45:32.066: I/mono(1856):   at Mono.Data.Sqlite.SqliteDataReader.GetValue (Int32 i) [0x00000] in <filename unknown>:0 
12-11 18:45:32.066: I/mono(1856):   at Mono.Data.Sqlite.SqliteDataReader.get_Item (Int32 i) [0x00000] in <filename unknown>:0 
12-11 18:45:32.066: I/mono(1856):   at Vici.CoolStorage.CSDataProviderSQLite+CSSqliteReader.get_Item (Int32 i) [0x00000] in <filename unknow
12-11 18:45:32.310: I/ActivityThread(1903): Pub Frotcom.FMobile.mono.MonoRuntimeProvider.__mono_init__: mono.MonoRuntimeProvider

database table created
( ID int primary key, Name nvarchar(64), FormName nvarchar(64), Movement smallint, IsFree bit, [RowVersion] long, IsDeleted bit )

insert instruction
insert into ... ( ID, Name, FormName, Movement, IsFree, [RowVersion], IsDeleted ) 
values ( int, string, string, short, bool, long, bool )

select instruction
select ID, Name, FormName, Movement, IsFree, [RowVersion] ...

RowVersion field is an int64. Insert works. Select throws a number overflow.

I'm not positive, but I don't think this existed in previous release.
Comment 1 Goncalo Oliveira 2012-12-12 05:14:20 UTC
Nevermind this... problem is field created with "long" keyword...