Informix Error -12127: Smart Large Objects: Invalid range size in byte range lock / unlock call.
Cause and resolution
Smart Large Objects: Invalid range size in byte range lock / unlock call.
A call to one of the byte-range locking functions specifies a range size that is invalid:
* ESQL/C: ifx_lo_lock() or ifx_lo_unlock()
* DAPI: mi_lo_lock() or mi_lo_unlock()
An invalid range size is either a negative value or has the following sum that results in an INT8 overflow:
offset + range size
Use a valid range size in the byte-range locking function.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-12127 fires when ifx_lo_lock()/ifx_lo_unlock() (ESQL/C) or mi_lo_lock()/
mi_lo_unlock() (DAPI) is called with an invalid range size — per the official guidance.
- A negative range size, per the official guidance — the first named case.
offset + range sizeoverflowingINT8, per the official guidance — the second named case.
Solutions / Resolution
- Use a valid range size in the byte-range locking function, per the official
guidance — non-negative, and not overflowing
INT8when added to the offset.
Examples
N/A
No specific triggering statement is documented beyond a negative or overflowing range size.
Diagnostic Checks
- Check the range-size argument's sign, and confirm
offset + range sizedoesn't overflowINT8.
Related Errors / Related Topics
- -12126 — "Smart Large Objects: LO is not opened for byte range locking." A related byte-range-locking error, on the object's lock mode rather than the range size.
- -12128 — "Smart Large Objects: Invalid offset in byte range lock / unlock call." A related byte-range-locking error, on the offset argument rather than the range size.
The byte-range lock/unlock call had an invalid range size (negative, or overflowing when added to the offset) — use a valid range size.