db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nirmal Fernando <nirmal070...@gmail.com>
Subject SYSCS_UTIL.SYSCS_SET_XPLAIN_SCHEMA Error
Date Wed, 14 Jul 2010 14:17:27 GMT
Hi All,

I see a bad way of throwing an error, from SYSCS_UTIL class.

C:\OtherNirmal\GSoC\Code\test>java org.apache.derby.tools.ij
ij version 10.7
ij> CONNECT 'jdbc:derby:test1;create=false';
ij> CALL SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1);
0 rows inserted/updated/deleted
ij> CALL SYSCS_UTIL.SYSCS_SET_XPLAIN_SCHEMA('3892');
0 rows inserted/updated/deleted
ij> SELECT a.USER_ID, a.USER_NAME FROM Users a where a.USER_ID='User1';
USER_ID             |USER_NAME
-----------------------------------------------------------------------
User1               |This is info about a a user called User1

1 row selected
ij> CALL SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(0);
0 rows inserted/updated/deleted
ij> select stmt_id from 3892.sysxplain_statements;
ERROR 42X01: Syntax error: Encountered "3892." at line 1, column 21.
Issue the 'help' command for general information on IJ command syntax.
Any unrecognized commands are treated as potential SQL commands and executed
dir
ectly.
Consult your DBMS server reference documentation for details of the SQL
syntax s
upported by your server.
ij>


I think the error is probably due to use of an Integer instead of a
Character as
the starting character of schema name specified.

If it's the case I guess we should not allow that when a user initiates the
schema.

Isn't this a bug?

Thanks.
-- 
Best Regards,
Nirmal

C.S.Nirmal J. Fernando
Department of Computer Science & Engineering,
Faculty of Engineering,
University of Moratuwa,
Sri Lanka.

Mime
View raw message