Bug in WHENEVER in SQL*Plus 3.1.3.1.1 on VMS

From: L. Carl Pedersen <l.carl.pedersen_at_dartmouth.edu>
Date: Mon, 08 Aug 1994 13:41:34 -0500
Message-ID: <l.carl.pedersen-0808941341340001_at_kip-sn-97.dartmouth.edu>


This version of SQL*Plus happily accepts the following syntax:

   whenever sqlerror exit rollback failure;

However, this is not correct. In the correct syntax, the last two words are exchanged. The incorrect syntax results in an exit with a SUCCESS status.

SQL*Plus should reject the incorrect syntax with an error message, but it doesn't. This may seem like a minor point, but the results of this bug *could* be fairly serious.

I'm driving this bug on VMS. I don't know if it occurs on other operating systems.

I'd love to report this bug directly to Oracle via email, but they want to charge me extra for that privilege.

Here's a log showing exactly how the bug works:

    Last interactive login on Monday, 8-AUG-1994 09:17     Last non-interactive login on Sunday, 7-AUG-1994 18:00     Current time: Monday, 8-AUG-1994 13:31

    Dartmouth College                           Kiewit Cluster node CEDAR
    Boot disk: $57$DUA51:                       OpenVMS VAX V5.5-2

$ sqlplus scott/tiger

SQL*Plus: Release 3.1.3.1.1 - Production on Mon Aug 8 13:32:54 1994

Copyright (c) Oracle Corporation 1979, 1992. All rights reserved.

Connected to:
ORACLE7 Server Release 7.0.16.6.0 - Production With the procedural and Parallel Server options PL/SQL Release 2.0.18.1.0 - Production

ADM> whenever sqlerror exit rollback failure; ADM> select 1/0 from dual;
ERROR:
ORA-01476: divisor is equal to zero

Disconnected from ORACLE7 Server Release 7.0.16.6.0 - Production With the procedural and Parallel Server options PL/SQL Release 2.0.18.1.0 - Production
$ write sys$output $status, " ", $severity
%X00000001 1
$ sqlplus scott/tiger

SQL*Plus: Release 3.1.3.1.1 - Production on Mon Aug 8 13:33:55 1994

Copyright (c) Oracle Corporation 1979, 1992. All rights reserved.

Connected to:
ORACLE7 Server Release 7.0.16.6.0 - Production With the procedural and Parallel Server options PL/SQL Release 2.0.18.1.0 - Production

ADM> whenever sqlerror exit failure rollback; ADM> select 1/0 from dual;
ERROR:
ORA-01476: divisor is equal to zero

Disconnected from ORACLE7 Server Release 7.0.16.6.0 - Production With the procedural and Parallel Server options PL/SQL Release 2.0.18.1.0 - Production
$ write sys$output $status, " ", $severity
%X10000002 2
$ Received on Mon Aug 08 1994 - 20:41:34 CEST

Original text of this message