~drizzle-trunk/drizzle/development

Viewing all changes in revision 1819.7.29.

Merge Revision revid:sergey.glukhov@sun.com-20100609120734-ndy2281wau9067zv from MySQL InnoDB

Original revid:sergey.glukhov@sun.com-20100609120734-ndy2281wau9067zv

Original Authors: Sergey Glukhov <Sergey.Glukhov@sun.com>
Original commit message:
Bug#38999 valgrind warnings for update statement in function compare_record()
Valgrind warning happpens because of uninitialized null bytes.
In row_sel_push_cache_row_for_mysql() function we fill fetch cache
with necessary field values, row_sel_store_mysql_rec() is called
for this and leaves null bytes untouched.
Later row_sel_pop_cached_row_for_mysql() rewrites table record
buffer with uninited null bytes. We can see the problem from the
test case:
At 'SELECT...' we call row_sel_push...->row_sel_store...->row_sel_pop_cached...
chain which rewrites table->record[0] buffer with uninitialized null bytes.
When we call 'UPDATE...' statement, compare_record uses this buffer and
valgrind warning occurs.
The fix is to init null bytes with default values.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: