Issue Details (XML | Word | Printable)

Key: CORE-6137
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Vlad Khorsun
Reporter: Vadim Mescheryakov
Votes: 3
Watchers: 7
Operations

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

Server crashes when it run SQL

Created: 04/Sep/19 04:23 PM   Updated: 08/Sep/19 10:25 AM
Component/s: Engine
Affects Version/s: 3.0.2, 3.0.3, 3.0.4, 3.0.5
Fix Version/s: 3.0.5, 4.0 Beta 2

File Attachments: 1. File test_tmp_labelbarcode.rar (140 kB)
2. File test_tmp_labelbarcode.sql (2 kB)

Environment: Linux CentOs 7 and Windows 8.1. Firebird 64 bit Super and Classic.

QA Status: Done successfully


 Description  « Hide
Server crashes when it runs SQL.

Error:
Unsuccessful execution caused by a system error that precludes successful execution of subsequent statements.
internal Firebird consistency check (can't continue after bugcheck).

SQL:

select tmp_labelbarcode.BARCODE
from tmp_labelbarcode
where tmp_labelbarcode.BARCODE = '462713603936820000004620016596753'
order by tmp_labelbarcode.BARCODE

Table

CREATE TABLE TMP_LABELBARCODE (
    ID INTEGER NOT NULL,
    BARCODE CHAR(20) NOT NULL,
    IDLABEL INTEGER NOT NULL
);

ALTER TABLE TMP_LABELBARCODE ADD PRIMARY KEY (ID);
CREATE INDEX TMLB_BARCODE ON TMP_LABELBARCODE (BARCODE);
CREATE INDEX TMLB_IDLABEL ON TMP_LABELBARCODE (IDLABEL);
CREATE UNIQUE INDEX TMP_LABELBARCODE_IDX1 ON TMP_LABELBARCODE (BARCODE, IDLABEL);


Error is only table with data.
May be it depends on data in rows




 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Vadim Mescheryakov added a comment - 04/Sep/19 04:25 PM
Script for creating database + table + filling data on table

Vadim Mescheryakov added a comment - 04/Sep/19 04:40 PM
This is smaller file with 10 records in table

Vadim Mescheryakov added a comment - 04/Sep/19 04:52 PM
Error presents if Table contains only one record;

INSERT INTO TMP_LABELBARCODE (ID, BARCODE, IDLABEL) VALUES (224423, '4627136039368', 278164);
 

Karol Bieniaszewski added a comment - 04/Sep/19 06:17 PM
confirmed on WIndows
and it is not releated to chaset tested with WIN1250 and NONE - same error


Message: isc_dsql_fetch failed.

SQL Message : -902
Unsuccessful execution caused by a system error that precludes successful execution of subsequent statements

Engine Code : 335544333
Engine Message :
internal Firebird consistency check (invalid SEND request (167), file: JrdStatement.cpp line: 327)

------------------------------------------------------------------------------------------------------------------------------------------------------
in the source code it is

jrd_req* JrdStatement::findRequest(thread_db* tdbb)
{
    SET_TDBB(tdbb);
    Attachment* const attachment = tdbb->getAttachment();
    const JrdStatement* const thisPointer = this; // avoid warning
    if (!thisPointer)
        BUGCHECK(167); /* msg 167 invalid SEND request */


Vlad Khorsun added a comment - 05/Sep/19 07:16 PM
Fixed in v3 and v4, v2.5 will follow

Vlad Khorsun added a comment - 08/Sep/19 10:24 AM
To reproduce on v2.5 problem query should be changed as

select tmp_labelbarcode.BARCODE
  from tmp_labelbarcode
 where tmp_labelbarcode.BARCODE < '562713603936820000004620016596753562713603936820000004620016596753'
order by tmp_labelbarcode.BARCODE;

Vlad Khorsun added a comment - 08/Sep/19 10:25 AM
Fix is commited into v2.5 too