Issue Details (XML | Word | Printable)

Key: CORE-4623
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Adriano dos Santos Fernandes
Reporter: Sascha Michel
Votes: 0
Watchers: 1
Operations

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

Regression: SP "Domain" and "Type Of" based variables referring BLOB with sub_type < 0 no longer work

Created: 24/Nov/14 12:34 PM   Updated: 28/May/15 03:26 PM
Component/s: None
Affects Version/s: 3.0 Beta 1
Fix Version/s: 3.0 Beta 2

Environment: Linux x64 Firebird-3.0.0.31441

QA Status: Done successfully
Test Details:
NB: according to firebirdfaq.org/faq165/ user applications should only use subtypes 0 and 1.
Test implemented with negative numbers after discuss with dimitr, starting letter: 20-apr-2015 16:00.


 Description  « Hide
SP variables ( Blob subt_ype < 0 ) as domain or table column reference will show an error. The same works fine in FB2.5

Undefined name.
CREATE OR ALTER PROCEDURE ATest failed.
Dynamic SQL Error.
SQL error code = -204.
Data type unknown.
Invalid use of CHARACTER SET or COLLATE.
 

CREATE DOMAIN "BinaryBlob_ZIP-FIle" AS
BLOB SUB_TYPE -200 SEGMENT SIZE 32000;

CREATE TABLE "ATestTable" (
    "BlobContent" "BinaryBlob_ZIP-FIle"
);

SET TERM ^ ;

CREATE OR ALTER procedure "ATest" (
    "InputBlob1" blob sub_type -200 segment size 32000, <---- This works
    "InputBlob2" type of column "ATestTable"."BlobContent", <--- Not work in FB3 but in 2.5
    "InputBlob3" "BinaryBlob_ZIP-FIle") <--- Not work in FB3 but in 2.5
as
begin
end^

SET TERM ; ^

A Variable from that type in a trigger will work in FB3
e.g.

CREATE OR ALTER TRIGGER "ATestTable_BI0" FOR "ATestTable"
ACTIVE BEFORE INSERT POSITION 0
AS
declare variable "BinaryBlob_ZIP-FIle" integer;
begin
end
^


/*
Undefined name.
CREATE OR ALTER PROCEDURE ATest failed.
Dynamic SQL Error.
SQL error code = -204.
Data type unknown.
Invalid use of CHARACTER SET or COLLATE.
*/



 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Sean Leyne added a comment - 24/Nov/14 09:52 PM
Michal,

Please clarify, it seems that there are several issues outlined/inter-mixed.

1- Does this work for both v2.5 and v3.0
 
  CREATE DOMAIN "BinaryBlob_ZIP-FIle" AS BLOB SUB_TYPE -200 SEGMENT SIZE 32000;
  CREATE TABLE "ATestTable" ( "BlobContent" "BinaryBlob_ZIP-FIle");


2- Does this work for both v2.5 and v3.0

  CREATE OR ALTER procedure "ATest" ( "InputBlob1" blob sub_type -200 segment size 32000);


3- Does this work for both v2.5 and v3.0

  CREATE OR ALTER procedure "ATest" ( "InputBlob2" type of column "ATestTable"."BlobContent");


4- Does this work for both v2.5 and v3.0

  CREATE OR ALTER procedure "ATest" ( "InputBlob3" "BinaryBlob_ZIP-FIle");


5- Does this work for both v2.5 and v3.0

  CREATE OR ALTER TRIGGER "ATestTable_BI0" FOR "ATestTable" ACTIVE BEFORE INSERT POSITION 0 AS
  declare variable "BinaryBlob_ZIP-FIle" integer;
  begin
  end

      {Do you realize that "BinaryBlob_ZIP-FIle" is not being used as a domain/data type?}

Sascha Michel added a comment - 24/Nov/14 10:31 PM
1- Does this work for both v2.5 and v3.0
Work on FB2 and FB3

  CREATE DOMAIN "BinaryBlob_ZIP-FIle" AS BLOB SUB_TYPE -200 SEGMENT SIZE 32000;
  CREATE TABLE "ATestTable" ( "BlobContent" "BinaryBlob_ZIP-FIle");

2- Does this work for both v2.5 and v3.0
Work on FB2 and FB3

  CREATE OR ALTER procedure "ATest" ( "InputBlob1" blob sub_type -200 segment size 32000);


3- Does this work for both v2.5 and v3.0
Work on FB2 and don't work on FB3

  CREATE OR ALTER procedure "ATest" ( "InputBlob2" type of column "ATestTable"."BlobContent");


4- Does this work for both v2.5 and v3.0
Work on FB2 and don't work on FB3

  CREATE OR ALTER procedure "ATest" ( "InputBlob3" "BinaryBlob_ZIP-FIle");


5- Does this work for both v2.5 and v3.0
Work on FB2 and don't work on FB3

  CREATE OR ALTER TRIGGER "ATestTable_BI0" FOR "ATestTable" ACTIVE BEFORE INSERT POSITION 0 AS
  declare variable "Test" "BinaryBlob_ZIP-FIle" ;
  begin
  end

  {Do you realize that "BinaryBlob_ZIP-FIle" is not being used as a domain/data type?}
No, was my fault. Tested again - thanks