Query Using WITH Clause Functions with Bind Variable Fails with ORA-03113 on Client Side and ORA-3137 [12333] on the Server (Doc ID 1922216.1)

Last updated on NOVEMBER 28, 2016

Applies to:

Oracle Database - Standard Edition - Version 12.1.0.1 and later
Information in this document applies to any platform.

Symptoms

Customer code used :

variable y number;
exec :y := 1;

with function foo (x in int) return varchar2
as
begin
return x*2;
end;
select *
from
(
with bar as
(
select 123 as x
from dual
)
select x, :y from bar
)
/

This dumps with ORA-3113 on the client side and
ORA-03137: TTC protocol internal error : [12333] [0] [15] [0] [] [] [] []  in the alert.log for the database on 12.1.0.1

 

If there is not an ORA-3137 there may be traces reporting PROTOCOL VIOLATIONS:

--- PROTOCOL VIOLATION DETECTED ---
----- Dump Cursor sql_id=czrus38py3g7m xsc=0x2b9ae2fc4730 cur=0x2b9ae2ef1eb8 

Disabling bind peeking does not help.



Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms