RE: [Informix Dynamic Server (IDS):] Digest 2181 - 2188
Posted in 2003
Hi Danny
I have a case open on this.
In fact, this message is present in version 7.31UD5 and 9.30 9.40.
Not In 9.20 or 9.21.
When you use dbaccess in interactif mode this message is only a
information. Because when you leave dbaccess you receive the transaction
menu. But when you use dbaccess in script mode then you can have some
surprise.
In fact you receive this message when a sql code is not a appropriate
handler and then this message say you that the open transaction is commit.
Here you will find the test case send to support.
Version IDS 9.40.FC1 and IDS.9.40.FC2 on Solaris 8
>
> Hereby the code of a stored procedure
>
drop procedure testproc;
create procedure testproc()
on exceptionrollback work;
end exception;
set debug file to "/tmp/test.log";
trace on ;
begin work;
select * from mon_tables into temp t1 ;-- mon_tables : some table that is large enough to be able to press
Control+C" while reading it.
drop table test;commit work;
end procedure;
> If we run this procedure and interrupt with "Control+C" during the select
> of
> the table the procedure doesn't fall into the "on exception"-routine.
> Result : Warning given : Warning:Data Commit is a result of an unhandled
> exception in TXN PROC/FUNC/TRI an implicit commit is given while he
should do a rollback.
>
> Screenshot
>
informix@solmgt:/export/home/informix> dbaccess -e monitor test.sql
Database selected.
^Cexecute procedure testproc();
213: Statement interrupted by user.
Error in line 1Near character position 27
Warning:Data Commit is a result of an unhandled exception in TXN
PROC/FUNC/TRI
Data committed.
Database closed.
informix@solmgt:/export/home/informix>
Debug info
trace on
begin work;
select *
from mon_tables
into temp t1;exception : looking for handler
SQL error = -213 ISAM error = 0 error string = = ""> exception : no appropriate handler
When eg. You run the procedure twice and let the select finfish the "drop
test table" errors : the on exception works ok.
> Debug info :
>
trace on
>
>
begin work;
>
drop table test;exception : looking for handler
SQL error = -206 ISAM error = -111 error string = ="test"
exception : handler FOUND
>
rollback work;
procedure testproc returned no data
In this example, you see that the -213 error code is not FOUND and then the
default become commit in place of rollback.
Support answer me that this is not a bug and that we must disable CTRL-C.
I am not sure that database must by default do a commit so for me is a real
bug.
Situation with support today is there. I wait more explain from support and
probably do a request feature.
Last information, If you change a litlle bit the testcase for example
begin work;
Create table hbe (col1 serial );for i in 0 TO 1000000
insert into hbe values (0);end for;
rollback work;
and during this insert you do a CTRL-C you will see the same warnning
message and the result is that you table normally must not exist and in fact
it contains records because default is commit in this case.
Hubert Bellings
Banque de La Poste
Database Administrator
IT Services Delivery
e-mail : hubert.bellings@bpo.be
Telph : 02/545.62.30
GSM : 0479/99.24.58
> -----Original Message-----
> From: ids@iiug.org [SMTP:ids@iiug.org]
> Sent: Tuesday, November 18, 2003 10:01 PM
> To: forum.subscriber@iiug.org
> Subject: [Informix Dynamic Server (IDS):] Digest 2181 - 2188
>
> The following new messages have been posted on the Informix Dynamic Server
>
> (IDS) forum at http://www.iiug.org/forums/ids/:
>
> #2181: Strange warning message on Commit work in dbac.... (Danny Wright)
>
> Note: To reply by email use the subject line as shown below
> with the message number between square brackets. Address your
> email to ids@iiug.org. To reply via the IIUG Web Site,
> click on the message URL.
>
> **********************************************************************
>
> SUBJECT: Strange warning message on Commit work in dbac.... [2181]
> URL: http://www.iiug.org/forums/ids/?rev=2181
> AUTHOR: Danny Wright
> DATE: Monday, 17 November 2003, at 12:32 p.m.
>
> I only see this when I commit work by exitting and choose Commit from =
> the Transaction: ring menu.
>
> The message is:
>
> Warning:Data Commit is a result of an unhandled exception in TXN =
> PROC/FUNC/TRI
>
> Anyone know what this is? I don't recall ever seeing it before =
> upgrading to 7.31.UD6, but it goes by so quickly, maybe I never noticed =
> it? (I don't commit work this way that often).
>
> IDS: 7.31.UD6
> AIX: 4.3.3.0
>
> The data did get committed.
>
> Thanks,
> Danny
>
> **********************************************************************