Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SELECT using IN list with 153 or more elements causes crash. [CORE3740] #4084

Closed
firebird-automations opened this issue Jan 24, 2012 · 5 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Brent Rowland (brentrowland)

Votes: 1

Easily reproduced by filling simple table with enough rows and executing select statement.

brent$ isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> create database "localhost:/var/fbdata/macbug.fdb" user "sysdba" password "masterkey";
SQL> create sequence foo_seq;
SQL> create table foos (id int);
SQL> insert into foos select gen_id(foo_seq, 1) from rdb$relation_fields;
SQL> select count(*) from foos;

   COUNT 

============
343

SQL> select * from foos where id in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153);

      ID 

============
Statement failed, SQLSTATE = 08006
Error reading data from the connection.

firebird.log contains:

BackInSilver Wed Nov 30 07:41:25 2011
/Library/Frameworks/Firebird.framework/Resources/bin/fbguard: /Library/Frameworks/Firebird.framework/Resources/English.lproj/var/bin/fb_smp_server terminated due to startup error (2)

This is only on Mac, never on Linux.

brent$ isql -z
ISQL Version: UI-V2.5.1.26351 Firebird 2.5

Firebird 2.5.0 crashed with 417 or more elements.
Firebird 2.1.3 crashed with 413 or more elements.

Commits: 4474c2a 51014eb 755790d 19730bf d9846a2 70835c8

====== Test Details ======

Note-1. Firebird 2.5.0 and 2.5.1 -- also WORK fine on the following script
(despite ticket's issue "affected version(s) 2.5.1"), so these versions also can be tested here.
Note-2. As of march-2015 (build 3.0.0.31756), there is some kind of regression in performance
of parsing huge literal lists in comparison with all 2.5.x versions, see CORE4728.

@firebird-automations
Copy link
Collaborator Author

Commented by: @paulbeach

This is a gcc optimisation issue, we build the 64bit default version of Firebird with -O3 set, removing this from the compile command line resolves the problem.

@firebird-automations
Copy link
Collaborator Author

Modified by: @paulbeach

assignee: Paul Beach [ pbeach ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @paulbeach

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.5.2 [ 10450 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: Done successfully

Test Details: Note-1. Firebird 2.5.0 and 2.5.1 -- also WORK fine on the following script
(despite ticket's issue "affected version(s) 2.5.1"), so these versions also can be tested here.
Note-2. As of march-2015 (build 3.0.0.31756), there is some kind of regression in performance
of parsing huge literal lists in comparison with all 2.5.x versions, see CORE4728.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants