1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00
* remove dead code
* simplify the check for table->s->next_number_index
* misc
This commit is contained in:
Sergei Golubchik
2024-04-26 16:27:29 +02:00
parent 947eeaa6dc
commit 4f5dea43df
21 changed files with 683 additions and 135 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,3 +1,6 @@
#
# MDEV-22649 SIGSEGV in ha_partition::create_partitioning_metadata on ALTER
#
set @save_alter_algorithm= @@session.alter_algorithm;
SET SESSION alter_algorithm=4;
CREATE TABLE t1(a INT) engine=myisam PARTITION BY RANGE(a) SUBPARTITION BY KEY(a) (PARTITION p0 VALUES LESS THAN (10) (SUBPARTITION s0,SUBPARTITION s1), PARTITION p1 VALUES LESS THAN (20) (SUBPARTITION s2,SUBPARTITION s3));
@@ -18,9 +21,16 @@ ALTER TABLE t1 ADD COLUMN c INT;
ERROR 0A000: ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=COPY
DROP table if exists t1;
set @@session.alter_algorithm= @save_alter_algorithm;
#
# MDEV-22804 SIGSEGV in ha_partition::create_partitioning_metadata |
# ERROR 1507 (HY000): Error in list of partitions to DROP
#
CREATE TABLE t1 (a INT) PARTITION BY RANGE(a) SUBPARTITION BY HASH(a) (PARTITION p VALUES LESS THAN (5) (SUBPARTITION sp, SUBPARTITION sp1), PARTITION p1 VALUES LESS THAN MAXVALUE (SUBPARTITION sp2, SUBPARTITION sp3));
ALTER TABLE t1 DROP PARTITION p;
DROP TABLE if exists t1;
#
# MDEV-23357 Server crashes in Sql_cmd_alter_table_exchange_partition::exchange_partition
#
CREATE TABLE t1 (i INT);
CREATE VIEW v1 as SELECT * FROM t1;
CREATE TABLE t2 (i INT);
@@ -28,3 +38,4 @@ ALTER TABLE v1 EXCHANGE PARTITION p2 WITH TABLE t2 ;
ERROR 42000: Can't open table
DROP VIEW v1;
DROP TABLE t1, t2;
# End of 10.5 tests

View File

@@ -1,3 +1,6 @@
call mtr.add_suppression("..test.t1_will_crash");
call mtr.add_suppression("Got an error from unknown thread");
call mtr.add_suppression("Table 't1_will_crash' is marked as crashed and should be repaired");
CREATE TABLE t1_will_crash (a INT, KEY (a)) ENGINE=MyISAM;
INSERT INTO t1_will_crash VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11);
FLUSH TABLES;

View File

@@ -1,13 +1,13 @@
#
# General errors with ALTER TABLE and partitions that doesn't have to be run
# General bugs with ALTER TABLE and partitions that doesn't have to be run
# on all engines
#
--source include/have_partition.inc
#
# MDEV-22649 SIGSEGV in ha_partition::create_partitioning_metadata on ALTER
#
--echo #
--echo # MDEV-22649 SIGSEGV in ha_partition::create_partitioning_metadata on ALTER
--echo #
set @save_alter_algorithm= @@session.alter_algorithm;
SET SESSION alter_algorithm=4;
@@ -19,18 +19,18 @@ DROP table if exists t1;
set @@session.alter_algorithm= @save_alter_algorithm;
#
# MDEV-22804 SIGSEGV in ha_partition::create_partitioning_metadata |
# ERROR 1507 (HY000): Error in list of partitions to DROP
#
--echo #
--echo # MDEV-22804 SIGSEGV in ha_partition::create_partitioning_metadata |
--echo # ERROR 1507 (HY000): Error in list of partitions to DROP
--echo #
CREATE TABLE t1 (a INT) PARTITION BY RANGE(a) SUBPARTITION BY HASH(a) (PARTITION p VALUES LESS THAN (5) (SUBPARTITION sp, SUBPARTITION sp1), PARTITION p1 VALUES LESS THAN MAXVALUE (SUBPARTITION sp2, SUBPARTITION sp3));
ALTER TABLE t1 DROP PARTITION p;
DROP TABLE if exists t1;
#
# MDEV-23357 Server crashes in Sql_cmd_alter_table_exchange_partition::exchange_partition
#
--echo #
--echo # MDEV-23357 Server crashes in Sql_cmd_alter_table_exchange_partition::exchange_partition
--echo #
CREATE TABLE t1 (i INT);
CREATE VIEW v1 as SELECT * FROM t1;
CREATE TABLE t2 (i INT);
@@ -38,3 +38,5 @@ CREATE TABLE t2 (i INT);
ALTER TABLE v1 EXCHANGE PARTITION p2 WITH TABLE t2 ;
DROP VIEW v1;
DROP TABLE t1, t2;
--echo # End of 10.5 tests

View File

@@ -1,18 +1,10 @@
# test the auto-recover (--myisam-recover) of partitioned myisam tables
--disable_query_log
call mtr.add_suppression("..test.t1_will_crash");
call mtr.add_suppression("Got an error from unknown thread");
call mtr.add_suppression("Table 't1_will_crash' is marked as crashed and should be repaired");
--enable_query_log
--source include/have_partition.inc
--disable_warnings
--disable_query_log
drop table if exists t1_will_crash;
--enable_query_log
--enable_warnings
CREATE TABLE t1_will_crash (a INT, KEY (a)) ENGINE=MyISAM;
INSERT INTO t1_will_crash VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11);