Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Naive metadata extraction code in isql is defeated by "check" keyword typed in mixed case [CORE2741] #3136

Closed
firebird-issue-importer opened this issue Nov 7, 2009 · 4 comments

Comments

@firebird-issue-importer
Copy link

@firebird-issue-importer firebird-issue-importer commented Nov 7, 2009

Submitted by: Claudio Valderrama C. (robocop)

Assigned to: Claudio Valderrama C. (robocop)

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.

Commits: 402ccbd 58becc1 f83c4e0 6661495

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Nov 7, 2009

Modified by: Claudio Valderrama C. (robocop)

assignee: Claudio Valderrama C. [ robocop ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Nov 8, 2009

Modified by: Claudio Valderrama C. (robocop)

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.0.6 [ 10303 ]

Fix Version: 2.5 RC2 [ 10372 ]

Fix Version: 2.1.4 [ 10361 ]

Fix Version: 3.0 Alpha 1 [ 10331 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Nov 12, 2009

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 28, 2015

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: Done successfully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment