Merge with 5.1 to get in changes from MySQL 5.1.55

This commit is contained in:
Michael Widenius 2011-02-28 19:39:30 +02:00
commit 3358cdd504
1605 changed files with 28760 additions and 44097 deletions

View file

@ -2058,11 +2058,12 @@ static void lck_free_thread_data(XTThreadPtr XT_UNUSED(self), void *XT_UNUSED(da
static void lck_do_job(XTThreadPtr self, int job, XSLockTestPtr data, xtBool reader)
{
char b1[2048], b2[2048];
char b1[1024], b2[1024];
switch (job) {
case JOB_MEMCPY:
memcpy(b1, b2, 2048);
memset(b1, 0, sizeof(b1));
memset(b2, 1, sizeof(b2));
data->xs_inc++;
break;
case JOB_SLEEP:

View file

@ -29,8 +29,21 @@
struct XTThread;
#ifdef DEBUG
#define DEBUG_MEMORY
#if (defined DEBUG)
/*
Disable PBXT debug malloc on Windows, as it is not properly aligned.
malloc() alignment requiremebt on x64 is documented as 16 bytes. PBXT debug
malloc is only 8 bytes aligned. Improper alignment will lead to a crash if
e.g SSE instructions access heap memory.
This might be general problem , however crashes were seen so far only
on Windows (crash during setjmp() on memory allocated with pbxt debug malloc).
Besides, on Windows there is already a debug malloc by C runtime.
*/
#ifndef _WIN32
#define DEBUG_MEMORY
#endif
#endif
#ifdef DEBUG_MEMORY

View file

@ -1755,6 +1755,8 @@ xtPublic void xt_drop_table(XTThreadPtr self, XTPathStrPtr tab_name, xtBool drop
tab_close_mapped_files(self, tab);
tab_delete_table_files(self, tab_name, tab_id);
/* Remove table from "repair-pending" */
xt_tab_table_repaired(tab);
ASSERT(xt_get_self() == self);
if ((te_ptr = (XTTableEntryPtr) xt_sl_find(self, db->db_table_by_id, &tab_id))) {