18 messages in com.mysql.lists.javaRe: transactions no longer being comm...| From | Sent On | Attachments |
|---|---|---|
| Jeff Mathis | 22 Jul 2003 15:25 | |
| Jeff Mathis | 22 Jul 2003 15:35 | |
| Mark Matthews | 22 Jul 2003 17:45 | |
| Rakesh Ayilliath | 23 Jul 2003 06:01 | |
| Shapiro, David | 23 Jul 2003 06:14 | |
| Jeff Mathis | 23 Jul 2003 08:24 | |
| Rakesh Ayilliath | 23 Jul 2003 08:25 | |
| Christopher Taylor | 23 Jul 2003 18:44 | |
| Jeff Mathis | 24 Jul 2003 08:20 | |
| Jeff Mathis | 24 Jul 2003 12:43 | |
| Jeff Mathis | 24 Jul 2003 13:25 | |
| Mark Matthews | 24 Jul 2003 14:05 | |
| Christopher Taylor | 24 Jul 2003 17:38 | |
| Jeff Mathis | 25 Jul 2003 08:41 | |
| Jeff Mathis | 25 Jul 2003 15:06 | |
| Jeff Mathis | 25 Jul 2003 15:12 | |
| Christopher Taylor | 25 Jul 2003 19:34 | |
| Jeff Mathis | 28 Jul 2003 07:51 |
| Subject: | Re: transactions no longer being committed![]() |
|---|---|
| From: | Mark Matthews (ma...@mysql.com) |
| Date: | 07/22/2003 05:45:17 PM |
| List: | com.mysql.lists.java |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Jeff Mathis wrote:
hello all,
I'm using the 3.0.7 release, and mysql-max 4.04 on solaris 5.8
something has recently changed in my codebase where transactions are no longer being committed when the same jvm spawns multiple threads, each with its own database connection. when I run with a single connection, transactions are committed fine. Its all the same code, whether a single connection is made or multiple connections. the user is the same for all connections.
When the commit method is called on the connection, no errors are thrown, and debugging code indicates a new row has been added. all of my tables have an auto_increment id field, and after the alleged successful insert, I issue a "select max(id) from <tablename>" and watch that the id has in fact been incremented. However, if I simultaneously issue the same max(id) query from a mysql command line, there is no record of the new row when running multiple connections within the same jvm, but there is when there is only a single connection. Weird thing is is even though the mysql prompt query shows no record of the new insert, its apparently there because I get a unique constraint violation later in the insert process.
[snip]
What does your sequence in the mysql command-line client look like? Are you running in auto commit, or are you doing transactions? If you're doing transactions, any commits that have posted in other transactions won't be visible to yours until it commits as well (that's how repeatable read isolation levels via MVCC work).
-Mark
- -- Mr. Mark Matthews MySQL AB, Software Development Manager, J2EE and Windows Platforms Office: +1 708 557 2388 www.mysql.com
Are you MySQL Certified? http://www.mysql.com/certification/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQE/HdqytvXNTca6JD8RAq8tAJ9OwBwtStHcZ3e7Wqo6CudmjggZ4wCgjMvy NJTDh0hBnEMOVUNMHw1dLWA= =A+tt -----END PGP SIGNATURE-----




