~mepsql-committers/mepsql/mysql-5.1-5.1.55

Viewing all changes in revision 3543.

  • Committer: Martin Hansson
  • Date: 2011-01-12 08:55:31 UTC
  • Revision ID: martin.hansson@oracle.com-20110112085531-bj93mupb5dndw41r
Bug#58207: invalid memory reads when using default column value and 
tmptable needed

The function DEFAULT() works by modifying the the data buffer pointers (often
referred to as 'record' or 'table record') of its argument. This modification
is done during name resolution (fix_fields().) Unfortunately, the same
modification is done when creating a temporary table, because default values
need to propagate to the new table.

Fixed by skipping the pointer modification for fields that are arguments to
the DEFAULT function.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: