[MDEV-29863] Server crashes in federatedx_txn::acquire after select from the Federated table with partitions and federated_pushdown=1 Created: 2022-10-24  Updated: 2022-10-26  Resolved: 2022-10-26

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Federated
Affects Version/s: 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10
Fix Version/s: 10.4.27, 10.5.18, 10.6.11, 10.7.7, 10.8.6, 10.9.4, 10.10.2, 10.11.1

Type: Bug Priority: Major
Reporter: Alice Sherepa Assignee: Oleg Smirnov
Resolution: Fixed Votes: 0
Labels: None


 Description   

INSTALL SONAME 'ha_federatedx';
--source include/have_partition.inc 
 
eval CREATE SERVER fedlink FOREIGN DATA WRAPPER mysql OPTIONS (USER 'root', HOST '127.0.0.1', DATABASE 'test', PORT $MASTER_MYPORT);
 
create table t1 (i1 int);
create table t2 (i1 int);
 
CREATE TABLE t1_fed (i1 int) ENGINE=FEDERATED CONNECTION="a" partition by list (i1)
(partition p1 values in (1) connection='fedlink/t1',
 partition p2 values in (2) connection='fedlink/t2');
 
select * from t1_fed;
set global federated_pushdown=1;
select * from t1_fed;
 
DROP TABLE t1_fed, t1,t2;
UNINSTALL SONAME 'ha_federatedx';

10.4 291872ec82fc2a19aedf8dcf

221024 12:25:54 [ERROR] mysqld got signal 11 ;
 
Server version: 10.4.27-MariaDB-debug-log
 
sigaction.c:0(__restore_rt)[0x7f82d6535420]
federatedx/federatedx_txn.cc:104(federatedx_txn::acquire(st_federatedx_share*, void*, bool, federatedx_io**))[0x7f82cc6316c4]
federatedx/federatedx_pushdown.cc:233(ha_federatedx_select_handler::init_scan())[0x7f82cc628a84]
sql/select_handler.cc:131(Pushdown_select::execute())[0x55ab68d9c233]
sql/sql_select.cc:4536(JOIN::exec_inner())[0x55ab68c5a332]
sql/sql_select.cc:4348(JOIN::exec())[0x55ab68c57ed6]
sql/sql_select.cc:4788(mysql_select(THD*, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x55ab68c5c0b6]
sql/sql_select.cc:436(handle_select(THD*, LEX*, select_result*, unsigned long))[0x55ab68c2cd4e]
sql/sql_parse.cc:6450(execute_sqlcom_select(THD*, TABLE_LIST*))[0x55ab68b9ae00]
sql/sql_parse.cc:3964(mysql_execute_command(THD*))[0x55ab68b8872d]
sql/sql_parse.cc:7982(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55ab68ba41df]
sql/sql_parse.cc:1860(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55ab68b7aab9]
sql/sql_parse.cc:1378(do_command(THD*))[0x55ab68b775b9]
sql/sql_connect.cc:1420(do_handle_one_connection(CONNECT*))[0x55ab68f784e0]
sql/sql_connect.cc:1325(handle_one_connection)[0x55ab68f77d84]
perfschema/pfs.cc:1871(pfs_spawn_thread)[0x55ab69c032d3]
nptl/pthread_create.c:478(start_thread)[0x7f82d6529609]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x43)[0x7f82d60fa133]
 
Query (0x62b000062290): select * from t1_fed

if table is declared like this -
CREATE TABLE t1_fed (i1 int) ENGINE=FEDERATED CONNECTION="fedlink" partition by list (i1):

Version: '10.5.18-MariaDB-debug-log' 
mariadbd: /10.5/src/storage/federatedx/federatedx_txn.cc:141: int federatedx_txn::acquire(FEDERATEDX_SHARE*, void*, bool, federatedx_io**): Assertion `io->busy && io->server == server' failed.
221025 13:52:23 [ERROR] mysqld got signal 6 ;



 Comments   
Comment by Oleg Smirnov [ 2022-10-26 ]

The bugfix is pushed to 10.4.

Generated at Thu Feb 08 10:11:52 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.