Modified:
branches/branch_5_1/CHANGES
branches/branch_5_1/src/com/mysql/jdbc/MysqlIO.java
Log:
Fixed MysqlIO.nextRowFast() to only attempt to read server
warning counts and status if talking to a 4.1 or newer server
(fixes a hang when reading data from 4.0 servers).
Modified: branches/branch_5_1/CHANGES
===================================================================
--- branches/branch_5_1/CHANGES 2007-10-23 17:47:15 UTC (rev 6643)
+++ branches/branch_5_1/CHANGES 2007-10-23 17:49:01 UTC (rev 6644)
@@ -15,6 +15,10 @@
driver). This fix touches *all* metadata information coming
from the MySQL server itself.
+ - Fixed MysqlIO.nextRowFast() to only attempt to read server
+ warning counts and status if talking to a 4.1 or newer server
+ (fixes a hang when reading data from 4.0 servers).
+
10-09-07 - Version 5.1.5
- Released instead of 5.1.4 to pickup patch for BUG#31053
Modified: branches/branch_5_1/src/com/mysql/jdbc/MysqlIO.java
===================================================================
--- branches/branch_5_1/src/com/mysql/jdbc/MysqlIO.java 2007-10-23 17:47:15 UTC (rev 6643)
+++ branches/branch_5_1/src/com/mysql/jdbc/MysqlIO.java 2007-10-23 17:49:01 UTC (rev 6644)
@@ -1518,20 +1518,25 @@
}
if (sw == 254 && packetLength < 9) {
- this.warningCount = (this.mysqlInput.read() & 0xff)
- | ((this.mysqlInput.read() & 0xff) << 8);
- remaining -= 2;
+ if (this.use41Extensions) {
+ this.warningCount = (this.mysqlInput.read() & 0xff)
+ | ((this.mysqlInput.read() & 0xff) << 8);
+ remaining -= 2;
- if (this.warningCount > 0) {
- this.hadWarnings = true; // this is a 'latch', it's reset by sendCommand()
- }
+ if (this.warningCount > 0) {
+ this.hadWarnings = true; // this is a
+ // 'latch', it's
+ // reset by
+ // sendCommand()
+ }
- this.serverStatus = (this.mysqlInput.read() & 0xff)
- | ((this.mysqlInput.read() & 0xff) << 8);
- remaining -= 2;
+ this.serverStatus = (this.mysqlInput.read() & 0xff)
+ | ((this.mysqlInput.read() & 0xff) << 8);
+ remaining -= 2;
- if (remaining > 0) {
- skipFully(this.mysqlInput, remaining);
+ if (remaining > 0) {
+ skipFully(this.mysqlInput, remaining);
+ }
}
return null; // last data packet
| Thread |
|---|
| • Connector/J commit: r6644 - in branches/branch_5_1: . src/com/mysql/jdbc | mmatthews | 23 Oct |