summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorunknown <magnus@shellback.(none)>2004-09-26 16:21:15 +0200
committerunknown <magnus@shellback.(none)>2004-09-26 16:21:15 +0200
commit1dd76e19315f4a225788ff284c32c7f3a5dc0dbc (patch)
treeef18255527c2519d9c95e16262e3f78ec4f7eaee /include
parent5077ba47ad95f166b107dd4da29ae595516e85ab (diff)
parenta64953ed3f469e3efdff4dd6462a1756675459b6 (diff)
downloadmariadb-git-1dd76e19315f4a225788ff284c32c7f3a5dc0dbc.tar.gz
Merge
BitKeeper/etc/logging_ok: auto-union mysql-test/mysql-test-run.sh: Auto merged ndb/src/ndbapi/NdbDictionaryImpl.cpp: Auto merged ndb/src/ndbapi/ndb_cluster_connection.cpp: Auto merged sql/sql_show.cc: Auto merged sql/ha_ndbcluster.cc: SCCS merged
Diffstat (limited to 'include')
-rw-r--r--include/hash.h2
-rw-r--r--include/my_sys.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/include/hash.h b/include/hash.h
index c7cc118b7bd..6e6db27cd40 100644
--- a/include/hash.h
+++ b/include/hash.h
@@ -47,6 +47,7 @@ my_bool _hash_init(HASH *hash, CHARSET_INFO *charset,
uint key_length, hash_get_key get_key,
void (*free_element)(void*), uint flags CALLER_INFO_PROTO);
void hash_free(HASH *tree);
+void hash_reset(HASH *hash);
byte *hash_element(HASH *hash,uint idx);
gptr hash_search(HASH *info,const byte *key,uint length);
gptr hash_next(HASH *info,const byte *key,uint length);
@@ -56,7 +57,6 @@ my_bool hash_update(HASH *hash,byte *record,byte *old_key,uint old_key_length);
void hash_replace(HASH *hash, uint idx, byte *new_row);
my_bool hash_check(HASH *hash); /* Only in debug library */
-#define hash_clear(H) bzero((char*) (H),sizeof(*(H)))
#define hash_inited(H) ((H)->array.buffer != 0)
#ifdef __cplusplus
diff --git a/include/my_sys.h b/include/my_sys.h
index ad1966ba67f..271e0ea0bcb 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -725,7 +725,8 @@ extern void my_free_lock(byte *ptr,myf flags);
#define my_free_lock(A,B) my_free((A),(B))
#endif
#define alloc_root_inited(A) ((A)->min_malloc != 0)
-#define clear_alloc_root(A) bzero((void *) (A), sizeof(MEM_ROOT))
+#define ALLOC_ROOT_MIN_BLOCK_SIZE (MALLOC_OVERHEAD + sizeof(USED_MEM) + 8)
+#define clear_alloc_root(A) do { (A)->free= (A)->used= (A)->pre_alloc= 0; } while(0)
extern void init_alloc_root(MEM_ROOT *mem_root, uint block_size,
uint pre_alloc_size);
extern gptr alloc_root(MEM_ROOT *mem_root,unsigned int Size);