[MDEV-23357] Server crashes in Sql_cmd_alter_table_exchange_partition::exchange_partition Created: 2020-07-31  Updated: 2023-11-27  Resolved: 2021-05-18

Status: Closed
Project: MariaDB Server
Component/s: Partitioning
Affects Version/s: 10.5
Fix Version/s: 10.5.5

Type: Bug Priority: Major
Reporter: Alice Sherepa Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-14642 Assertion `table->s->db_create_option... Closed

 Description   

--source include/have_partition.inc
 
CREATE TABLE t1 (i INT);
INSERT INTO t1 VALUES (1),(2),(3); #not necessary 
CREATE VIEW v1 as SELECT * FROM `t1`;
 
CREATE TABLE t2 (i INT);
INSERT INTO t2 VALUES (1),(2),(3); #not necessary 
 
ALTER TABLE v1 EXCHANGE PARTITION p2 WITH TABLE t2 ;

debug + non-debug build:

10.5 c69520c9dfa6e4a26258842a1d35

Version: '10.5.5-MariaDB-debug-log'
200731 14:29:39 [ERROR] mysqld got signal 11 ;
 
mysys/stacktrace.c:306(my_print_stacktrace)[0x5601cd000bd6]
sql/sql_partition_admin.cc:566(Sql_cmd_alter_table_exchange_partition::exchange_partition(THD*, TABLE_LIST*, Alter_info*))[0x5601ccc59bff]
sql/sql_partition_admin.cc:109(Sql_cmd_alter_table_exchange_partition::execute(THD*))[0x5601ccc56b0d]
sql/sql_parse.cc:5951(mysql_execute_command(THD*))[0x5601cc84e64d]
sql/sql_parse.cc:7993(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x5601cc85bc7c]
sql/sql_parse.cc:1869(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x5601cc832b95]
sql/sql_parse.cc:1347(do_command(THD*))[0x5601cc82f4ad]
sql/sql_connect.cc:1410(do_handle_one_connection(CONNECT*, bool))[0x5601ccc536c6]
sql/sql_connect.cc:1314(handle_one_connection)[0x5601ccc53023]
perfschema/pfs.cc:2203(pfs_spawn_thread)[0x5601cd908886]
nptl/pthread_create.c:487(start_thread)[0x7ff08edaafa3]
x86_64/clone.S:97(clone)[0x7ff08e3b14cf]
 
Query (0x62b0000382a8): ALTER TABLE v1 EXCHANGE PARTITION p2 WITH TABLE t2



 Comments   
Comment by Elena Stepanova [ 2021-05-18 ]

It looks like it's already been fixed, just not closed:

commit a0518ed998d3e3256d576e6209593c3fd3969ce9
Author: Sergei Golubchik
Date:   Fri Jul 31 17:11:17 2020 +0200
 
    MDEV-23357 Server crashes in Sql_cmd_alter_table_exchange_partition::exchange_partition

The commit went to 10.5.5+.

Generated at Thu Feb 08 09:21:48 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.