1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-33658 1/2 Refactoring: extract Key length initialization

mysql_prepare_create_table: Extract a Key initialization part that
relates to length calculation and long unique index designation.

append_system_key_parts call also moves there.

Move this initialization before the duplicate elimination.

Extract WITHOUT OVERPLAPS check into a separate function. It had to be moved
earlier in the code to preserve the order of the error checks, as in the tests.
This commit is contained in:
Nikita Malyavin
2024-10-12 21:32:18 +02:00
parent e33064e0fc
commit ecaedbe299
10 changed files with 362 additions and 251 deletions

View File

@@ -839,8 +839,10 @@ CREATE TABLE t3 (
);
# --error ER_TOO_MANY_KEY_PARTS
--error ER_WRONG_ARGUMENTS
--error ER_KEY_COLUMN_DOES_NOT_EXITS
CREATE SPATIAL INDEX idx0 ON t2 (col1, col2);
--error ER_WRONG_ARGUMENTS
CREATE SPATIAL INDEX idx0 ON t2 (col0, col2);
CREATE TABLE t4 (