Naive metadata extraction code in isql is defeated by "check" keyword typed in mixed case
-----------------------------------------------------------------------------------------
Key: CORE-2741
URL:
http://tracker.firebirdsql.org/browse/CORE-2741 Project: Firebird Core
Issue Type: Bug
Components: ISQL
Affects Versions: 3.0 Initial, 1.5.6, 2.1.3, 2.5 Beta 2, 2.5 Beta 1, 2.1.2, 2.0.5, 2.1.1, 2.5 Alpha 1, 2.0.4, 2.1.0, 1.5.5, 2.0.3, 2.0.2, 2.0.1, 1.5.4, 2.0.0
Reporter: Claudio Valderrama C.
Notice how we type "check" in this example:
F:\fb3dev\fbbuild\firebird30\temp\Win32\Debug\firebird\bin>isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> create database 'surprise.fdb';
SQL> create domain d int chEck (value > 0);
SQL> ^Z
Now, let's extract metadata:
F:\fb3dev\fbbuild\firebird30\temp\Win32\Debug\firebird\bin>isql -x SURPRISE.FDB
Database: SURPRISE.FDB
SET SQL DIALECT 3;
/* CREATE DATABASE 'SURPRISE.FDB' PAGE_SIZE 4096 DEFAULT CHARACTER SET NONE */
/* Domain definitions */
CREATE DOMAIN D AS INTEGER
( chEck (value > 0));
If you submit this script to the server, the extra pair of parentheses is rejected in the syntax. This extra pair comes from isql assuming that the constraint is a non-SQL one (from very old times before IB4) that needs such artifact and in turn, isql naively expects that the user types "check" or "CHECK", but not mixed case.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://tracker.firebirdsql.org/secure/Administrators.jspa-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.
http://p.sf.net/sfu/bobj-julyFirebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel