Error
Error Code:
1691
MariaDB Error 1691: Non-Integer Type in LIMIT
Description
Error 1691 occurs when a variable supplied to the `LIMIT` clause in a SQL query is not of an integer-based data type. The `LIMIT` clause, used for restricting the number of rows returned, strictly requires integer values for both offset and count parameters, leading to this error if a non-integer variable is used.
Error Message
A variable of a non-integer based type in LIMIT clause
Known Causes
4 known causesUsing String Variables
Attempting to use a string-type variable (e.g., VARCHAR, TEXT) where an integer is expected for the LIMIT offset or count.
Using Decimal or Float Variables
Supplying a variable of a decimal or floating-point type (e.g., DECIMAL, FLOAT, DOUBLE) to the LIMIT clause, which requires whole numbers.
Using Boolean Variables
Passing a boolean variable (TRUE/FALSE) to the LIMIT clause, as MariaDB expects an integer, not a boolean representation.
Incorrect User-Defined Variable Type
A user-defined variable, though intended for integer storage, was implicitly or explicitly assigned a non-integer value before being used in LIMIT.
Solutions
Coming SoonGeneral Troubleshooting Tips
- Check the error message carefully for specific details
- Review recent changes that might have caused the error
- Search for the exact error code in the official documentation
- Check log files for additional context
- Try restarting the application or service