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

Placing comment (single-lined or multi-lined) between final END of creating SP code and terminal character (^) produces compiling error when tool uses old API [CORE4890] #5184

Closed
firebird-issue-importer opened this issue Jul 29, 2015 · 10 comments

Comments

@firebird-issue-importer

Submitted by: @pavel-zotov

Following script (note that after `end` and before `^` there are comments):

set term ^;
create or alter procedure sp_test1 as
begin
exit;
end -- blah-blah-blah'
^

create or alter procedure sp_test2 as
begin
exit;
end /* blah-blah-blah */
^

-- runs OK in ISQL but produces strange exception in IBExpert when connecting to WI-V6.3.0.31948

Error messages in IBExpert:

Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements.
Parse to tokens error.
Missing close comment for --.

= and =

Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements.
Firebird::string - pos out of range.

(for the 1st and 2nd DDL accordingly).

I thought that this is bug in IBE but *no* such errors in this IDE when doing that on WI-V6.3.5.26916.

As I was explained in russian FB conference ( http://www.sql.ru/forum/actualutils.aspx?action=gotomsg&tid=1168067&msg=17946430 ), IBE uses some old kind of API rather than ISQL.

So, it seems that this is bug somewhere in FB-parser.

Commits: db0c84f FirebirdSQL/fbt-repository@3849ac9

====== Test Details ======

Waiting for reply on issue in CORE4882, 25/Aug/15 06:39 PM

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jul 29, 2015

Commented by: @asfernandes

What about test this connecting from 2.5 isql?

If it works, it's going to be an IBE bug (which seems to be IMO).

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jul 29, 2015

Commented by: @aafemt

What can you see in trace?

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jul 29, 2015

Commented by: @pavel-zotov

I works OK when I run this script using following:

1) connect from isql 2.5 to database 2.5:

ISQL Version: WI-V2.5.5.26916 Firebird 2.5
Server version:
Firebird/x86/Windows NT (access method), version "WI-V2.5.5.26916 Firebird 2.5"
Firebird/x86/Windows NT (remote server), version "WI-V2.5.5.26916 Firebird 2.5/tcp (csprog)/P12"
Firebird/x86/Windows NT (remote interface), version "WI-V2.5.5.26916 Firebird 2.5/tcp (csprog)/P12"
on disk structure version 11.2

2) connect from isql 3.0 to database 2.5:
ISQL Version: WI-V3.0.0.31948 Firebird 3.0 Release Candidate 1
Server version:
Firebird/Windows/Intel/i386 (access method), version "WI-V2.5.5.26916 Firebird 2.5"
Firebird/Windows/Intel/i386 (remote server), version "WI-V2.5.5.26916 Firebird 2.5/tcp (csprog)/P12"
Firebird/Windows/Intel/i386 (remote interface), version "WI-V3.0.0.31948 Firebird 3.0 Release Candidate 1/tcp (csprog)/P12"
on disk structure version 11.2

3) connect from isql 2.5 to database 3.0:

ISQL Version: WI-V2.5.5.26916 Firebird 2.5
Server version:
Firebird/x86/Windows NT (access method), version "WI-V3.0.0.31948 Firebird 3.0 Release Candidate 1"
Firebird/x86/Windows NT (remote server), version "WI-V3.0.0.31948 Firebird 3.0 Release Candidate 1/tcp (csprog)/P12"
Firebird/x86/Windows NT (remote interface), version "WI-V2.5.5.26916 Firebird 2.5/tcp (csprog)/P12"
on disk structure version 12.0

4) connect from isql 3.0 to database 3.0:

ISQL Version: WI-V3.0.0.31948 Firebird 3.0 Release Candidate 1
Server version:
Firebird/Windows/Intel/i386 (access method), version "WI-V3.0.0.31948 Firebird 3.0 Release Candidate 1"
Firebird/Windows/Intel/i386 (remote server), version "WI-V3.0.0.31948 Firebird 3.0 Release Candidate 1/tcp (csprog)/P13"
Firebird/Windows/Intel/i386 (remote interface), version "WI-V3.0.0.31948 Firebird 3.0 Release Candidate 1/tcp (csprog)/P13"
on disk structure version 12.0

