Issue Details (XML | Word | Printable)

Key: CORE-2741
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Claudio Valderrama C.
Reporter: Claudio Valderrama C.
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Naive metadata extraction code in isql is defeated by "check" keyword typed in mixed case

Created: 07/Nov/09 05:04 PM   Updated: 12/Nov/09 05:54 PM
Component/s: ISQL
Affects Version/s: 2.0.0, 1.5.4, 2.0.1, 2.0.2, 2.0.3, 1.5.5, 2.1.0, 2.0.4, 2.5 Alpha 1, 2.1.1, 2.0.5, 2.1.2, 2.5 Beta 1, 2.5 Beta 2, 2.1.3, 1.5.6, 3.0 Initial
Fix Version/s: 2.5 RC2, 2.0.6, 2.1.4, 3.0 Alpha 1

Time Tracking:
Not Specified

Planning Status: Unspecified


 Description  « Hide
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.


 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.