Informix Error -25830: The new fragment expression cannot cross adjacent fragment boundaries.
Cause and resolution
The new fragment expression cannot cross adjacent fragment boundaries.
While altering the fragmentation scheme to modify the fragment expression of range fragments, the new fragment expression cannot cross adjacent fragment boundaries. The new upper limit of the range fragment must be greater than the upper limit of the previous range fragment and lesser than that of the next range fragment.
For example, the following alters generate error:
CREATE TABLE employee (emp_id INTEGER, emp_name CHAR(64), ssn CHAR(12), basepay FLOAT, varpay FLOAT, dept_id SMALLINT, hire_date DATE) FRAGMENT BY RANGE(emp_id) INTERVAL(1000) STORE IN (dbs1, dbs2, dbs3) PARTITION p1 VALUES < 5000 IN dbs0, PARTITION p2 VALUES < 10000 IN dbs0, PARTITION p3 VALUES < 20000 IN dbs4, PARTITION p4 VALUES < 25000 IN dbs4;
ALTER FRAGMENT ON TABLE employee MODIFY PARTITION p2 TO PARTITION p2 VALUES < 4000 IN dbs0;
ALTER FRAGMENT ON TABLE address MODIFY PARTITION p2 TO PARTITION p2 VALUES < 21000 IN dbs0;
The new fragment expression in both of the above alters crosses adjacent fragment boundries. The new upper limit 4000 of the first alter is lesser than the upper limit of previous range fragment p1. Similarly, the new upper limit 21000 of the second alter is greater than that of the next range fragment p3. The new upper limit for range fragment p2 must be greater than 5000 and lesser than 20000.
The correct usage is as follows:
ALTER FRAGMENT ON TABLE address MODIFY PARTITION p2 TO PARTITION p2 VALUES < 12000 IN dbs0;
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-25830 fires when ALTER FRAGMENT ... MODIFY gives a range fragment a new upper limit
that isn't strictly between its neighboring fragments' boundaries — per the official
guidance, the new upper limit must be greater than the previous fragment's upper limit and
less than the next fragment's.
- A modified fragment's new upper limit falling outside the range bounded by its neighbors, per the official guidance — the direct, only cause.
Solutions / Resolution
- Choose a new upper limit strictly between the previous and next fragments' upper limits, per the official guidance.
Examples
A new upper limit below the previous fragment's boundary
CREATE TABLE employee (emp_id INTEGER, emp_name CHAR(64), ssn CHAR(12),
basepay FLOAT, varpay FLOAT, dept_id SMALLINT, hire_date DATE)
FRAGMENT BY RANGE(emp_id) INTERVAL(1000) STORE IN (dbs1, dbs2, dbs3)
PARTITION p1 VALUES < 5000 IN dbs0,
PARTITION p2 VALUES < 10000 IN dbs0,
PARTITION p3 VALUES < 20000 IN dbs4,
PARTITION p4 VALUES < 25000 IN dbs4;
ALTER FRAGMENT ON TABLE employee MODIFY PARTITION p2 TO PARTITION p2 VALUES < 4000 IN dbs0;
-- -25830: 4000 is less than p1's upper limit of 5000
Corrected
ALTER FRAGMENT ON TABLE employee MODIFY PARTITION p2 TO PARTITION p2 VALUES < 8000 IN dbs0;
-- valid: strictly between p1's 5000 and p3's 20000
Diagnostic Checks
- Check the modified fragment's new upper limit against its immediate neighbors' boundaries, and keep it strictly between them.
Related Errors / Related Topics
- -25831 — "Cannot modify fragment expression for transition fragment." A related
ALTER FRAGMENT ... MODIFYrestriction, on the transition/last fragment specifically.
A modified fragment's new upper limit crossed an adjacent fragment's boundary — keep it strictly between the neighboring fragments' limits.