diff options
author | unknown <stewart@mysql.com> | 2005-06-04 18:14:34 +1000 |
---|---|---|
committer | unknown <stewart@mysql.com> | 2005-06-04 18:14:34 +1000 |
commit | 0602da4d0ca2b87ac4a6bc5a4686a5741d1db3e2 (patch) | |
tree | 184aee1d97a9af35de26a618f3b47a675e83c9c4 /ndb/src/ndbapi/DictCache.hpp | |
parent | a681af904d4fc8e02042b93b9035855ea989a155 (diff) | |
download | mariadb-git-0602da4d0ca2b87ac4a6bc5a4686a5741d1db3e2.tar.gz |
BUG#10948 NDB Replication: Race condition with ALTER/DROP table
BUG#9826 Server crash on schema change ("drop table", "alter table") with NDB
See note on 10948 for detailed explanation.
struct a { void* a; long long b[1]; };
on PPC32 (and 32bit pa risc): 16
on x86: 12
so a malloc(sizeof(void*)+extra_bits) is wrong.
Assuming that the long long is 64 bit aligned as non-aligned 64bit accesses
are rather expensive on ppc.
Thanks to paulus for doing the PPC port of valgrind.
Without which I would no doubt still be trying to find this.
ndb/src/ndbapi/DictCache.cpp:
Fix allocation size for Ndb_local_table_info for architectures such as PPC and PA-RISC (32bit)
where
struct a { void* a; long long b;};
is 64 bit aligned (i.e. sizeof(struct a)==16)
ndb/src/ndbapi/DictCache.hpp:
Add warning about having to be the last member in the structure
Diffstat (limited to 'ndb/src/ndbapi/DictCache.hpp')
-rw-r--r-- | ndb/src/ndbapi/DictCache.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ndb/src/ndbapi/DictCache.hpp b/ndb/src/ndbapi/DictCache.hpp index 58c08a93e61..ca31c345396 100644 --- a/ndb/src/ndbapi/DictCache.hpp +++ b/ndb/src/ndbapi/DictCache.hpp @@ -33,7 +33,7 @@ public: static Ndb_local_table_info *create(NdbTableImpl *table_impl, Uint32 sz=0); static void destroy(Ndb_local_table_info *); NdbTableImpl *m_table_impl; - Uint64 m_local_data[1]; + Uint64 m_local_data[1]; // Must be last member. Used to access extra space. private: Ndb_local_table_info(NdbTableImpl *table_impl); ~Ndb_local_table_info(); |