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

Some bugs in GSTAT's parameters processing [CORE1412] #1830

Closed
firebird-issue-importer opened this issue Aug 12, 2007 · 6 comments
Closed

Some bugs in GSTAT's parameters processing [CORE1412] #1830

firebird-issue-importer opened this issue Aug 12, 2007 · 6 comments

Comments

@firebird-issue-importer

Submitted by: Kuznetsov Eugene (eugene)

Assigned to: Claudio Valderrama C. (robocop)

As long as all these bugs are closely related and
easy to resolve, I decided merge them into single post, not
to soil the tracker.

1. GSTAT allows inputting several database's names, but all actions
will be executed for the last one.

gstat -h localhost:employee -user SYSDBA -password masterkey localhost:help

returns header page for localhost:help instead of error message.

2. GSTAT doesn't return error message if switch -t is used without relation name

gstat -a localhost:employee -user SYSDBA -password masterkey -t

returns header info and 'Analyzing database pages ...' instead of error message

3. GSTAT doesn't return error message if switch -t is used, but only header info
is queried

gstat -h localhost:employee -user SYSDBA -password masterkey -t COUNTRY

4. GSTAT does not parse -t switch correctly, if's met before database name

Example: gstat -a -t COUNTRY localhost:employee -user SYSDBA -password masterkey
returns 'please retry, giving a database name'

If we look at dba.epp, we'll see next code

case IN\_SW\_DBA\_RELATION:
             sw\_relation = true;
             while \(argv < end && \*\*argv \!= '\-'\) \{
                 if \(strlen\(\*argv\) \> MAX\_SQL\_IDENTIFIER\_LEN\) \{
		 argv\+\+;
		 continue;
             \}  
             \.\.\.

So, -t will be correctly processing, only if another switch is found later or one is the
last switch in parameter string.

To resolve this, I suppose, we need to change syntax and prohibit using
several relation names after -t switch. In other words,

gstat -a localhost:employee -user SYSDBA -password masterkey -t COUNTRY CUSTOMER

should return error.

With best regards, Eugene

Commits: 2a8bb95

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 28, 2008

Modified by: @pcisar

Workflow: jira [ 12801 ] => Firebird [ 14723 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jun 24, 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 Jun 24, 2009

Commented by: Claudio Valderrama C. (robocop)

1.- Now it shows error with two database names
2.- This was an internal option that was made public. Now it checks that at least one table was given
3.- Not only -t, but most switches had unchecked conflict with -h; fixed now
4.- If gstat -t didn't receive yet the db name, it accepts only one table. If it got the db name already, it does the old logic.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jun 24, 2009

Modified by: Claudio Valderrama C. (robocop)

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

resolution: Fixed [ 1 ]

Fix Version: 2.5 RC1 [ 10300 ]

@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 Jan 19, 2016

Modified by: @pavel-zotov

QA Status: No test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant