~percona-dev/percona-server/release-5.1.49-12-rnt

Viewing all changes in revision 121.

  • Committer: Alexey Kopytov
  • Date: 2010-11-12 22:02:10 UTC
  • Revision ID: akopytov@gmail.com-20101112220210-h19xoog2kd58uo2m
Fixed a buffer overflow bug in
row_based_replication_without_primary_key.patch.

The problem was that the m_key buffer was allocated before the
index selection code in Rows_log_event::find_row() was invoked. So
the length of the buffer was always equal to the length of the
first key. Since another key might actually be used when
locating rows, the previously allocated buffer could be overrun.

Fixed by moving the index selection code so that the key that will
actually be used in Rows_log_event::find_row() and its length are known
before the allocation.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: