Merge lp:~knielsen/drizzle/innodb-fixes into lp:~drizzle-trunk/drizzle/development

Proposed by Kristian Nielsen
Status: Merged
Merged at revision: not available
Proposed branch: lp:~knielsen/drizzle/innodb-fixes
Merge into: lp:~drizzle-trunk/drizzle/development
To merge this branch: bzr merge lp:~knielsen/drizzle/innodb-fixes
Reviewer Review Type Date Requested Status
Drizzle Developers Pending
Review via email: mp+1995@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Kristian Nielsen (knielsen) wrote :

Here are three fixes for Valgrind problems. Especially the last one looks serious, looks like big-endian is completely
broken without it (I don't have big-endian to test on though).

lp:~knielsen/drizzle/innodb-fixes updated
633. By Kristian Nielsen <knielsen@odin>

Take Mats'es changes from bmove()->memcpy(), and fix all of them to be
memmove() instead. I checked several of them, all of which were wrong
(due to potentially overlapping source and destination), so most
likely more of them are wrong. Painstakingly checking all of them for
whether memcpy() could be used instead would be a very big and
errorprone task, and really is not worth it.

Fixes a bunch of Valgrind errors in the test suite as well.

634. By Kristian Nielsen <knielsen@odin>

Remove #ifdef HAVE_purify. It is not worth it to save one well-predicted conditional at the cost of relying on undefined memcpy() semantics.

635. By Kristian Nielsen <knielsen@odin>

A couple more fixes of previous bmove()->memcpy(), changed to
memmove() due to potential for overlapping source and destination.

636. By Kristian Nielsen <knielsen@odin>

Remove last trace of Field_string.

This is also needed to fix a serious problem with multi_update as seen
with Valgrind errors in the main.update test. The multi_update creates
temporary tables with Field_string fields, but there are cast to
Field_varstring in Copy_field::get_copy_func() since both field types
are now DRIZZLE_TYPE_VARCHAR.

(an alternative would be to re-introduce Field_string as an
internal-only field type, and give it a distinct DRIZZLE_TYPE_FIXCHAR
type for get_copy_func() to check for.)