Skip to content

DBMS_OUTPUT: Re-ENABLE should preserve buffer content like Oracle #26

@rophy

Description

@rophy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions