FirebirdSQL/firebird

Can not specify concrete IPv6 address in ES/EDS connection string.

pavel-zotov opened this issue · 1 comments

Consider script:

set list on;
set echo on;
connect 'inet6://[::1]/employee';

select mon$remote_protocol as procotol_when_connect_from_isql
from mon$attachments where mon$attachment_id = current_connection;

set term ^;
execute block returns(protocol_when_connect_by_es_eds varchar(20) ) as
    declare stt varchar(255) = 'select mon$remote_protocol from mon$attachments where mon$attachment_id = current_connection';
begin
    for
        execute statement (stt)
            on external 'inet6://[::1]/employee'
            as user 'SYSDBA' password 'masterkey'
        into protocol_when_connect_by_es_eds
    do
        suspend;
end
^
set term ;^
commit;

On all current FB (3.x ... 6.x) it raises exception on ES/EDS:

Statement failed, SQLSTATE = 42000
External Data Source provider 'inet6://[' not found
-At block line: 4, col: 13

Attempts find workaround (i.e. specify IPv6 using '[[' & ']]'; or to make some kind of 'escaping' via ''; or enclosing into double quotes) have no result.

QA note: test is covered by test for CORE-5229 ( #5508 ).
Checked on 3.0.12.33757, 4.0.5.3112, 5.0.1.1416, 6.0.0.374