Keyword AUTO_INCREMENT (or AUTO) enables partition auto-creation.
Or with explicit partitions:
When there are VERS_MIN_EMPTY empty partitions left, auto-create N new
This scheme must not allow partition
overflow. I.e. VERS_MIN_EMPTY-fill time must not exceed N-creation
time. This means that low values for INTERVAL and LIMIT must not be
allowed for auto-creation. In case when overflow is detected there is
no need to do anything special: a warning is issued and the user must
run manual rebuild to redistribute records correctly. This is
important because automatic creation of partition is fast, without
forced rebuild by the reason of performance. Auto-creation is
implemented by fast_alter_partition_table() call from the thread of
the main DML command.
Current revision implements hard-coded values of 1 for VERS_MIN_EMPTY
and N. As well as auto-creation threshold VERS_MIN_INTERVAL = 1 hour,
VERS_MIN_LIMIT = 1000.
The name for newly added partition is chosen as "pX" where X is
partition number and "p" is hard-coded name prefix. If this name is
already occupied the X is incremented until the resulting name is free