diff options
author | Aleksey Midenkov <midenok@gmail.com> | 2022-01-13 23:35:16 +0300 |
---|---|---|
committer | Aleksey Midenkov <midenok@gmail.com> | 2022-01-13 23:35:16 +0300 |
commit | 4d5ae2b3258d0d4eb3addd61fdabf49d9a6314e7 (patch) | |
tree | 5c211278de35118604bb0650b6e775fed2e37724 /include | |
parent | f9f6b190ccea9c266a541ebbc05b1e2352c84d25 (diff) | |
download | mariadb-git-4d5ae2b3258d0d4eb3addd61fdabf49d9a6314e7.tar.gz |
MDEV-27217 DELETE partition selection doesn't work for history partitions
LIMIT history switching requires the number of history partitions to
be marked for read: from first to last non-empty plus one empty. The
least we can do is to fail with error message if the needed partition
was not marked for read. As this is handler interface we require new
handler error code to display user-friendly error message.
Switching by INTERVAL works out-of-the-box with
ER_ROW_DOES_NOT_MATCH_GIVEN_PARTITION_SET error.
Diffstat (limited to 'include')
-rw-r--r-- | include/my_base.h | 3 | ||||
-rw-r--r-- | include/my_handler_errors.h | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/include/my_base.h b/include/my_base.h index 4c5b00649cc..8f4efec10bd 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -522,7 +522,8 @@ enum ha_base_keytype { #define HA_ERR_TABLESPACE_MISSING 194 /* Missing Tablespace */ #define HA_ERR_SEQUENCE_INVALID_DATA 195 #define HA_ERR_SEQUENCE_RUN_OUT 196 -#define HA_ERR_LAST 196 /* Copy of last error nr * */ +#define HA_ERR_PARTITION_LIST 197 +#define HA_ERR_LAST 197 /* Copy of last error nr * */ /* Number of different errors */ #define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1) diff --git a/include/my_handler_errors.h b/include/my_handler_errors.h index 45614ce221a..946e615aa79 100644 --- a/include/my_handler_errors.h +++ b/include/my_handler_errors.h @@ -107,7 +107,8 @@ static const char *handler_error_messages[]= "Foreign key cascade delete/update exceeds max depth", "Tablespace is missing for a table", "Sequence has been run out", - "Sequence values are conflicting" + "Sequence values are conflicting", + "Cannot select partitions" }; #endif /* MYSYS_MY_HANDLER_ERRORS_INCLUDED */ |