In Jaybird the java implementation of the remote protocol is capable of 
retrieving the relation alias in a prepare, however with the native (and 
embedded) implementation this fails (or at least: the relation alias is 
not returned).

In the Java code the isc_dsql_prepare requests the following info items:
final static byte[] sql_prepare_info2 = new byte[] {
             ISCConstants.isc_info_sql_stmt_type,
             ISCConstants.isc_info_sql_select,
             ISCConstants.isc_info_sql_describe_vars,
             ISCConstants.isc_info_sql_sqlda_seq,
             ISCConstants.isc_info_sql_type, 
ISCConstants.isc_info_sql_sub_type,
             ISCConstants.isc_info_sql_scale, 
ISCConstants.isc_info_sql_length,
             ISCConstants.isc_info_sql_field,
             ISCConstants.isc_info_sql_relation,
             ISCConstants.isc_info_sql_relation_alias,
             ISCConstants.isc_info_sql_owner, 
ISCConstants.isc_info_sql_alias,
             ISCConstants.isc_info_sql_describe_end};

I notice in /jrd/why.cpp (2.5 branch) that a similar named array does 
not have the isc_info_sql_relation_alias entry:

static const SCHAR sql_prepare_info2[] =
{
        isc_info_sql_stmt_type,

        // describe_select_info
        isc_info_sql_select,
        isc_info_sql_describe_vars,
        isc_info_sql_sqlda_seq,
        isc_info_sql_type,
        isc_info_sql_sub_type,
        isc_info_sql_scale,
        isc_info_sql_length,
        isc_info_sql_field,
        isc_info_sql_relation,
        isc_info_sql_owner,
        isc_info_sql_alias,
        isc_info_sql_describe_end,

        // describe_bind_info
<removed describe_bind_info part>
};

Is this a bug or limitation in the implementation of the client, or do I 
need to do something extra in Jaybird to get the native library to 
retrieve the relational alias information as part of the prepare?

Mark
-- 
Mark Rotteveel

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to