Informix Error -25836: The transition value must be a non-null constant.
Cause and resolution
The transition value must be a non-null constant.
The transition value must be a non-null constant expression. For example, the following alter generates an 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;
ALTER FRAGMENT ON TABLE employee MODIFY INTERVAL TRANSITION TO emp_id+10;
The new tranisition value, emp_id+10 is a column expression and not a constant.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-25836 fires when ALTER FRAGMENT ... MODIFY INTERVAL TRANSITION TO <value> gives a
non-constant expression (such as a column reference) as the new transition value — per the
official guidance.
- A transition value that's a column expression rather than a constant, per the official guidance — the direct, only cause.
Solutions / Resolution
- Supply a non-null constant for the new transition value, per the official guidance.
Examples
A column-referencing transition value
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;
ALTER FRAGMENT ON TABLE employee MODIFY INTERVAL TRANSITION TO emp_id+10;
-- -25836: emp_id+10 is a column expression, not a constant
Diagnostic Checks
- Check the
MODIFY INTERVAL TRANSITION TOvalue, and replace any column expression with a constant.
Related Errors / Related Topics
- -25835 — "The transition value specified is not valid." A related transition-value error, on magnitude/alignment rather than type.
A MODIFY INTERVAL TRANSITION value referenced a column instead of a constant — supply a
constant.