Skip to content

Firebird 6.0.0 is eating underscores in character set when running external execute statements #9088

Description

@tonne1

Requirements:
2 FB6 databases with character set ISO8859_1. Lets call them "caller" and "target".

  1. In one of them (caller), create this SP:
create or alter procedure check_external (
    un varchar(100),
    pw varchar(100),
    dbc varchar(100) )
returns (
    cdate varchar(100) )
as
declare sql varchar(1000);
begin
  -- get creation date of external db
  sql = 'select mon$creation_date from mon$database';
  execute statement :sql as user :un password :pw on external :dbc into :cdate;
  suspend;
end;
  1. Make sure the other database (target) is not connected.
  2. Fill in placeholders to access target and query its creation date by running this from caller:
select * from check_external('<username>', '<password>', '<host/port:alias>');

result:

335544325 : bad parameters on attach or create database
335544509 : CHARACTER SET "SYSTEM"."ISO88591" is not defined
Data source : Firebird::<host/port:alias>; 
At procedure "PUBLIC"."CHECK_EXTERNAL" line: 15, col: 3 
[SQLState:42000, ISC error code:335544921]

Notice character set "ISO88591" in the error msg, it should be "ISO8859_1" of course.

BUT: If target is already connected from somewhere else, the statement runs fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions