Merge lp://staging/~akopytov/percona-server/bug1070856-5.1 into lp://staging/percona-server/5.1

Proposed by Alexey Kopytov
Status: Merged
Approved by: Laurynas Biveinis
Approved revision: no longer in the source branch.
Merged at revision: 502
Proposed branch: lp://staging/~akopytov/percona-server/bug1070856-5.1
Merge into: lp://staging/percona-server/5.1
Diff against target: 56 lines (+26/-0)
3 files modified
Percona-Server/include/my_sys.h (+1/-0)
Percona-Server/mysys/mf_cache.c (+18/-0)
Percona-Server/sql/log.cc (+7/-0)
To merge this branch: bzr merge lp://staging/~akopytov/percona-server/bug1070856-5.1
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Approve
George Ormond Lorch III (community) g2 Approve
Vlad Lesin (community) Approve
Review via email: mp+131514@code.staging.launchpad.net

Description of the change

    Bug #1070856: Temporary files created by binary log cache are not purged
                  after transaction commit

    The problem was that the temporary file used to cache transactions for
    the binary log was initialized once (when the in-memory buffer was
    exceeded) and close (and thus, removed) only when closing the
    connection. Which might lead to problems with large temporary files
    being created and not removed in case of persistent connections and
    large transactions (i.e. LOAD DATA INFILE).

    Fixed by truncating the temporary file, if used for a binary log
    transaction cache, when committing or rolling back a statement or a
    transaction.

To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) wrote :
Revision history for this message
Alexey Kopytov (akopytov) wrote :

ST 26926

Revision history for this message
Vlad Lesin (vlad-lesin) wrote :

Looks good.

It would be great if there would be possibility to test it. Maybe it would me reasonable to add I_S that would show the size of current session cache size?

Revision history for this message
Alexey Kopytov (akopytov) wrote :

Vlad,

I agree that having an I_S table or a status variable would make creating an automated test possible. But the amount of code and time required to implement, test and document that table/variable look unreasonably high for such a small fix.

Btw, why did you just added a comment without adding yourself as a reviewer?

Revision history for this message
Vlad Lesin (vlad-lesin) wrote :

I agree.

review: Approve
Revision history for this message
George Ormond Lorch III (gl-az) :
review: Approve (g2)
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches