Skip to content

Error message "SQL -104 / Unexpected end of command" appears in a trace log when 'SET AUTOTERM ON;' is used #8409

@pavel-zotov

Description

@pavel-zotov
  1. run trace with following config:
database =
{
	enabled = true
	log_initfini = false
	log_errors = true
	log_sweep = true
	time_threshold = 0
    log_context = true

[trace-with-unexpected-end-of-command-messages.log.zip](https://github.com/user-attachments/files/18500808/trace-with-unexpected-end-of-command-messages.log.zip)

    log_statement_prepare = true
	max_sql_length = 32000
	max_arg_length = 32000
	max_arg_count =  1000
}
  1. run this script:
set bail on;
set echo on;
shell del r:\temp\tmp4test.fdb 2>nul;
create database 'localhost:r:\temp\tmp4test.fdb' user 'sysdba' password 'masterkey';

set autoterm on;
create procedure sp_test as
    declare n smallint;
begin
    n = 1;
end;

show procedure sp_test;

Trace will contain in several places error:

335544569 : Dynamic SQL Error
335544436 : SQL error code = -104
335544851 : Unexpected end of command - line 4, column 10

ALthough no error will appear on console and procedure will be created OK.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions