diff options
author | Michael Widenius <monty@askmonty.org> | 2011-02-28 19:39:30 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2011-02-28 19:39:30 +0200 |
commit | 3358cdd5048671ee6cbbf50c291f7e0d0fda8e1e (patch) | |
tree | da0e622896425203d23ecdfd1bc77b57e3502edf /storage/pbxt | |
parent | 869f5d0e81d5cbecaec3605f292fbb363b9ccbf6 (diff) | |
parent | f83e594218a6d19da2fa1ea2a01d860c30fe2913 (diff) | |
download | mariadb-git-3358cdd5048671ee6cbbf50c291f7e0d0fda8e1e.tar.gz |
Merge with 5.1 to get in changes from MySQL 5.1.55
Diffstat (limited to 'storage/pbxt')
-rw-r--r-- | storage/pbxt/src/lock_xt.cc | 5 | ||||
-rw-r--r-- | storage/pbxt/src/memory_xt.h | 17 | ||||
-rw-r--r-- | storage/pbxt/src/table_xt.cc | 2 |
3 files changed, 20 insertions, 4 deletions
diff --git a/storage/pbxt/src/lock_xt.cc b/storage/pbxt/src/lock_xt.cc index 0e9af277c7b..946adfecccc 100644 --- a/storage/pbxt/src/lock_xt.cc +++ b/storage/pbxt/src/lock_xt.cc @@ -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: diff --git a/storage/pbxt/src/memory_xt.h b/storage/pbxt/src/memory_xt.h index 1785cd0bd51..bfc7990f914 100644 --- a/storage/pbxt/src/memory_xt.h +++ b/storage/pbxt/src/memory_xt.h @@ -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 diff --git a/storage/pbxt/src/table_xt.cc b/storage/pbxt/src/table_xt.cc index a9fec660697..30b844a9184 100644 --- a/storage/pbxt/src/table_xt.cc +++ b/storage/pbxt/src/table_xt.cc @@ -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))) { |