Skip to content

Commit a8a7961

Browse files
author
Steinar H. Gunderson
committed
Bug #25997748: MIGRATE FROM HASH TO STD::UNORDERED_MAP [patch 15]
Finally remove HASH, now that there are no more users left. Change-Id: I4c41878f331623d5ac5174750ca88b3917a26be0
1 parent 4bc1916 commit a8a7961

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+21
-981
lines changed

client/mysqldump.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444

4545
#include <errno.h>
4646
#include <fcntl.h>
47-
#include <hash.h>
4847
#include <m_ctype.h>
4948
#include <m_string.h>
5049
#include <my_sys.h>

client/mysqltest.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
#include <assert.h>
3333
#include <errno.h>
3434
#include <fcntl.h>
35-
#include <hash.h>
3635
#include <limits.h>
3736
#include <m_ctype.h>
3837
#include <mf_wcomp.h> // wild_compare

include/hash.h

Lines changed: 0 additions & 127 deletions
This file was deleted.

include/lf.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727

2828
#include <atomic>
2929

30-
#include "hash.h"
3130
#include "my_inttypes.h"
3231
#include "my_macros.h"
3332
#include "mysql/psi/mysql_statement.h"
@@ -166,6 +165,18 @@ typedef void lf_hash_init_func(uchar *dst, const uchar* src);
166165
/* lf_hash overhead per element (that is, sizeof(LF_SLIST) */
167166
extern const int LF_HASH_OVERHEAD;
168167

168+
/**
169+
Callback for extracting key and key length from user data in a LF_HASH.
170+
@param arg Pointer to user data.
171+
@param[out] length Store key length here.
172+
@return Pointer to key to be hashed.
173+
174+
@note Was my_hash_get_key, with lots of C-style casting when calling
175+
my_hash_init. Renamed to force build error (since signature changed)
176+
in case someone keeps following that coding style.
177+
*/
178+
typedef const uchar *(*hash_get_key_function)(const uchar *arg, size_t *length);
179+
169180
typedef struct st_lf_hash {
170181
LF_DYNARRAY array; /* hash itself */
171182
LF_ALLOCATOR alloc; /* allocator for elements */

mysys/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ SET(MYSYS_SOURCES
2222
charset-def.cc
2323
checksum.cc
2424
errors.cc
25-
hash.cc
2625
lf_alloc-pin.cc
2726
lf_dynarray.cc
2827
lf_hash.cc

0 commit comments

Comments
 (0)