Bug #58373 | ReadInteger problem | ||
---|---|---|---|
Submitted: | 22 Nov 2010 9:22 | Modified: | 2 Dec 2010 14:11 |
Reporter: | Barbara Post | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / NET | Severity: | S2 (Serious) |
Version: | 6.3.5 | OS: | Windows (MySql 5.1.22-community) |
Assigned to: | CPU Architecture: | Any |
[22 Nov 2010 9:22]
Barbara Post
[22 Nov 2010 9:26]
Barbara Post
A precision : my column in DB is of exact type "unsigned int, not null, auto inc".
[22 Nov 2010 9:42]
Barbara Post
Another precision : tThe error happens when the inserted ID is read after insert, and the value to insert was generated by Guid.NewGuid().ToString().
[22 Nov 2010 9:51]
Tonci Grgin
Hi Barbara. It would be nice to have a small but complete test case (along with DDL/DML needed) attached and MySQL server version noted.
[22 Nov 2010 13:32]
Barbara Post
OK, when I have time, soon...
[22 Nov 2010 16:01]
Tonci Grgin
Barbara, don't get me wrong. I get tens of reports daily and if I'm to check them I really need something to work on. Worst thing would be that, guided by wrong assumptions, I test the report "my way" and declare it !Bg...
[24 Nov 2010 12:07]
Barbara Post
Test case : console app to run + script to create testdb DB
Attachment: BugReport58373.zip (application/zip, text), 183.19 KiB.
[24 Nov 2010 12:09]
Barbara Post
Well, I was finally able to pinpoint the bug and uploaded a test case. The primary key of the table I insert into is named "ID", and the auto incremented value it has before I insert is quite big. There is a problem when retrieving the last inserted id, because of the "ID" name. I wonder about wether this is a known bug...
[30 Nov 2010 9:22]
Bogdan Degtyariov
Setting the status to verified. Got the following stack trace: at MySqlPacket.ReadInteger(Int32 numbytes) at MySqlPacket.ReadFieldLength() at NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId) at Driver.GetResult(Int32 statementId, Int32& affectedRows, Int32& insertedId) at Driver.NextResult(Int32 statementId) at MySqlDataReader.NextResult() at MySqlCommand.ExecuteReader(CommandBehavior behavior) at MySqlCommand.ExecuteReader() at MySqlCommand.ExecuteScalar() at TestBug.Main(String[] args) C:\Projects\bugs\58373\BugReport58373\BugReport58373\Program.cs(34) at AppDomain._nExecuteAssembly(Assembly assembly, String[] args) at AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at HostProc.RunUsersAssembly() at ThreadHelper.ThreadStart_Context(Object state) at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at ThreadHelper.ThreadStart() The program '[9204] BugReport58316.vshost.exe: Managed (v2.0.50727)' has exited with code 1 (0x1).
[30 Nov 2010 18:29]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/125548 849 Reggie Burnett 2010-11-30 - fixed ReadFieldLength to return a long so bigint autoincrement columns can work (bug #58373)
[30 Nov 2010 18:32]
Reggie Burnett
fixed in 6.0.8, 6.1.6, 6.2.5, 6.3.6+
[2 Dec 2010 14:11]
Tony Bedford
An entry has been added to the 6.0.8, 6.1.6, 6.2.5, and 6.3.6 changelogs: ReadFieldLength() returned incorrect value for BIGINT autoincrement columns.