RE: [firebird-support] Re: Why this procedure crashes server

2016-12-28 Thread 'Leyne, Sean' s...@broadviewsoftware.com [firebird-support]
Geoff,

> I am curious as to why you are using dialect 1 on an FB3 database.
> 
> Back when Interbase 6 was released the 1999 language reference said:
> "Dialect 1 exists to ease the migration of legacy databases."

Did IB 6 actually get released?

My own memory has IB 6 in beta when Inprise open-sourced the entire thing...  
IB 6 was finally released but only sometime after Firebird project was started 
in 2000 and Inprise changed their mind about the whole open-source thing.


> More currently, the FirebirdSQL website ( http://firebirdsql.org/manual/isql-
> dialects.html ) says:
> 
> "Currently it is possible to create databases in Dialect 1 and 3 only, 
> however it
> is recommended that you use Dialect 3 exclusively, since Dialect 1 will
> eventually be deprecated. Dialect 2 cannot be used to create a database
> since it only serves to convert Dialect 1 to Dialect 3."  [the highlighting 
> is mine]


In our case, having started using IB v4.x, we have been locked-in to dialect 1 
and we are using v2.5 (looking at v3.x).

The most significant issue with dialect 3 is the "stupid" interpretation that 
Inprise made of the SQL standard when it comes for handling of precision in 
math operations -- our application had way too many processes that expected the 
dialect 1 handling/treatment that the cost of "re-tooling" and testing was much 
too high.

IMO, the dialect 3 math precision handling is so bad, that if I had to make a 
fresh choice today, I would still choose dialect 1.  So, personally, I don't 
blame anyone for making the same choice.

We are hoping that Firebird will adopt more "logical/appropriate" rules for 
dialect 3, there has been talk of same.  Until then, we will keep using dialect 
1 for as long as possible.


Sean



[firebird-support] Re: Why this procedure crashes server

2016-12-27 Thread jonatan.laurit...@yahoo.dk [firebird-support]
I am sorry, this was false alarm! I used IBExpert and Flamerobin with the 
gds32.dll from the previous Firebird versions (not 3.0.x). After updateing 
gds32.dll all is working as expected.

[firebird-support] Re: Why this procedure crashes server

2016-12-27 Thread hv...@users.sourceforge.net [firebird-support]
---In firebird-support@yahoogroups.com,  wrote :
 > 
 > I am trying to create or modify the following procedure:
> 
> create or alter procedure test_procedure(id integer, p_from_date date)
> as
> 
>   declare variable from_date date;
>   declare variable to_date date;
> 
> begin
> end   
> 
> But this SQL restarts server or the connection remains hanging (from IBExpert 
> or from Flamerobin). 
> This problem is in Firebird 3.0.0 and 3.0.1 (64 bit). There are no relevant 
> messages in firebird.log 
> (e.g. no gds exceptions).

  I can't reproduce it:

\Firebird-3.0.0.32483-2_x64_pdb>isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> set sql dialect 1;
SQL> create database 'a.fdb';
SQL> show version;
ISQL Version: WI-V3.0.0.32483 Firebird 3.0
Server version:
Firebird/Windows/AMD/Intel/x64 (access method), version "WI-V3.0.0.32483 
Firebird 3.0"
on disk structure version 12.0
SQL>
SQL> set term ^;
SQL>
SQL> create or alter procedure test_procedure(id integer, p_from_date date)
CON> as
CON>
CON>   declare variable from_date date;
CON>   declare variable to_date date;
CON>
CON> begin
CON> end
CON> ^
SQL warning code = 301
-DATE data type is now called TIMESTAMP
-SQL warning code = 301
-DATE data type is now called TIMESTAMP
-SQL warning code = 301
-DATE data type is now called TIMESTAMP
SQL>
SQL> set term ;^
SQL> show procedure;
Global procedures

Procedure NameInvalid Dependency, Type
= === =
TEST_PROCEDURE
SQL>
SQL> show procedure test_procedure;
Procedure text:
=
declare variable from_date date;
  declare variable to_date date;

begin
end
=
Parameters:
IDINPUT INTEGER
P_FROM_DATE   INPUT TIMESTAMP
SQL> commit;
SQL>
SQL> drop database;
SQL> exit;

Reagrds,
Vlad




[firebird-support] Re: Why this procedure crashes server

2016-12-27 Thread jonatan.laurit...@yahoo.dk [firebird-support]
Empty body is not the cause of the error message, because:
- in old times the empty body problem was reported as SQL syntax error and the 
server remained alive
- the problem happens with the procedures that already were created in Firebird 
1.5 and that have large bodies.

[firebird-support] Re: Why this procedure crashes server

2016-12-27 Thread jonatan.laurit...@yahoo.dk [firebird-support]
This is becoming serious, because datbase has several hundreds procedures and 
some of them have the same situation (date arguments and variables) and have 
the same problem. Problem manifsts only when free statement is issues. Problem 
disappers when the procedure is changes from the IBExpert procedure edit form. 
But still the following situation happens (on clean server - that is restarted):
- I execute mentioned statement in IBExpert editor, IBExpert immediatly gives 
error message:
"Unsuccessful execution caused by a system error that precludes
 successful execution of subsequent statements.
 Error reading data from the connection.
 Connection will be closed immediately."
  The connection becomes cloased.
- I reopen connection and go to the procedure edit form and execute edit from 
this editor - the error message appears:
This operation is not defined for system tables.
unsuccessful metadata update.
unknown ISC error 336397267.
deadlock.
update conflicts with concurrent update.
concurrent transaction number is 720.  
Only when I restart server I can edit procedure and commit changes of procedure 
from the procedure edit form.

There seems to be some problems with transactions...

Re: [firebird-support] Re: Why this procedure crashes server

2016-12-27 Thread Geoff Worboys ge...@telesiscomputing.com.au [firebird-support]













[firebird-support] Re: Why this procedure crashes server

2016-12-26 Thread jonatan.laurit...@yahoo.dk [firebird-support]
Problem happens only on dialect 1 database, dialect 3 database accepts this SQL 
as expected.