I also works OK when I run this script in IBE and use fbclient 2.5 and database 2.5
It does NOT works when I run this script in IBE and use fbclient 3.0 and database 3.0

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jul 29, 2015

Commented by: @pavel-zotov

> What can you see in trace?

When I run trace with following config:

database
{
enabled = true
log_filename = /opt/fb30cs/ztrace.log
log_sweep = true
log_errors = true

time_threshold = 0

log_connections = true
log_transactions = true

log_context = true

log_statement_prepare = true
log_statement_start = true

log_statement_free = true
log_trigger_start = true
log_procedure_start = true

log_statement_finish = true

log_procedure_finish = true
log_function_finish = true
log_trigger_finish = true

print_plan = true
print_perf = true

max_sql_length = 8192
max_log_size = 5000000
}

-- and press F9 (run) in IBE with this script, trace will be filled with following messages:

Trace session ID 1 started
2015-07-29T22:23:54.7810 (3988:01B41B28) TRACE_INIT
SESSION_1

2015-07-29T22:23:54.7810 (3988:01B41B28) START_TRANSACTION
oltp30 (ATT_77, SYSDBA:NONE, UTF8, TCPv4:127.0.0.1)
C:\MIX\IBE\IBExpert.exe:3944
(TRA_637, CONCURRENCY | WAIT | READ_WRITE)

2015-07-29T22:23:54.7810 (3988:01B41B28) PREPARE_STATEMENT
oltp30 (ATT_77, SYSDBA:NONE, UTF8, TCPv4:127.0.0.1)
C:\MIX\IBE\IBExpert.exe:3944
(TRA_637, CONCURRENCY | WAIT | READ_WRITE)

Statement 71:
-------------------------------------------------------------------------------
SELECT COUNT(*) FROM RDB$RELATIONS WHERE RDB$RELATION_NAME = 'IBE$VERSION_HISTORY'

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PLAN (RDB$RELATIONS INDEX (RDB$INDEX_0))
0 ms

2015-07-29T22:23:54.7810 (3988:01B41B28) EXECUTE_STATEMENT_START
oltp30 (ATT_77, SYSDBA:NONE, UTF8, TCPv4:127.0.0.1)
C:\MIX\IBE\IBExpert.exe:3944
(TRA_637, CONCURRENCY | WAIT | READ_WRITE)

Statement 71:
-------------------------------------------------------------------------------
SELECT COUNT(*) FROM RDB$RELATIONS WHERE RDB$RELATION_NAME = 'IBE$VERSION_HISTORY'

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PLAN (RDB$RELATIONS INDEX (RDB$INDEX_0))

2015-07-29T22:23:54.7810 (3988:01B41B28) EXECUTE_STATEMENT_FINISH
oltp30 (ATT_77, SYSDBA:NONE, UTF8, TCPv4:127.0.0.1)
C:\MIX\IBE\IBExpert.exe:3944
(TRA_637, CONCURRENCY | WAIT | READ_WRITE)

Statement 71:
-------------------------------------------------------------------------------
SELECT COUNT(*) FROM RDB$RELATIONS WHERE RDB$RELATION_NAME = 'IBE$VERSION_HISTORY'

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PLAN (RDB$RELATIONS INDEX (RDB$INDEX_0))
1 records fetched
0 ms, 2 fetch(es)

2015-07-29T22:23:54.7810 (3988:01B41B28) CLOSE_CURSOR
oltp30 (ATT_77, SYSDBA:NONE, UTF8, TCPv4:127.0.0.1)
C:\MIX\IBE\IBExpert.exe:3944

Statement 71:
-------------------------------------------------------------------------------
SELECT COUNT(*) FROM RDB$RELATIONS WHERE RDB$RELATION_NAME = 'IBE$VERSION_HISTORY'

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PLAN (RDB$RELATIONS INDEX (RDB$INDEX_0))

