Skip to content

DBMS_OUTPUT: Missing 32767 byte max line size enforcement #21

@rophy

Description

@rophy

Description

IvorySQL's DBMS_OUTPUT implementation does not enforce Oracle's 32767 byte maximum line size limit.

Oracle Behavior

Per Oracle documentation:

The maximum line size is 32767 bytes.

When exceeded, Oracle raises:

ORA-20000: ORU-10028: line length overflow, limit of 32767 bytes

IvorySQL Behavior

IvorySQL accepts lines of any length (tested with 50000 bytes successfully).

Test Case

-- This should fail with ORU-10028 but succeeds in IvorySQL
DO $$
DECLARE
    chunk TEXT := repeat('A', 25000);
BEGIN
    dbms_output.enable(100000);
    dbms_output.put(chunk);
    dbms_output.put(chunk);  -- 50000 bytes total
    dbms_output.new_line();
END;
$$;

Expected Fix

Add line length check in pl_dbms_output.c for both PUT and PUT_LINE functions. When line exceeds 32767 bytes, raise error:

ORU-10028: line length overflow, limit of 32767 bytes

Related

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