Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MariaDB query bug

Discussion in 'Database Discussions' started by cpeden, May 26, 2017.

Tags:
  1. cpeden

    cpeden Member

    Joined:
    Mar 11, 2004
    Messages:
    21
    Likes Received:
    1
    Trophy Points:
    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.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,659
    Likes Received:
    1,428
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
  3. cpeden

    cpeden Member

    Joined:
    Mar 11, 2004
    Messages:
    21
    Likes Received:
    1
    Trophy Points:
    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.
    ===
     
    #3 cpeden, May 31, 2017
    Last edited by a moderator: Jun 1, 2017
  4. cpeden

    cpeden Member

    Joined:
    Mar 11, 2004
    Messages:
    21
    Likes Received:
    1
    Trophy Points:
    153
    cPanelMichael likes this.
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,659
    Likes Received:
    1,428
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page