cpeden

Member
Mar 11, 2004
21
1
153
A couple days ago I upgrade cPanel and it upgraded MariaDB to 10.0.31. Since this one of my applications is having a query not work. Below is what my software vendor sent to me. How can I downgrade to 10.0.30 if I need to?

This query works:
SELECT * FROM (totals) WHERE
TotalDate IN (select MAX(TotalDate) from totals WHERE TotalDate <= '2017-05-26');

This, however, does not:
SELECT * FROM (totals) WHERE
TotalDate IN (select MAX(TotalDate) from totals WHERE TotalDate <= '2017-05-26') OR TotalDate IS NULL;

This is a bug in your version of MariaDB. Please consult your host.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello,

Could you reply to your software vendor and have them reference a specific URL or case number that includes the specific MariaDB bug they are referring to?

Thank you.
 

cpeden

Member
Mar 11, 2004
21
1
153
Hello Sir,

So I asked my vendor. Here is what they said.

This is on example.com, its also on example2.com and example3.com. (warning NSFW) You will see at the top the counts of photos, videos, etc is 0

==
Any area on the front of your site where the counts show as 0 is a page where this is happening.

If you're looking for the specific query that is returning incorrectly, here's an example using what's in the sillygirlsvideo database:

These queries return results:

SELECT * FROM (totals) WHERE TotalDate IN (select MAX(TotalDate) from totals WHERE TotalDate <= '2017-05-30');

SELECT * FROM (totals) WHERE TotalDate IN ('2017-05-30') OR TotalDate IS NULL;

This does not:

SELECT * FROM (totals) WHERE TotalDate IN (select MAX(TotalDate) from totals WHERE TotalDate <= '2017-05-30') OR TotalDate IS NULL;

Note: You can change the date '2017-05-30' to any date that has results in the query to replicate this.
===
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
I filed a bug with MariaDB a few day ago. Someone was able to replicate the bug and confirm it.

[MDEV-12963] Query bug since 10.0.31 - JIRA
Hello,

Thank you for opening a case with MariaDB. I'm not aware of any specific workarounds at this time, so it's just a matter of waiting for MariaDB to review and fix the case, and then publish the change in a new version.

Thank you.