2015-07-29T22:23:54.7810 (3988:01B41B28) COMMIT_TRANSACTION
oltp30 (ATT_77, SYSDBA:NONE, UTF8, TCPv4:127.0.0.1)
C:\MIX\IBE\IBExpert.exe:3944
(TRA_637, CONCURRENCY | WAIT | READ_WRITE)
0 ms, 1 write(s), 1 fetch(es), 1 mark(s)

2015-07-29T22:23:54.7810 (3988:01B41B28) FREE_STATEMENT
oltp30 (ATT_77, SYSDBA:NONE, UTF8, TCPv4:127.0.0.1)
C:\MIX\IBE\IBExpert.exe:3944

Statement 71:
-------------------------------------------------------------------------------
SELECT COUNT(*) FROM RDB$RELATIONS WHERE RDB$RELATION_NAME = 'IBE$VERSION_HISTORY'

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PLAN (RDB$RELATIONS INDEX (RDB$INDEX_0))

2015-07-29T22:23:54.7810 (3988:01B41B28) FREE_STATEMENT
oltp30 (ATT_77, SYSDBA:NONE, UTF8, TCPv4:127.0.0.1)
C:\MIX\IBE\IBExpert.exe:3944

Statement 70:
-------------------------------------------------------------------------------
select cast(1 as integer), cast(d.rdb$character_set_name as varchar(64)), cast(c.rdb$default_collate_name as varchar(64))
from rdb$database d
left join rdb$character_sets c ON (d.rdb$character_set_name = c.rdb$character_set_name)
union
select cast(2 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$FIELDS') and (rdb$field_name = 'RDB$FIELD_PRECISION')
union
select cast(6 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$RELATIONS') and (rdb$field_name = 'RDB$RELATION_TYPE')
union
select cast(8 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$GENERATORS') and (rdb$field_name = 'RDB$DESCRIPTION')
union
select cast(9 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$ROLES') and (rdb$field_name = 'RDB$DESCRIPTION')
union
select cast(10 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$PROCEDURE_PARAMETERS') and (rdb$field_name = 'RDB$PARAMETER_MECHANISM')
union
select cast(11 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$FUNCTION_ARGUMENTS') and (rdb$field_name = 'RDB$FIELD_PRECISION')
union
select cast(12 as integer), cast(rdb$field_length as varchar(64)), cast(' ' as varchar(64)) from rdb$fields
where (rdb$field_name = 'RDB$MESSAGE')
union
select cast(13 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$PROCEDURE_PARAMETERS') and (rdb$field_name = 'RDB$FIELD_NAME')
union
select cast(14 as integer), cast(rdb$relation_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relations
where (rdb$relation_name = 'RDB$ENCRYPTIONS')
union
select cast(15 as integer), cast(rdb$relation_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relations
where (rdb$relation_name = 'RDB$ROLES')
union
select cast(16 as integer), cast(rdb$character_set_name as varchar(64)), cast(' ' as varchar(64)) from rdb$character_sets
where (rdb$character_set_name = 'UTF8')
union
select cast(17 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$GENERATORS') and (rdb$field_name = 'RDB$INITIAL_VALUE')
union
select cast(18 as integer), cast(rdb$relation_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relations
where (rdb$relation_name = 'RDB$PACKAGES')
union
select cast(19 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$COLLATIONS') and (rdb$field_name = 'RDB$BASE_COLLATION_NAME')

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PLAN SORT (JOIN (D NATURAL, C INDEX (RDB$INDEX_19)), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$FIELDS INDEX (RDB$INDEX_2), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATIONS INDEX (RDB$INDEX_0), RDB$RELATIONS INDEX (RDB$INDEX_0), RDB$CHARACTER_SETS INDEX (RDB$INDEX_19), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATIONS INDEX (RDB$INDEX_0), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15))

2015-07-29T22:23:54.7810 (3988:01B41B28) START_TRANSACTION
oltp30 (ATT_77, SYSDBA:NONE, UTF8, TCPv4:127.0.0.1)
C:\MIX\IBE\IBExpert.exe:3944
(TRA_638, READ_COMMITTED | REC_VERSION | NOWAIT | READ_WRITE)

2015-07-29T22:23:54.7810 (3988:01B41B28) PREPARE_STATEMENT
oltp30 (ATT_77, SYSDBA:NONE, UTF8, TCPv4:127.0.0.1)
C:\MIX\IBE\IBExpert.exe:3944
(TRA_638, READ_COMMITTED | REC_VERSION | NOWAIT | READ_WRITE)

Statement 72:
-------------------------------------------------------------------------------
select cast(1 as integer), cast(d.rdb$character_set_name as varchar(64)), cast(c.rdb$default_collate_name as varchar(64))
from rdb$database d
left join rdb$character_sets c ON (d.rdb$character_set_name = c.rdb$character_set_name)
union
select cast(2 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$FIELDS') and (rdb$field_name = 'RDB$FIELD_PRECISION')
union
select cast(6 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$RELATIONS') and (rdb$field_name = 'RDB$RELATION_TYPE')
union
select cast(8 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$GENERATORS') and (rdb$field_name = 'RDB$DESCRIPTION')
union
select cast(9 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$ROLES') and (rdb$field_name = 'RDB$DESCRIPTION')
union
select cast(10 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$PROCEDURE_PARAMETERS') and (rdb$field_name = 'RDB$PARAMETER_MECHANISM')
union
select cast(11 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$FUNCTION_ARGUMENTS') and (rdb$field_name = 'RDB$FIELD_PRECISION')
union
select cast(12 as integer), cast(rdb$field_length as varchar(64)), cast(' ' as varchar(64)) from rdb$fields
where (rdb$field_name = 'RDB$MESSAGE')
union
select cast(13 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$PROCEDURE_PARAMETERS') and (rdb$field_name = 'RDB$FIELD_NAME')
union
select cast(14 as integer), cast(rdb$relation_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relations
where (rdb$relation_name = 'RDB$ENCRYPTIONS')
union
select cast(15 as integer), cast(rdb$relation_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relations
where (rdb$relation_name = 'RDB$ROLES')
union
select cast(16 as integer), cast(rdb$character_set_name as varchar(64)), cast(' ' as varchar(64)) from rdb$character_sets
where (rdb$character_set_name = 'UTF8')
union
select cast(17 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$GENERATORS') and (rdb$field_name = 'RDB$INITIAL_VALUE')
union
select cast(18 as integer), cast(rdb$relation_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relations
where (rdb$relation_name = 'RDB$PACKAGES')
union
select cast(19 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$COLLATIONS') and (rdb$field_name = 'RDB$BASE_COLLATION_NAME')

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PLAN SORT (JOIN (D NATURAL, C INDEX (RDB$INDEX_19)), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$FIELDS INDEX (RDB$INDEX_2), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATIONS INDEX (RDB$INDEX_0), RDB$RELATIONS INDEX (RDB$INDEX_0), RDB$CHARACTER_SETS INDEX (RDB$INDEX_19), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATIONS INDEX (RDB$INDEX_0), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15))
4 ms

2015-07-29T22:23:54.7810 (3988:01B41B28) EXECUTE_STATEMENT_START
oltp30 (ATT_77, SYSDBA:NONE, UTF8, TCPv4:127.0.0.1)
C:\MIX\IBE\IBExpert.exe:3944
(TRA_638, READ_COMMITTED | REC_VERSION | NOWAIT | READ_WRITE)

Statement 72:
-------------------------------------------------------------------------------
select cast(1 as integer), cast(d.rdb$character_set_name as varchar(64)), cast(c.rdb$default_collate_name as varchar(64))
from rdb$database d
left join rdb$character_sets c ON (d.rdb$character_set_name = c.rdb$character_set_name)
union
select cast(2 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$FIELDS') and (rdb$field_name = 'RDB$FIELD_PRECISION')
union
select cast(6 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$RELATIONS') and (rdb$field_name = 'RDB$RELATION_TYPE')
union
select cast(8 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$GENERATORS') and (rdb$field_name = 'RDB$DESCRIPTION')
union
select cast(9 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$ROLES') and (rdb$field_name = 'RDB$DESCRIPTION')
union
select cast(10 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$PROCEDURE_PARAMETERS') and (rdb$field_name = 'RDB$PARAMETER_MECHANISM')
union
select cast(11 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$FUNCTION_ARGUMENTS') and (rdb$field_name = 'RDB$FIELD_PRECISION')
union
select cast(12 as integer), cast(rdb$field_length as varchar(64)), cast(' ' as varchar(64)) from rdb$fields
where (rdb$field_name = 'RDB$MESSAGE')
union
select cast(13 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$PROCEDURE_PARAMETERS') and (rdb$field_name = 'RDB$FIELD_NAME')
union
select cast(14 as integer), cast(rdb$relation_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relations
where (rdb$relation_name = 'RDB$ENCRYPTIONS')
union
select cast(15 as integer), cast(rdb$relation_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relations
where (rdb$relation_name = 'RDB$ROLES')
union
select cast(16 as integer), cast(rdb$character_set_name as varchar(64)), cast(' ' as varchar(64)) from rdb$character_sets
where (rdb$character_set_name = 'UTF8')
union
select cast(17 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$GENERATORS') and (rdb$field_name = 'RDB$INITIAL_VALUE')
union
select cast(18 as integer), cast(rdb$relation_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relations
where (rdb$relation_name = 'RDB$PACKAGES')
union
select cast(19 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$COLLATIONS') and (rdb$field_name = 'RDB$BASE_COLLATION_NAME')

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PLAN SORT (JOIN (D NATURAL, C INDEX (RDB$INDEX_19)), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$FIELDS INDEX (RDB$INDEX_2), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATIONS INDEX (RDB$INDEX_0), RDB$RELATIONS INDEX (RDB$INDEX_0), RDB$CHARACTER_SETS INDEX (RDB$INDEX_19), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATIONS INDEX (RDB$INDEX_0), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15))

2015-07-29T22:23:54.7810 (3988:01B41B28) EXECUTE_STATEMENT_FINISH
oltp30 (ATT_77, SYSDBA:NONE, UTF8, TCPv4:127.0.0.1)
C:\MIX\IBE\IBExpert.exe:3944
(TRA_638, READ_COMMITTED | REC_VERSION | NOWAIT | READ_WRITE)

Statement 72:
-------------------------------------------------------------------------------
select cast(1 as integer), cast(d.rdb$character_set_name as varchar(64)), cast(c.rdb$default_collate_name as varchar(64))
from rdb$database d
left join rdb$character_sets c ON (d.rdb$character_set_name = c.rdb$character_set_name)
union
select cast(2 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$FIELDS') and (rdb$field_name = 'RDB$FIELD_PRECISION')
union
select cast(6 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$RELATIONS') and (rdb$field_name = 'RDB$RELATION_TYPE')
union
select cast(8 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$GENERATORS') and (rdb$field_name = 'RDB$DESCRIPTION')
union
select cast(9 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$ROLES') and (rdb$field_name = 'RDB$DESCRIPTION')
union
select cast(10 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$PROCEDURE_PARAMETERS') and (rdb$field_name = 'RDB$PARAMETER_MECHANISM')
union
select cast(11 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$FUNCTION_ARGUMENTS') and (rdb$field_name = 'RDB$FIELD_PRECISION')
union
select cast(12 as integer), cast(rdb$field_length as varchar(64)), cast(' ' as varchar(64)) from rdb$fields
where (rdb$field_name = 'RDB$MESSAGE')
union
select cast(13 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$PROCEDURE_PARAMETERS') and (rdb$field_name = 'RDB$FIELD_NAME')
union
select cast(14 as integer), cast(rdb$relation_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relations
where (rdb$relation_name = 'RDB$ENCRYPTIONS')
union
select cast(15 as integer), cast(rdb$relation_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relations
where (rdb$relation_name = 'RDB$ROLES')
union
select cast(16 as integer), cast(rdb$character_set_name as varchar(64)), cast(' ' as varchar(64)) from rdb$character_sets
where (rdb$character_set_name = 'UTF8')
union
select cast(17 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$GENERATORS') and (rdb$field_name = 'RDB$INITIAL_VALUE')
union
select cast(18 as integer), cast(rdb$relation_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relations
where (rdb$relation_name = 'RDB$PACKAGES')
union
select cast(19 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$COLLATIONS') and (rdb$field_name = 'RDB$BASE_COLLATION_NAME')

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PLAN SORT (JOIN (D NATURAL, C INDEX (RDB$INDEX_19)), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$FIELDS INDEX (RDB$INDEX_2), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATIONS INDEX (RDB$INDEX_0), RDB$RELATIONS INDEX (RDB$INDEX_0), RDB$CHARACTER_SETS INDEX (RDB$INDEX_19), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATIONS INDEX (RDB$INDEX_0), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15))
14 records fetched
0 ms, 72 fetch(es)

Table Natural Index Update Insert Delete Backout Purge Expunge
***************************************************************************************************************
RDB$DATABASE 1
RDB$FIELDS 1
RDB$RELATION_FIELDS 9
RDB$RELATIONS 2
RDB$CHARACTER_SETS 2

2015-07-29T22:23:54.7810 (3988:01B41B28) CLOSE_CURSOR
oltp30 (ATT_77, SYSDBA:NONE, UTF8, TCPv4:127.0.0.1)
C:\MIX\IBE\IBExpert.exe:3944

Statement 72:
-------------------------------------------------------------------------------
select cast(1 as integer), cast(d.rdb$character_set_name as varchar(64)), cast(c.rdb$default_collate_name as varchar(64))
from rdb$database d
left join rdb$character_sets c ON (d.rdb$character_set_name = c.rdb$character_set_name)
union
select cast(2 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$FIELDS') and (rdb$field_name = 'RDB$FIELD_PRECISION')
union
select cast(6 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$RELATIONS') and (rdb$field_name = 'RDB$RELATION_TYPE')
union
select cast(8 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$GENERATORS') and (rdb$field_name = 'RDB$DESCRIPTION')
union
select cast(9 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$ROLES') and (rdb$field_name = 'RDB$DESCRIPTION')
union
select cast(10 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$PROCEDURE_PARAMETERS') and (rdb$field_name = 'RDB$PARAMETER_MECHANISM')
union
select cast(11 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$FUNCTION_ARGUMENTS') and (rdb$field_name = 'RDB$FIELD_PRECISION')
union
select cast(12 as integer), cast(rdb$field_length as varchar(64)), cast(' ' as varchar(64)) from rdb$fields
where (rdb$field_name = 'RDB$MESSAGE')
union
select cast(13 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$PROCEDURE_PARAMETERS') and (rdb$field_name = 'RDB$FIELD_NAME')
union
select cast(14 as integer), cast(rdb$relation_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relations
where (rdb$relation_name = 'RDB$ENCRYPTIONS')
union
select cast(15 as integer), cast(rdb$relation_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relations
where (rdb$relation_name = 'RDB$ROLES')
union
select cast(16 as integer), cast(rdb$character_set_name as varchar(64)), cast(' ' as varchar(64)) from rdb$character_sets
where (rdb$character_set_name = 'UTF8')
union
select cast(17 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$GENERATORS') and (rdb$field_name = 'RDB$INITIAL_VALUE')
union
select cast(18 as integer), cast(rdb$relation_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relations
where (rdb$relation_name = 'RDB$PACKAGES')
union
select cast(19 as integer), cast(rdb$field_name as varchar(64)), cast(' ' as varchar(64)) from rdb$relation_fields
where (rdb$relation_name = 'RDB$COLLATIONS') and (rdb$field_name = 'RDB$BASE_COLLATION_NAME')

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PLAN SORT (JOIN (D NATURAL, C INDEX (RDB$INDEX_19)), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$FIELDS INDEX (RDB$INDEX_2), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATIONS INDEX (RDB$INDEX_0), RDB$RELATIONS INDEX (RDB$INDEX_0), RDB$CHARACTER_SETS INDEX (RDB$INDEX_19), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15), RDB$RELATIONS INDEX (RDB$INDEX_0), RDB$RELATION_FIELDS INDEX (RDB$INDEX_15))

2015-07-29T22:23:54.7810 (3988:01B41B28) COMMIT_TRANSACTION
oltp30 (ATT_77, SYSDBA:NONE, UTF8, TCPv4:127.0.0.1)
C:\MIX\IBE\IBExpert.exe:3944
(TRA_638, READ_COMMITTED | REC_VERSION | NOWAIT | READ_WRITE)
0 ms, 1 write(s), 1 fetch(es), 1 mark(s)

2015-07-29T22:23:54.7960 (3988:01B41B28) START_TRANSACTION
oltp30 (ATT_77, SYSDBA:NONE, UTF8, TCPv4:127.0.0.1)
C:\MIX\IBE\IBExpert.exe:3944
(TRA_639, READ_COMMITTED | REC_VERSION | NOWAIT | READ_WRITE)

2015-07-29T22:23:54.7960 (3988:01B41B28) ROLLBACK_TRANSACTION
oltp30 (ATT_77, SYSDBA:NONE, UTF8, TCPv4:127.0.0.1)
C:\MIX\IBE\IBExpert.exe:3944
(TRA_639, READ_COMMITTED | REC_VERSION | NOWAIT | READ_WRITE)
0 ms, 1 write(s), 1 fetch(es), 1 mark(s)

2015-07-29T22:23:54.7960 (3988:01B41B28) START_TRANSACTION
oltp30 (ATT_77, SYSDBA:NONE, UTF8, TCPv4:127.0.0.1)
C:\MIX\IBE\IBExpert.exe:3944
(TRA_640, READ_COMMITTED | REC_VERSION | NOWAIT | READ_WRITE)

2015-07-29T22:23:54.7960 (3988:01B41B28) ROLLBACK_TRANSACTION
oltp30 (ATT_77, SYSDBA:NONE, UTF8, TCPv4:127.0.0.1)
C:\MIX\IBE\IBExpert.exe:3944
(TRA_640, READ_COMMITTED | REC_VERSION | NOWAIT | READ_WRITE)
0 ms, 1 write(s), 1 fetch(es), 1 mark(s)

2015-07-29T22:23:58.1250 (3988:01B45F08) TRACE_INIT
SESSION_1

2015-07-29T22:23:58.1250 (3988:01B45F08) DETACH_DATABASE
C:\MIX\FIREBIRD\FB30\SECURITY3.FDB (ATT_2731, SYSDBA:NONE, NONE, <internal>)

2015-07-29T22:23:58.1250 (3988:01B45F08) TRACE_FINI
SESSION_1
=== end of trace log ===

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jul 29, 2015

Commented by: @asfernandes

Their problem.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jul 29, 2015

Commented by: @dyemanov

Error "Missing close comment for" is raised by Firebird, see Tokens::parse(). The new pre-parser is used to handle only CREATE DATABASE statements but before that it parses the whole statement and supposedly does not treat inline comments properly.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jul 29, 2015

Modified by: @dyemanov

Version: 3.0 Beta 2 [ 10586 ]

assignee: Alexander Peshkov [ alexpeshkoff ]

Version: 3.0 RC 1 [ 10584 ] =>

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Aug 21, 2015

Modified by: @AlexPeshkoff

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

resolution: Fixed [ 1 ]

Fix Version: 3.0 RC 1 [ 10584 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Aug 25, 2015

Modified by: @pavel-zotov

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

QA Status: No test => Deferred

Test Details: Waiting for reply on issue in CORE4882, 25/Aug/15 06:39 PM

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Sep 23, 2015

Modified by: @pcisar

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

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