Informix Error -25803: Interval or list fragmentation must have at least one non-null, non-remainder fragment.
Cause and resolution
Interval or list fragmentation must have at least one non-null, non-remainder fragment.
At least one fragment that is not a null fragment and is also not a remainder fragment must be specified for interval or list fragmentation definitions. A "null fragment" is a fragment that can only store NULL data values, A "remainder fragment" is a fragment defined with the REMAINDER keyword.
The following statements generate an error:
CREATE TABLE address (street VARCHAR(128), city VARCHAR(32), state CHAR(2), zip INT) FRAGMENT BY RANGE(zip) INTERVAL(1000) STORE IN (dbs1, dbs2, dbs3) PARTITION p1 VALUES IS NULL IN dbs3;
CREATE INDEX add_state_idx ON address(state) FRAGMENT BY LIST(state) PARTITION p1 VALUES (NULL) IN dbs2, PARTITION p2 REMAINDER IN dbs3;
The above statements violates the interval and list fragmentation requirement that at least one fragment be neither a null nor a remainder fragment.
The following statements are correct:
CREATE TABLE address (street VARCHAR(128), city VARCHAR(32), state CHAR(2), zip INT) FRAGMENT BY RANGE(zip) INTERVAL(1000) STORE IN (dbs1, dbs2, dbs3) PARTITION p1 VALUES < 10000 IN dbs3;
CREATE INDEX add_state_idx ON address(state) FRAGMENT BY LIST(state) PARTITION p1 VALUES ('CA','OR') IN dbs1, PARTITION p3 VALUES (NULL) IN dbs2, PARTITION p4 REMAINDER IN dbs3;
CREATE INDEX add_zip_idx ON address(zip) FRAGMENT BY RANGE(zip) INTERVAL(1000) STORE IN (dbs1, dbs2, dbs3) PARTITION p1 VALUES < 10000 IN dbs3, PARTITION p2 VALUES IS NULL IN dbs4;
In the statements abvoe, the p1 fragment is a non-null, non-remainder fragment, thereby satisfying the requirement for interval and list fragmentation.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-25803 fires when every fragment in an interval/list fragmentation scheme is either a null
fragment (holds only NULL values) or a REMAINDER fragment — per the official guidance,
at least one fragment must be neither.
- All fragments being null and/or
REMAINDERfragments, with none holding a real defined range/list, per the official guidance — the direct, only cause.
Solutions / Resolution
- Add at least one fragment with a real (non-null, non-remainder) value range or list, per the official guidance.
Examples
Only a null and a remainder fragment
CREATE INDEX add_state_idx ON address(state)
FRAGMENT BY LIST(state)
PARTITION p1 VALUES (NULL) IN dbs2,
PARTITION p2 REMAINDER IN dbs3;
-- -25803: no non-null, non-remainder fragment
Corrected
CREATE INDEX add_state_idx ON address(state)
FRAGMENT BY LIST(state)
PARTITION p1 VALUES ('CA', 'OR') IN dbs1,
PARTITION p2 VALUES (NULL) IN dbs2,
PARTITION p3 REMAINDER IN dbs3;
Diagnostic Checks
- Check the fragmentation scheme for at least one fragment that isn't null-only or
REMAINDER, and add one if missing.
Related Errors / Related Topics
- -25800 — "Cannot specify overlapping fragment expressions for interval or list fragmentation." A related interval/list fragmentation syntax error.
- -25817 — "Cannot drop or detach the only remaining non-null, non-remainder
fragment." The related restriction preventing this state from being reached via
ALTER FRAGMENT.
An interval/list fragmentation scheme had only null and/or REMAINDER fragments — add a
real, defined fragment.