Created by Alexey Kopytov on 2012-03-22 and last modified on 2012-03-25
Get this branch:
bzr branch lp:~akopytov/percona-server/bug915814-5.5
Only Alexey Kopytov can upload to this branch. If you are Alexey Kopytov please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Alexey Kopytov
Percona Server

Recent revisions

228. By Alexey Kopytov on 2012-03-25

Bug #856404: Crash when query_cache_strip_comments enabled

Added a simple fix for the bug after reverting the previous patch with

The original problem was that callers of QueryStripComments::set() did
not take the terminating zero in a query string into account when
calculating the additional_length argument value. It was calculated as
(thd->db_length + 1 + QUERY_CACHE_FLAGS_SIZE), though the query cache
buffer layout was as follows:


So the allocated buffer length was 1 byte less than
necessary. additional_length should have been calculated as (1 +
thd->db_length + 1 + QUERY_CACHE_FLAGS_SIZE). Additionally, the query
parsing code in QueryStripComments::set() could overrun the buffer due
to incorrect handling of apostrophes.

On top of that, the query cache buffer layout was changed in 5.5.18 as

<length of db_name as a size_t value>

So the formula for additional_length becomes:

(1 + sizeof(size_t) + thd->db_length + QUERY_CACHE_FLAGS_SIZE)

Fixed by taking the above into account when calling
QueryStripComments::set() and porting a test case for bug #856404 from
the original patch.

227. By Alexey Kopytov on 2012-03-23

Bug #915814: malloc(): memory corruption with 5.5.18

We don't have a reproducible test case for this bug, but it's most
likely caused by refactoring of query_cache_strip_comments introduced in
5.5.18 which also contained a fix for bug #856404.

Reverted refactoring. Will implement a simple fix for bug #856404 in a
separate revision.

220. By Stewart Smith on 2012-02-23

merge small change to write_to_slow_log (TRUE/FALSE/etc)

219. By Stewart Smith on 2012-02-22

merge support for rate limiting slow query log

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
This branch contains Public information 
Everyone can see this information.