Current Behavior
When DBMS_OUTPUT.ENABLE() is called while output is already enabled, IvorySQL clears the existing buffer content.
DBMS_OUTPUT.ENABLE();
DBMS_OUTPUT.PUT_LINE('First');
DBMS_OUTPUT.ENABLE(); -- Clears buffer
DBMS_OUTPUT.GET_LINE(line, status);
-- status = 1 (no lines available)
Expected Behavior (Oracle)
Oracle preserves existing buffer content when ENABLE() is called multiple times:
DBMS_OUTPUT.ENABLE();
DBMS_OUTPUT.PUT_LINE('First');
DBMS_OUTPUT.ENABLE(); -- Preserves buffer
DBMS_OUTPUT.GET_LINE(line, status);
-- line = 'First', status = 0
Impact
Medium. Applications that call ENABLE() multiple times during execution may see different behavior when migrating from Oracle.
References
Workaround
Always call ENABLE() only once at the start of execution to ensure consistent behavior between IvorySQL and Oracle.
Current Behavior
When
DBMS_OUTPUT.ENABLE()is called while output is already enabled, IvorySQL clears the existing buffer content.Expected Behavior (Oracle)
Oracle preserves existing buffer content when
ENABLE()is called multiple times:Impact
Medium. Applications that call
ENABLE()multiple times during execution may see different behavior when migrating from Oracle.References
contrib/ivorysql_ora/sql/ora_dbms_output.sqlWorkaround
Always call
ENABLE()only once at the start of execution to ensure consistent behavior between IvorySQL and Oracle.