-
-
Notifications
You must be signed in to change notification settings - Fork 233
NULLIF crashes when first parameter is constant empty string [CORE1560] #1979
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
Comments
Commented by: Vladimir Kozlov (vkozlov) 2.1.0.16967 affected too. |
Modified by: Vladimir Kozlov (vkozlov)description: Server crashes when inserting in GTT. To reproduce, make a GTT on empty database: create global temporary table doc$70$invoice ( alter table doc$70$invoice add constraint pk_doc$70$invoice primary key (iddocrow); and try to execute insert (from IBExpert's SQL Editor) INSERT INTO doc$70$invoice (iddocrow,idgoods,qty,price,invamt,custcode,recompriceopt,recompriceprim) After this server crashes. => NULLIF crashes when first parameter is constant empty string and second parameter is constant or variable with empty string. for example: declare variable i varchar(10); i = ''; j = nullif(i,i); - works i = 'aaa'; j = nullif('',i); - works i = ''; j = nullif('',i); - server crashes Easiest way to reproduce: select nullif('','') from rdb$database summary: Server crashes when insert to GTT => NULLIF crashes when first parameter is constant empty string |
Modified by: @AlexPeshkoffassignee: Alexander Peshkov [ alexpeshkoff ] |
Commented by: @AlexPeshkoff Cast from NULL to string value of 0 length was broken. Looks like it happened only with nullif('',''). |
Modified by: @AlexPeshkoffstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 2.1 RC1 [ 10201 ] |
Modified by: @pcisarWorkflow: jira [ 13373 ] => Firebird [ 14025 ] |
Commented by: @pmakowski Q/A test ok |
Modified by: @pmakowskistatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: Vladimir Kozlov (vkozlov)
Is related to QA199
NULLIF crashes when first parameter is constant empty string and second parameter is constant or variable with empty string.
for example:
declare variable i varchar(10);
declare variable j varchar(10);
i = ''; j = nullif(i,i); - works
i = 'aaa'; j = nullif('',i); - works
i = ''; j = nullif('',i); - server crashes
Easiest way to reproduce:
select nullif('','') from rdb$database
Commits: 82d480d
The text was updated successfully, but these errors were encountered: