db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-2859) Misleading error message if you supply too many arguments to SYSCS_UTIL.SYSCS_EXPORT_QUERY_LOBS_TO_EXTFILE
Date Wed, 20 Nov 2013 13:29:35 GMT

    [ https://issues.apache.org/jira/browse/DERBY-2859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13827644#comment-13827644
] 

Rick Hillegas commented on DERBY-2859:
--------------------------------------

Thanks, Mano. Can you try the following program, which runs successfully for me using both
the 10.11 trunk and the old 10.3.3.0 release. The program prints out the database version
and the version of Derby that is being used. Could you let us know what those printed versions
are? Thanks-Rick

{noformat}
import java.sql.*;
import javax.sql.rowset.serial.SerialBlob;

public class yy
{
    public static void main( String[] args ) throws Exception
    {
        Connection  conn = DriverManager.getConnection( "jdbc:derby:db;create=true" );

        ResultSet   rs = conn.prepareStatement
            ( "values syscs_util.syscs_get_database_property( 'DataDictionaryVersion' )" ).executeQuery();
        rs.next();
        System.out.println( "Database version is " + rs.getString( 1 ) );
        rs.close();
        System.out.println( "Version of Derby jars is " + conn.getMetaData().getDatabaseProductVersion()
);

        conn.prepareStatement( "create table t( a int, b blob )" ).execute();

        PreparedStatement   ps = conn.prepareStatement( "insert into t values ( ?, ? )" );
        ps.setInt( 1, 1 );
        ps.setBlob( 2, new SerialBlob( new byte[] { (byte) 1, (byte) 2, (byte) 3 } ) );
        ps.setInt( 1, 2 );
        ps.execute();
        ps.setBlob( 2, new SerialBlob( new byte[] { (byte) 4, (byte) 5, (byte) 6 } ) );
        ps.execute();
        ps.close();

        PreparedStatement   ps2 = conn.prepareStatement
            ( "CALL SYSCS_UTIL.SYSCS_EXPORT_TABLE_LOBS_TO_EXTFILE( ?,?,?,?,?,?,? )" );
        ps2.setString( 1, "APP" );
        ps2.setString( 2, "T" );
        ps2.setString( 3, "t.dat" );
        ps2.setString( 4, null );
        ps2.setString( 5, null );
        ps2.setString( 6, null );
        ps2.setString( 7, "t.blobs" );
        ps2.execute();
        ps2.close();
    }

}
{noformat}


> Misleading error message if you supply too many arguments to SYSCS_UTIL.SYSCS_EXPORT_QUERY_LOBS_TO_EXTFILE
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2859
>                 URL: https://issues.apache.org/jira/browse/DERBY-2859
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL, Tools
>    Affects Versions: 10.3.1.4
>            Reporter: Rick Hillegas
>            Priority: Minor
>              Labels: derby_triage10_5_2
>
> If you supply too many arguments to SYSCS_UTIL.SYSCS_EXPORT_QUERY_LOBS_TO_EXTFILE, you
get an error message telling you that SYSCS_UTIL.SYSCS_EXPORT_QUERY_LOBS_TO_EXTFILE is an
unknown procedure. Instead, you should get an error message which tells you that the signature
can't be matched to a known overload of the procedure:
> ij> call SYSCS_UTIL.SYSCS_EXPORT_QUERY_LOBS_TO_EXTFILE
> (
>   'select * from lobtable where updateCount in( 2, 4 )',
>   'LOBTABLE',
>   '/export/home/rick/junk/test-export-table1.dat',
>   null,
>   null,
>   null,
>   '/export/home/rick/junk/test-export-query1-lobs.dat'
> );
> ERROR 42Y03: 'SYSCS_UTIL.SYSCS_EXPORT_QUERY_LOBS_TO_EXTFILE' is not recognized as a function
or procedure.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message