-
-
Notifications
You must be signed in to change notification settings - Fork 256
Closed
Description
Test case with index created:
SQL> create table t1 (n integer);
SQL> create table t2 (n integer);
SQL> create index t1_expr on t1 computed by ((select n from t2));
SQL> drop table t1;
SQL> commit;
SQL> drop table t2;
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-object TABLE "T2" is in use
Test case with failed index creation:
SQL> create table t1 (n integer);
SQL> create table t2 (n integer);
SQL> insert into t1 values (0);
SQL> commit;
SQL> create index t1_expr on t1 computed by (1 / 0 + (select 1 from t2));
Statement failed, SQLSTATE = 22012
Expression evaluation error for index "***unknown***" on table "T1"
-arithmetic exception, numeric overflow, or string truncation
-Integer divide by zero. The code attempted to divide an integer value by an integer divisor of zero.
SQL> drop table t1;
SQL> commit;
SQL> drop table t2;
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-object TABLE "T2" is in use