[MDEV-14475] queries with SELECT, IFNULL, and ORDER BY crashing mysqld executable Created: 2017-11-22  Updated: 2018-01-28  Resolved: 2018-01-28

Status: Closed
Project: MariaDB Server
Component/s: OTHER
Affects Version/s: 5.5.53, 10.0.31-galera
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Brent Gee Assignee: Unassigned
Resolution: Incomplete Votes: 0
Labels: need_feedback
Environment:

Linux CentOS 7


Attachments: File fw-end1.feeneywireless.com.err.gz     File fw-end1.my.cnf.gz     File problem query.sql     File tmo-db.feeneywireless.com.err.gz     File tmo-db.my.cnf.gz    

 Description   

Our application creates SQL dynamically to generate reports using PHP drivers. Our application's reporting engine generates SQL via string functions, and then passes that SQL to be run with the mysql class using MySQLi driver with client api version is 5.5.52-MariaDB. Some queries will crash the mysqld executable when run using this method. We have taken the code generated and run it in MySQL Workbench, dbForge Sutdio for MySQL, and directly on the server MySQL client and it will crash the mysqld executable every time. If we modify the query by either formatting it or adding spaces, the query completes and no crash is created. We have changed our code to basically wrap the SQL with another :SELECT * FROM (generated SQL)" and this method works to allow the query to run properly. However, because this is crashing the mysqld, we wanted to start a bug ticket.

We have run the code on our dev server using MariaDB 5.5.53, and on our staging Galera cluster running 10.0.31-galera in every manner possible, but crashes still happen. When it happens on the galera cluster, the mysql-safe restart does not properly restart wsrep services and we have to do a full server restart for that cluster member.

I have uploaded the sql error log from both servers for review (tmo-db.feeneywireless.com.err and fw-end1.feeneywireless.com.err) and the config files (tmo-db.my.cnf and fw-end1.my.cnf). I also included a sample of the SQL that is causing the crash, but there have been other generated SQL that caused the problems.

Our next steps are to update to current version on these servers but would like to do so only if this is a known bug that has been fixed in the 5.5 and 10.0 branches.



 Comments   
Comment by Elena Stepanova [ 2017-12-01 ]

There were some bug fixes in later versions that could have been related, e.g. MDEV-13135, so it does make sense to upgrade and see if it helps.
There are also open bugs which could be potentially the same, e.g. MDEV-11566, and also MDEV-8278, MDEV-7848, although the probability of their relevance is lower.

If the upgrade doesn't help you, please provide SHOW CREATE for structures involved in the query, and SHOW INDEX IN... for base tables.

Generated at Thu Feb 08 08:13:50 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.