forked from IvorySQL/IvorySQL
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Description
IvorySQL's DBMS_OUTPUT.ENABLE rejects buffer sizes below 2000 with an error, while Oracle silently adjusts them up to 2000.
Oracle Behavior
Per Oracle documentation:
The minimum size is 2000 bytes and the maximum is unlimited.
When a value below 2000 is passed, Oracle silently adjusts it to 2000:
-- Oracle accepts this and uses 2000 internally
DBMS_OUTPUT.ENABLE(100);
-- No error, buffer works with 2000 byte limitIvorySQL Behavior
IvorySQL rejects values below 2000:
CALL dbms_output.enable(1000);
-- ERROR: buffer size must be between 2000 and 1000000Test Case
BEGIN
DBMS_OUTPUT.ENABLE(100); -- Should silently use 2000
FOR i IN 1..50 LOOP
DBMS_OUTPUT.PUT_LINE('Line ' || i);
END LOOP;
END;
/
-- Oracle: succeeds (uses 2000 byte buffer)
-- IvorySQL: ERRORExpected Fix
In pl_dbms_output.c, instead of raising an error for values below 2000, silently adjust to 2000:
if (buffer_size < 2000)
buffer_size = 2000; // Silent adjustment like OracleImpact
Low - most applications use valid buffer sizes, but this improves Oracle compatibility.
Related
- Branch:
feat/dbms_output - Design doc:
design/dbms_output/
Metadata
Metadata
Assignees
Labels
No labels