1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Vanilla cleanups and refactorings

Dead code cleanup:

part_info->num_parts usage was wrong and working incorrectly in
mysql_drop_partitions() because num_parts is already updated in
prep_alter_part_table(). We don't have to update part_info->partitions
because part_info is destroyed at alter_partition_lock_handling().

Cleanups:

- DBUG_EVALUATE_IF() macro replaced by shorter form DBUG_IF();
- Typo in ER_KEY_COLUMN_DOES_NOT_EXITS.

Refactorings:

- Splitted write_log_replace_delete_frm() into write_log_delete_frm()
  and write_log_replace_frm();
- partition_info via DDL_LOG_STATE;
- set_part_info_exec_log_entry() removed.

DBUG_EVALUATE removed

DBUG_EVALUTATE was only added for consistency together with
DBUG_EVALUATE_IF. It is not used anywhere in the code.

DBUG_SUICIDE() fix on release build

On release DBUG_SUICIDE() was statement. It was wrong as
DBUG_SUICIDE() is used in expression context.
This commit is contained in:
Aleksey Midenkov
2021-09-09 11:58:45 +03:00
committed by Sergei Golubchik
parent 2dc3c32070
commit d324c03d0c
66 changed files with 691 additions and 841 deletions

View File

@ -412,11 +412,11 @@ drop tables t0, t1, t2, t3;
--echo #
--echo # MDEV-23968 CREATE TEMPORARY TABLE .. LIKE (system versioned table) returns error if unique index is defined in the table
--echo #
--error ER_KEY_COLUMN_DOES_NOT_EXITS
--error ER_KEY_COLUMN_DOES_NOT_EXIST
create table t1 (id int primary key, index(row_start)) with system versioning;
--error ER_KEY_COLUMN_DOES_NOT_EXITS
--error ER_KEY_COLUMN_DOES_NOT_EXIST
create table t1 (id int primary key, index(row_end)) with system versioning;
--error ER_KEY_COLUMN_DOES_NOT_EXITS
--error ER_KEY_COLUMN_DOES_NOT_EXIST
create table t1 (id int, primary key(id, row_end, row_end)) with system versioning;
create table t1 (id int primary key) with system versioning;
create temporary table t2 like t1;