Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.4.14, 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5
-
None
Description
One of the customers reported that WITH RECURSIVE, UNION ALL query, MariaDB is crashing.
Actually, when executing this particular CTE query it actually crashes the server, but nothing logs in the error log (stack trace) . But core dump is generated, further gdb output is captured.
MariaDB [test]> select @@version; |
+-----------------+ |
| @@version |
|
+-----------------+ |
| 10.4.14-MariaDB |
|
+-----------------+ |
1 row in set (0.000 sec) |
|
MariaDB [test]> create table foo (a bigint(10) not null auto_increment, b int(5) not null, c bigint(10) default null, primary key (`a`)); |
Query OK, 0 rows affected (0.011 sec) |
|
MariaDB [test]> insert into foo values (1,1,12); |
Query OK, 1 row affected (0.003 sec)
|
|
MariaDB [test]> WITH RECURSIVE TREE AS ( SELECT a , b , c FROM foo UNION ALL SELECT A.a , A.b , A.c FROM foo AS A INNER JOIN TREE AS B ON A.c = B.a ) SELECT 0 AS b FROM dual UNION ALL SELECT b FROM TREE; |
ERROR 2013 (HY000): Lost connection to MySQL server during query |
MariaDB [test]> exit
|
[root@localhost ~]# ls -lrth /var/lib/mysql/core.63301
|
-rw------- 1 mysql mysql 509M Aug 28 17:48 /var/lib/mysql/core.63301
|
[root@localhost ~]# sudo gdb --batch --eval-command="thread apply all bt"
|
|
/usr/sbin/mysqld /var/lib/mysql/core.63301 > mysqld_bt_all_threads.txt
|
===============================================================
Locally, I can reproduce the issue with the above steps.
Attaching the error logs, gdb output captured for this crash.