Description:
OS version and name:
Ubuntu 22.04.3 LTS (Jammy Jellyfish)
Linux eb1f47b08982 6.5.11-8-pve #1 SMP PREEMPT_DYNAMIC PMX 6.5.11-8 (2024-01-30T12:27Z) x86_64 x86_64 x86_64 GNU/Linux
PoC:
'''
delete from mytest100.test0
where
EXISTS (
select
ref_6.name as c0,
mytest100.test0.column2 as c1
from
mysql.plugin as ref_0
right join ndbinfo.index_stats as ref_1
inner join information_schema.INNODB_FT_INDEX_TABLE as ref_2
on (EXISTS (
select
ref_2.WORD as c0,
(select LOCKED_BY_THREAD_ID from performance_schema.mutex_instances limit 1 offset 95)
as c1,
mytest100.test0.column5 as c2,
ref_3.server_id as c3,
ref_3.server_id as c4
from
mysql.ndb_apply_status as ref_3
where mytest100.test0.column0 is not NULL
limit 84))
left join sys.ps_check_lost_instrumentation as ref_4
right join information_schema.COLLATIONS as ref_5
on (false)
right join mysql.help_keyword as ref_6
right join information_schema.STATISTICS as ref_7
on (ref_6.help_keyword_id = ref_7.NON_UNIQUE )
on (ref_5.ID = ref_7.CARDINALITY )
on (((ref_1.sample_version is not NULL)
or (false))
and (EXISTS (
select
mytest100.test0.column1 as c0,
ref_5.SORTLEN as c1,
ref_7.SEQ_IN_INDEX as c2,
ref_5.IS_DEFAULT as c3,
ref_6.name as c4,
ref_6.name as c5,
ref_8.read_backup as c6,
ref_2.WORD as c7,
mytest100.test0.column5 as c8,
mytest100.test0.column4 as c9, ref_2.DOC_ID as c10,
ref_6.help_keyword_id as c11,
ref_5.IS_DEFAULT as c12,
ref_2.DOC_ID as c13
from
ndbinfo.table_info as ref_8
where true)))
on ((ref_7.PACKED is not NULL)
or ((ref_5.IS_COMPILED is NULL)
or ((ref_6.help_keyword_id is not NULL)
or (ref_5.SORTLEN is not NULL))))
where (ref_4.variable_value is NULL)
and (ref_6.help_keyword_id is NULL)
limit 32);
'''
This SQL statement will not be able to be stopped or return results, and can ultimately only be cancelled by forcing the mysql process to be killed.
How to repeat:
Architecture Information:
'''
[NDBD DEFAULT]
NoOfReplicas =2
DataMemory = 512M
IndexMemory = 64M
[NDB_MGMD]
NodeId=1
hostname =192.172.10.8
datadir =/var/lib/mysql-cluster
[NDBD]
NodeId =2
hostname =192.172.10.9
datadir =/usr/local/mysql-cluster/data
NodeGroup=0
[NDBD]
NodeId =3
hostname =192.172.10.10
datadir =/usr/local/mysql-cluster/data
NodeGroup=1
[NDBD]
NodeId =4
hostname =192.172.10.11
datadir =/usr/local/mysql-cluster/data
NodeGroup=0
[NDBD]
NodeId =5
hostname =192.172.10.12
datadir =/usr/local/mysql-cluster/data
NodeGroup=1
[mysqld]
NodeId =6
hostname =192.172.10.9
[mysqld]
NodeId =7
hostname =192.172.10.10
[mysqld]
NodeId =8
hostname =192.172.10.11
[mysqld]
NodeId =9
hostname =192.172.10.12
'''
Attempted and successfully reproduced!
Suggested fix:
There should be a problem with the query plan generation and optimisation of the SQL.
Description: OS version and name: Ubuntu 22.04.3 LTS (Jammy Jellyfish) Linux eb1f47b08982 6.5.11-8-pve #1 SMP PREEMPT_DYNAMIC PMX 6.5.11-8 (2024-01-30T12:27Z) x86_64 x86_64 x86_64 GNU/Linux PoC: ''' delete from mytest100.test0 where EXISTS ( select ref_6.name as c0, mytest100.test0.column2 as c1 from mysql.plugin as ref_0 right join ndbinfo.index_stats as ref_1 inner join information_schema.INNODB_FT_INDEX_TABLE as ref_2 on (EXISTS ( select ref_2.WORD as c0, (select LOCKED_BY_THREAD_ID from performance_schema.mutex_instances limit 1 offset 95) as c1, mytest100.test0.column5 as c2, ref_3.server_id as c3, ref_3.server_id as c4 from mysql.ndb_apply_status as ref_3 where mytest100.test0.column0 is not NULL limit 84)) left join sys.ps_check_lost_instrumentation as ref_4 right join information_schema.COLLATIONS as ref_5 on (false) right join mysql.help_keyword as ref_6 right join information_schema.STATISTICS as ref_7 on (ref_6.help_keyword_id = ref_7.NON_UNIQUE ) on (ref_5.ID = ref_7.CARDINALITY ) on (((ref_1.sample_version is not NULL) or (false)) and (EXISTS ( select mytest100.test0.column1 as c0, ref_5.SORTLEN as c1, ref_7.SEQ_IN_INDEX as c2, ref_5.IS_DEFAULT as c3, ref_6.name as c4, ref_6.name as c5, ref_8.read_backup as c6, ref_2.WORD as c7, mytest100.test0.column5 as c8, mytest100.test0.column4 as c9, ref_2.DOC_ID as c10, ref_6.help_keyword_id as c11, ref_5.IS_DEFAULT as c12, ref_2.DOC_ID as c13 from ndbinfo.table_info as ref_8 where true))) on ((ref_7.PACKED is not NULL) or ((ref_5.IS_COMPILED is NULL) or ((ref_6.help_keyword_id is not NULL) or (ref_5.SORTLEN is not NULL)))) where (ref_4.variable_value is NULL) and (ref_6.help_keyword_id is NULL) limit 32); ''' This SQL statement will not be able to be stopped or return results, and can ultimately only be cancelled by forcing the mysql process to be killed. How to repeat: Architecture Information: ''' [NDBD DEFAULT] NoOfReplicas =2 DataMemory = 512M IndexMemory = 64M [NDB_MGMD] NodeId=1 hostname =192.172.10.8 datadir =/var/lib/mysql-cluster [NDBD] NodeId =2 hostname =192.172.10.9 datadir =/usr/local/mysql-cluster/data NodeGroup=0 [NDBD] NodeId =3 hostname =192.172.10.10 datadir =/usr/local/mysql-cluster/data NodeGroup=1 [NDBD] NodeId =4 hostname =192.172.10.11 datadir =/usr/local/mysql-cluster/data NodeGroup=0 [NDBD] NodeId =5 hostname =192.172.10.12 datadir =/usr/local/mysql-cluster/data NodeGroup=1 [mysqld] NodeId =6 hostname =192.172.10.9 [mysqld] NodeId =7 hostname =192.172.10.10 [mysqld] NodeId =8 hostname =192.172.10.11 [mysqld] NodeId =9 hostname =192.172.10.12 ''' Attempted and successfully reproduced! Suggested fix: There should be a problem with the query plan generation and optimisation of the SQL.