Bug #60262 | client side commit strangeness when autocommit disabled (with innodb) | ||
---|---|---|---|
Submitted: | 26 Feb 2011 1:01 | Modified: | 26 Feb 2011 17:19 |
Reporter: | Thomas Farthing | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: C API (client library) | Severity: | S2 (Serious) |
Version: | 5.5.9 | OS: | Windows (Windows7 on server and client) |
Assigned to: | CPU Architecture: | Any | |
Tags: | autocommit, fetch, innodb, multiple connections, MYSQL_NO_DATA |
[26 Feb 2011 1:01]
Thomas Farthing
[26 Feb 2011 1:03]
Thomas Farthing
repro sample
Attachment: main.cpp (text/plain), 4.16 KiB.
[26 Feb 2011 9:09]
Valeriy Kravchuk
Doesn't this manual page, http://dev.mysql.com/doc/refman/5.5/en/innodb-consistent-read.html, explain the results you see: "If the transaction isolation level is REPEATABLE READ (the default level), all consistent reads within the same transaction read the snapshot established by the first such read in that transaction. You can get a fresher snapshot for your queries by committing the current transaction and after that issuing new queries." So, your connection #2 sees data as they are at the moment of the first SELECT, that is, with no rows in that other table. When you open other connection, it is a different transaction that sees data as they are at the moment of the first SELECT.
[26 Feb 2011 17:10]
Thomas Farthing
Wow, it does. I'm very sorry for the bug submission.