Modified:
branches/branch_5_0/connector-j/src/com/mysql/jdbc/Connection.java
branches/branch_5_1/connector-j/src/com/mysql/jdbc/ConnectionImpl.java
Log:
Pickup the thread ID immediately after successful handshake, rather than waiting for initialization of server variables (to make debugging/tracing more correct).
Modified: branches/branch_5_0/connector-j/src/com/mysql/jdbc/Connection.java
===================================================================
--- branches/branch_5_0/connector-j/src/com/mysql/jdbc/Connection.java 2007-05-25 20:39:18 UTC (rev 6439)
+++ branches/branch_5_0/connector-j/src/com/mysql/jdbc/Connection.java 2007-05-30 17:27:36 UTC (rev 6440)
@@ -1551,7 +1551,6 @@
try {
createNewIO(false);
- this.connectionId = this.io.getThreadId();
this.dbmd = new DatabaseMetaData(this, this.database);
} catch (SQLException ex) {
cleanup(ex);
@@ -2748,6 +2747,7 @@
this.io.doHandshake(this.user, this.password,
this.database);
+ this.connectionId = this.io.getThreadId();
this.isClosed = false;
// save state from old connection
@@ -2898,6 +2898,7 @@
this.database);
pingInternal(false);
+ this.connectionId = this.io.getThreadId();
this.isClosed = false;
// save state from old connection
Modified: branches/branch_5_1/connector-j/src/com/mysql/jdbc/ConnectionImpl.java
===================================================================
--- branches/branch_5_1/connector-j/src/com/mysql/jdbc/ConnectionImpl.java 2007-05-25 20:39:18 UTC (rev 6439)
+++ branches/branch_5_1/connector-j/src/com/mysql/jdbc/ConnectionImpl.java 2007-05-30 17:27:36 UTC (rev 6440)
@@ -716,7 +716,6 @@
try {
createNewIO(false);
- this.connectionId = this.io.getThreadId();
this.dbmd = getMetaData();
} catch (SQLException ex) {
cleanup(ex);
@@ -1964,6 +1963,7 @@
this.io.doHandshake(this.user, this.password,
this.database);
+ this.connectionId = this.io.getThreadId();
this.isClosed = false;
// save state from old connection
@@ -2112,8 +2112,8 @@
this, getSocketTimeout());
this.io.doHandshake(this.user, this.password,
this.database);
-
pingInternal(false);
+ this.connectionId = this.io.getThreadId();
this.isClosed = false;
// save state from old connection
| Thread |
|---|
| • Connector/J commit: r6440 - in branches: branch_5_0/connector-j/src/com/mysql/jdbc branch_5_1/connector-j/src/com/mysql/jdbc | mmatthews | 30 May |