Common SQL Errors

MySQL Error 1493 ER_RANGE_NOT_INCREASING_ERROR: Fix "VALUES LESS THAN" Partition Range Order

Galaxy Team
August 7, 2025

<p>Error 1493 occurs when the VALUES LESS THAN clauses in a partitioned table are not in strictly increasing order, preventing table creation or alteration.</p>

Sign up for the latest in common SQL errors from the Galaxy Team!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

What is MySQL error 1493 ER_RANGE_NOT_INCREASING_ERROR?

<p>MySQL Error 1493 ER_RANGE_NOT_INCREASING_ERROR appears when VALUES LESS THAN limits are not strictly increasing for every partition. Re-order or adjust the range boundaries so each value is greater than the previous partition to eliminate the error.</p>

Error Highlights

Typical Error Message

VALUES LESS THAN value must be strictly increasing for

Error Type

Partitioning Error

Language

MySQL

Symbol

ER_RANGE_NOT_INCREASING_ERROR

Error Code

1493

SQL State

HY000

Explanation

Table of Contents

What is MySQL Error 1493 ER_RANGE_NOT_INCREASING_ERROR?

MySQL raises error 1493 with the message "VALUES LESS THAN value must be strictly increasing for each partition" when you define RANGE partitions whose upper bounds are not in strictly ascending order. The server stops the CREATE TABLE or ALTER TABLE statement to protect partition lookup logic.

This validation exists in all supported MySQL versions that support partitioning, including MySQL 5.7, 8.0, and compatible MariaDB builds.

What Causes This Error?

The error is triggered whenever two successive partitions share the same upper bound or when a later partition has an upper bound lower than or equal to an earlier one. MySQL requires every VALUES LESS THAN clause to define a higher value than the previous partition.

The rule also applies when mixing numeric literals, expressions, or MAXVALUE. Once MAXVALUE is used, it must be the final partition.

How to Fix ER_RANGE_NOT_INCREASING_ERROR

Re-order partition definitions so that each VALUES LESS THAN value increases. If two partitions need to include the same boundary, adjust the earlier one to stop before the shared value or widen the next partition.

When using MAXVALUE, place it last. Confirm data types are consistent (e.g., unsigned INT ranges) to avoid implicit casts that reverse order.

Common Scenarios and Solutions

During schema migrations, automated tools sometimes append new partitions with a lower value than existing ones, triggering the error. Ensure migration scripts compute the next logical upper bound.

Copy-and-paste edits often duplicate the previous VALUES LESS THAN clause. Change the literal before running the statement.

Best Practices to Avoid This Error

Adopt a naming convention such as yyyymm for date partitions and generate the VALUES LESS THAN value programmatically. Automated checks in CI pipelines can run SHOW CREATE TABLE to verify ascending order.

When working in Galaxy's SQL editor, enable team review so another engineer can confirm range logic before endorsing the query.

Related Errors and Solutions

Error 1501 ER_PARTITION_MAXVALUE_ERROR occurs if MAXVALUE is misused somewhere other than the final partition. Review placement rules.

Error 1496 ER_DROP_PARTITION_NON_EXISTENT happens when altering partitions that do not exist. Query INFORMATION_SCHEMA.PARTITIONS before issuing ALTER commands.

Common Causes

Duplicate boundary value

Two partitions use the same VALUES LESS THAN literal, violating the strictly increasing requirement.

Descending range order

A later partition specifies an upper bound smaller than an earlier one, often due to copy-paste mistakes.

MAXVALUE placed early

MAXVALUE ends the range chain, so any partition defined after it triggers the rule.

Signed vs unsigned mismatch

Implicit casting from signed to unsigned changes numeric comparison, causing unexpected order reversals.

Related Errors

MySQL Error 1501 ER_PARTITION_MAXVALUE_ERROR

Thrown when MAXVALUE appears before the final partition. Solution: move MAXVALUE partition to the end.

MySQL Error 1496 ER_DROP_PARTITION_NON_EXISTENT

Occurs when attempting to drop a partition that does not exist. Verify names in INFORMATION_SCHEMA.

MySQL Error 1497 ER_DROP_LAST_PARTITION

Raised when trying to drop the last remaining partition. Convert the table back to non-partitioned or add replacement partitions first.

FAQs

Can I repeat a boundary if I change the operator?

No. VALUES LESS THAN defines exclusive upper bounds. Repeating the same value in another partition always violates the strictly increasing rule.

Does the rule apply to LIST partitioning?

No. LIST partitions use specific value sets, not ascending ranges, so error 1493 targets only RANGE partitioning.

Will altering an existing table with ADD PARTITION trigger the error?

Yes, if the new partition's VALUES LESS THAN value is not greater than the current highest boundary.

How does Galaxy help prevent this error?

Galaxy's AI copilot inspects partition definitions in real time, suggesting correct next VALUES LESS THAN values and flagging any non-increasing ranges before execution.

Start Querying with the Modern SQL Editor Today!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

Check out some other errors

Trusted by top engineers on high-velocity teams
Aryeo Logo
Assort Health
Curri
Rubie Logo
Bauhealth Logo
Truvideo Logo