summaryrefslogtreecommitdiff
path: root/ndb
diff options
context:
space:
mode:
authorunknown <mskold@mysql.com>2005-03-22 22:31:51 +0100
committerunknown <mskold@mysql.com>2005-03-22 22:31:51 +0100
commit485a58e1f4ed7df3d20ce2555e2e5681f31a3545 (patch)
tree46d58c5af6f142e7fa9af9ea8bd57ba92dc1f709 /ndb
parent6ed02debff53e895e6c526fbbeac7c791e1f269f (diff)
parent1c0c25e7473c5ad68876aea848a8f7ad480333f7 (diff)
downloadmariadb-git-485a58e1f4ed7df3d20ce2555e2e5681f31a3545.tar.gz
Merged
mysql-test/mysql-test-run.sh: Auto merged sql/ha_ndbcluster.h: Auto merged sql/sql_select.cc: Auto merged
Diffstat (limited to 'ndb')
-rw-r--r--ndb/src/ndbapi/DictCache.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/ndb/src/ndbapi/DictCache.cpp b/ndb/src/ndbapi/DictCache.cpp
index afdb37aa53f..9cdd68272ad 100644
--- a/ndb/src/ndbapi/DictCache.cpp
+++ b/ndb/src/ndbapi/DictCache.cpp
@@ -24,12 +24,11 @@
Ndb_local_table_info *
Ndb_local_table_info::create(NdbTableImpl *table_impl, Uint32 sz)
{
- if (sz % 8 != 0) // round to Uint64
- sz += 8 - sz % 8;
- void *data= malloc(sizeof(NdbTableImpl)+sz-8);
+ Uint32 tot_size= sizeof(NdbTableImpl *) + ((sz+7)>>3)<<3; // round to Uint64
+ void *data= malloc(tot_size);
if (data == 0)
return 0;
- memset(data,0,sizeof(NdbTableImpl)+sz-8);
+ memset(data, 0, tot_size);
new (data) Ndb_local_table_info(table_impl);
return (Ndb_local_table_info *) data;
}