Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
11.4.4
-
RedHat9, Dell R740
Description
When using MariaDB 11.4.4 with a link to a remote Spider table it will crash the DB when running a select distinct(non primary key field) from spider.table.
I have tested this on 11.4.3 and the query runs without any problem. I have found that the table you are querying needs to have more than 10K rows in order for the crash to occur.
To reproduce create a table on the spider database
Create table db1.tab1 (
id int(4) not null auto_increment,
status varchar(25) default null,
primary key (id) )
engine=InnoDB default charset=latin1;
Insert into the table a ten thousand entries. For my test I used a script to put an incrementing number into the status field.
On the main DB server create spider server entry
create or replace server dataNode1 foreign data wrapper mysql options (PORT 3306, HOST 'spiderDBhost', USER 'spideruser', PASSWORD 'password123');
Create the spider table.
create table db1.tab1 engine=SPIDER comment='wrapper "mysql", srv "dataNode1", table "tab1";
Running this query will cause 11.4.4 to crash:
Select distinct(status) from db1.tab1
It will error out with [ERROR] mysqld got signal 11;
Looking at /var/log/messages there is an entry reporting a segfault on ha_spider.so
Attachments
Issue Links
- duplicates
-
MDEV-35422 mysqld got signal 11 after SELECT DISTINCT
-
- Closed
-
It could be
MDEV-35422which is fixed in the upcoming release 11.4.5.Indeed, the following testcase passes at
MDEV-35422d0fcac44501b93593219ef2210032d06458d5410 but crashes at its parent commit 5c86f3df33dc972acfc3665025c25d6430887569. I'm therefore marking this issue as a duplicate of that one. A workaround would be set spider_disable_use_group_by_handler= 1; - please let me know if it doesn't work.--disable_query_log
--disable_result_log
--source ../../t/test_init.inc
--enable_result_log
--enable_query_log
--source include/have_innodb.inc
--disable_query_log
--disable_result_log
--source ../../t/test_deinit.inc
--enable_result_log
--enable_query_log