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

FB crashes on attempt to create table with number of fields greater than 5460. [CORE6411] #6649

Closed
firebird-issue-importer opened this issue Sep 28, 2020 · 6 comments

Comments

@firebird-issue-importer

Submitted by: @pavel-zotov

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

Commits: 92830d4 c7548da

====== 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.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 28, 2020

Modified by: @dyemanov

assignee: Dmitry Yemanov [ dimitr ]

Loading

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 28, 2020

Modified by: @dyemanov

status: Open [ 1 ] => In Progress [ 3 ]

Loading

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 28, 2020

Modified by: @dyemanov

Fix Version: 3.0.7 [ 10940 ]

Loading

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 29, 2020

Modified by: @dyemanov

status: In Progress [ 3 ] => Open [ 1 ]

Loading

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 29, 2020

Modified by: @dyemanov

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

resolution: Fixed [ 1 ]

Fix Version: 4.0 RC 1 [ 10930 ]

Loading

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 30, 2020

Modified by: @pavel-zotov

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

QA Status: No test => 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.

Loading

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

Successfully merging a pull request may close this issue.

None yet
2 participants