Issue Details (XML | Word | Printable)

Key: CORE-3740
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Paul Beach
Reporter: Brent Rowland
Votes: 1
Watchers: 5
Operations

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

SELECT using IN list with 153 or more elements causes crash.

Created: 24/Jan/12 07:55 PM   Updated: 27/Mar/14 01:17 PM
Component/s: Build Issues / Porting
Affects Version/s: 2.5.1
Fix Version/s: 2.5.2

Time Tracking:
Not Specified

Environment: Mac 10.7,

Planning Status: Unspecified


 Description  « Hide
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.


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Paul Beach added a comment - 08/Aug/12 01:08 PM
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.