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

Regression: crash when built-in function LEFT() or RIGHT() missed 2nd argument (number of characters to be taken). [CORE6251] #6494

firebird-automations opened this issue Feb 19, 2020 · 4 comments


Copy link

Submitted by: @pavel-zotov

Scenario to reproduce:

set bail on;
shell del c:\temp\tmp4test.fdb 2>nul;
create database 'localhost:c:\temp\tmp4test.fdb';
show version;

recreate table test( s varchar(10) );

set echo on;
connect 'localhost:c:\temp\tmp4test.fdb';
select 1 as z from test f where right( f.s ) = '1';

Console output:

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

(the same for LEFT(); but not for SUBSTRING() ).


REMOTE INTERFACE/gds__detach: Unsuccesful detach from database.
Uncommitted work may have been lost.
Error writing data to the connection.

Stack traces:

Checked on:
WI-V3.0.6.33249; WI-T4.0.0.1777

Expected (WI-V2.5.9.27149):
Statement failed, SQLSTATE = 39000
function LEFT could not be matched

Commits: d72cffa 2d6a2b6

Copy link
Collaborator Author

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

Copy link
Collaborator Author

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

Fix Version: 4.0 Beta 2 [ 10888 ]

Fix Version: 3.0.6 [ 10889 ]

Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: No test => Done successfully

Copy link
Collaborator Author

Modified by: @pavel-zotov

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

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