Subject | Long-standing bug in Jaybird fixed |
---|---|
Author | Nickolay Samofatov |
Post date | 2003-05-30T20:36:40Z |
Hello, All !
I finally traced out the reason of database crashes,
and strange messages from Jaybird driver. I use stored
procedures from subqueries in select-list. Sometimes (really rarely)
this procedures throw exceptions. If it happens not on the first row -
Jaybird crashes (not on this query, but later) and may crash database then.
Here is the patch that fixes the problem. Can Jaybird developers review
it and apply where necessary ?
Index: GDS_Impl.java
===================================================================
RCS file: /cvsroot/firebird/client-java/src/main/org/firebirdsql/jgds/GDS_Impl.java,v
retrieving revision 1.31
diff -u -b -B -r1.31 GDS_Impl.java
--- GDS_Impl.java 25 Apr 2003 11:47:22 -0000 1.31
+++ GDS_Impl.java 30 May 2003 20:28:19 -0000
@@ -1001,7 +1001,13 @@
if (sqldata_messages > 0 && sqldata_status == 0) {
in.readSQLData(xsqlda.ioLength,stmt);
- nextOperation(db);
+ do {
+ op = nextOperation(db);
+ if (op==op_response) {
+ receiveResponse(db, op);
+ continue;
+ }
+ } while (false);
}
} while (sqldata_messages > 0 && sqldata_status == 0);
--
Best regards,
Nickolay Samofatov mailto:skidder@...
I finally traced out the reason of database crashes,
and strange messages from Jaybird driver. I use stored
procedures from subqueries in select-list. Sometimes (really rarely)
this procedures throw exceptions. If it happens not on the first row -
Jaybird crashes (not on this query, but later) and may crash database then.
Here is the patch that fixes the problem. Can Jaybird developers review
it and apply where necessary ?
Index: GDS_Impl.java
===================================================================
RCS file: /cvsroot/firebird/client-java/src/main/org/firebirdsql/jgds/GDS_Impl.java,v
retrieving revision 1.31
diff -u -b -B -r1.31 GDS_Impl.java
--- GDS_Impl.java 25 Apr 2003 11:47:22 -0000 1.31
+++ GDS_Impl.java 30 May 2003 20:28:19 -0000
@@ -1001,7 +1001,13 @@
if (sqldata_messages > 0 && sqldata_status == 0) {
in.readSQLData(xsqlda.ioLength,stmt);
- nextOperation(db);
+ do {
+ op = nextOperation(db);
+ if (op==op_response) {
+ receiveResponse(db, op);
+ continue;
+ }
+ } while (false);
}
} while (sqldata_messages > 0 && sqldata_status == 0);
--
Best regards,
Nickolay Samofatov mailto:skidder@...