Does this look like a bug to you guys?

From: Steve Baldwin <stbaldwin_at_multiservice.com>
Date: Wed, 16 Mar 2016 10:48:22 +1100
Message-ID: <CAC-6Hs1STZ2_AZ1PyXQKuoyVqyAdrT9MDp8auYcpndOR3J6Xqg_at_mail.gmail.com>



I'm after an opinion before I go down the Oracle SR rabbit hole.

It seems strange to me but modifying the char/byte length semantics of a CHAR column in an ALTER TABLE causes a DML trigger to fire. Doing the same thing to a VARCHAR2 column does not.

Our Oracle version is 11.2.0.4 and our DB char set is AL32UTF8.

SQL> create table a_bug (c1 number, c2 varchar2(1 byte), c3 char(1 byte));

Table created.

SQL> insert into a_bug values (10, 'a', 'a');

1 row created.

SQL> commit;

Commit complete.

SQL> create or replace trigger a_bug_t1
  2 before update on a_bug
  3 begin
  4 raise_application_error(-20001, 'Splat');   5 end;
  6 /

Trigger created.

SQL> alter table a_bug modify(c2 varchar2(1 char));

Table altered.

SQL> alter table a_bug modify(c3 char(1 char)); alter table a_bug modify(c3 char(1 char)) *
ERROR at line 1:

ORA-20001: Splat
ORA-06512: at "SB.A_BUG_T1", line 2
ORA-04088: error during execution of trigger 'SB.A_BUG_T1'


SQL> drop table a_bug purge;

Table dropped.

Thanks,

Steve

--



This email is intended solely for the use of the addressee and may contain information that is confidential, proprietary, or both. If you receive this email in error please immediately notify the sender and delete the email..

--

http://www.freelists.org/webpage/oracle-l Received on Wed Mar 16 2016 - 00:48:22 CET

Original text of this message