Issue Details (XML | Word | Printable)

Key: CORE-1196
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Vlad Khorsun
Reporter: michalk1
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
Firebird Core

Long SQL statements break TCP/IP connection

Created: 06/Apr/07 03:47 AM   Updated: 19/Jan/16 05:48 AM
Component/s: Engine
Affects Version/s: 2.1 Initial, 2.1 Beta 1
Fix Version/s: 2.1 Beta 2

File Attachments: 1. File core-1196.sql (32 kB)

Environment: FB Alpha 1 - Superserver, Windows XP SP2, FlameRobin 0.7.6
Issue Links:

QA Status: Done successfully

 Description  « Hide
Execution of long statement breaks remote protocol connection with errors "Unable to complete network reqest to host" and "Error reading data from the connection" or "Error writing data to the connection". The error probability increases with statement length, especially if it contains comments and/or is spread across many lines.

The same statement executes ok if I
 - use true local connection (no localhost) OR
 - use stable FB version (2.0.1) OR
 - use FB 2.1 Alpha 1, but with older client library (from FB 2.0.1)

This one is long enough to break the connection reliably, but much shorter statements (around 50 lines, 2 kB size) are affected:

  1, /* Looooooooong comment */
  2, /* Looooooooong comment */
  999, /* Looooooooong comment */

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Dmitry Yemanov added a comment - 06/Apr/07 03:59 AM
Fixed in CVS a few days ago.

Philippe Makowski added a comment - 10/Jul/07 04:25 AM
I can't close this one

When I run such statement with FB2.1 under Windows with isql, isql crash and I get in firebird.log
INET/inet_error: read errno = 10054
XNET error (xnet:2044) connection lost: another side is dead

Pavel Cisar added a comment - 10/Jul/07 05:15 AM
Can't confirm the fix fox 2.1 Beta 1. Attached script will close the connection and crash the client. It doesn't matter whether the connection is local (firebird.log error is: XNET error (xnet:2044) connection lost: another side is dead) or remote (firebird.log error is: INET/inet_error: read errno = 10054). The server doesn't crash. It works ok in 2.0.1.

Vlad Khorsun added a comment - 10/Jul/07 06:13 AM
Real reason for bug is not a length of statement text but a big number of output parameters.
When it can't be described in initial information buffer (32K) then we see such a bug.

Philippe Makowski added a comment - 04/Apr/08 09:42 AM
Q/A test ok