When I execute:
SELECT T2.`Name`
|
FROM (
|
SELECT `Country` FROM `religion` GROUP BY `Country` ORDER BY COUNT(DISTINCT `Name`) DESC LIMIT 1
|
) AS T1
|
INNER JOIN `country` AS T2
|
ON T1.`Country`=T2.`Code`
|
MariaDB crashes. The log is attached. A dump of the data is attached.
Expected behaviour: The query returns country name with the highest count of distinct religions.
Reproducibility: On macOS 12.6, case insensitive file system, with a fresh installation of MariaDB 10.7.3 from Homebrew I only get a misleading error message (the db remains responsive to other queries):
2003 - Can't connect to MySQL server on '127.0.0.1' (61 "Connection refused")
|
Severity: It causes a crash on a select query → marking as Critical.
What I checked:
- I renamed `Country` column name to not clash with `country` table. It didn't have any impact.
- When I change `LIMIT 1` to `LIMIT 2`, the query works.