Issue Details (XML | Word | Printable)

Key: CORE-6411
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Dmitry Yemanov
Reporter: Pavel Zotov
Votes: 0
Watchers: 2
Operations

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

FB crashes on attempt to create table with number of fields greater than 5460.

Created: 28/Sep/20 05:44 PM   Updated: 30/Sep/20 12:11 PM
Component/s: Engine
Affects Version/s: 4.0 Beta 2, 3.0.6
Fix Version/s: 3.0.7, 4.0 RC 1

QA Status: Done with caveats
Test Details:
One issue (with same origin as the source bug) remains unresolved: when we create table with COMPUTED-BY field which expression contains lot of terms.
Apropriate code will be added to .fbt after fix for this will appear.
Ticket must NOT be closed until this.

Discussed with dimitr, 29-sep-2020 15:43.


 Description  « Hide
Following batch creates .sql which, in turn, attempts to create table with huge number of fields - more than 5000.
Table contains field ID (primary key) plus other ("user") fields with names start with 'F'.

When total number of "user" fields ("F1", "F2", ...) exceeds 'magic number' = 5459 then FB crashes.
Checked on WI-V3.0.7.33365, WI-V4.0.0.2204.

=======
@echo off
setlocal enabledelayedexpansion enableextensions
set tmpsql=%~dpn0.sql.tmp
set fbc=C:\FB\30SS
set dbnm=c:\temp\tmp4test.fdb
set ISC_USER=SYSDBA
set ISC_PASSWORD=masterkey
@rem theshold for FB 3.x and FB 4.x: set FLD_COUNT=5460 -- crashes since this value
set FLD_COUNT=5459
 
if exist !dbnm! del !dbnm!
if exist !dbnm!.delta del !dbnm!.delta
 
echo create database 'localhost:!dbnm!'; | !fbc!\isql -q -z
!fbc!\gfix -w async !dbnm!
 
echo recreate table tdata(id bigint primary key > !tmpsql!
(
    for /l %%i in (1 1 !FLD_COUNT!) do (
        echo ,f%%i bigint
    )
) >>!tmpsql!
echo ^); >>!tmpsql!
echo commit; >>!tmpsql!
 
echo !date! !time! point before create table
!fbc!\isql localhost:!dbnm! -i !tmpsql!
echo !date! !time! point after create table
 
echo update or insert into tdata values( 1 >!tmpsql!
(
    for /l %%i in (1 1 !FLD_COUNT!) do (
        echo ,%%i
    )
) >>!tmpsql!
echo ^) matching(id^); >>!tmpsql!
echo commit; >>!tmpsql!
 
echo !date! !time! point before update or insert
!fbc!\isql localhost:!dbnm! -i !tmpsql!
echo !date! !time! point after update or insert
=======


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.