Recall of Percona Server 5.1.47-11.0

Percona Server release 11.0 which we announced few days ago unfortunately was released with a bug introduced while implementing stripping comments in query cache which could cause server crash with certain types of queries if query cache is enabled. We have released Percona Server release 11.1 which includes a fix for this issue. If you can’t perform upgrade promptly you can disable query cache until you can do this.

We’re sorry for shipping release with such bug.

The issue with this bug in more details is as follows:
MySQL Query Cache works by checking incoming queries if they may be found in query cache – this is done by performing simple check if query is starting from SEL or comment. After Query is parsed and executed MySQL stores results for SELECT queries in Query Cache. There are cases when queries will not be considered as cachable query during first check, however result for them will be stored in the query cache. This rare case was not handled properly in the new feature added and it was causing MySQL to crash.

The most typical case for queries causing issues would be queries starting with brackets and having space before select such as ( select * from t1 ) Queries starting with brackets are often used with UNION queries.

Share this post

Comments (10)

  • gary

    Just to be clear, will this only be an issue if we set query_cache_strip_comments=on? If we stick with default value, then this bug should not have an affect?

    Thanks for the quick update.


    June 30, 2010 at 7:49 am
  • peter


    Unfortunately this is NOT the case. Anyone with query cache enabled running these specific query types if affected.

    June 30, 2010 at 8:19 am
  • gary

    Ok, that is odd, I could not reproduce on our production server. However we updated anyhow. Thanks for the info.

    June 30, 2010 at 8:54 am
  • peter


    It would not crash for every query only for some. It is great if it does not crash for you. Bug report contains repeatable example (which was added to test suite to trigger the crash

    July 1, 2010 at 5:01 pm
  • Mat

    Thanks for the heads up, last week we started seeing this type of crashing behavior on our database servers after they were upgraded to the latest Percona build. I could not for the life of me figure out why certain servers were crashing more often than others, but the query caching issue seems to explain it perfectly. We just downgraded our servers to a previous build and that seemed to fix the issue.

    That will teach me to leave a Yum repo enabled ūüôā

    July 2, 2010 at 2:16 pm
  • peter

    Gary – did you try with space after first “(” ? This is what caused problems things like (select 1) worked OK

    July 6, 2010 at 9:59 am
  • peter

    Here is the bug filed with MySQL on this issue which in the end was exposed as crash with this patch

    July 6, 2010 at 10:24 am
  • Jim B.

    [root@sql-poll ~]# yum install Percona-Server-shared-compat
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * addons:
    * base:
    * epel:
    * extras:
    * updates:
    Setting up Install Process
    Resolving Dependencies
    –> Running transaction check
    —> Package Percona-Server-shared-compat.x86_64 0:5.1.43-3 set to be updated
    –> Finished Dependency Resolution

    Dependencies Resolved

    Package Arch Version Repository Size
    Percona-Server-shared-compat x86_64 5.1.43-3 percona 4.9 M

    Transaction Summary
    Install 1 Package(s)
    Update 0 Package(s)
    Remove 0 Package(s)

    Total size: 4.9 M
    Is this ok [y/N]: y
    Downloading Packages:
    Running rpm_check_debug
    Running Transaction Test
    Finished Transaction Test

    Transaction Check Error:
    file /usr/lib64/ from install of Percona-Server-shared-compat-5.1.43-3.x86_64 conflicts with file from package Percona-Server-shared-51-5.1.47-rel11.2.53.rhel5.x86_64
    file /usr/lib64/ from install of Percona-Server-shared-compat-5.1.43-3.x86_64 conflicts with file from package Percona-Server-shared-51-5.1.47-rel11.2.53.rhel5.x86_64

    Error Summary

    July 13, 2010 at 12:41 pm
  • peter


    Please do not use commits to report “bugs” there is bugs database for that on launchpad:

    It looks like name for package is changed so you better to leave old package or remove it and install new one.

    July 13, 2010 at 2:32 pm
  • Aleksandr Kuzminsky


    New version of Percona-Server-shared-compat is uploaded. This issue is fixed in it.
    Could you please try?

    July 14, 2010 at 5:57 am

Comments are closed.

Use Percona's Technical Forum to ask any follow-up questions on this blog topic.