summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--storage/innobase/dict/dict0mem.cc29
-rw-r--r--storage/innobase/include/dict0mem.h4
-rw-r--r--storage/innobase/srv/srv0srv.cc2
3 files changed, 2 insertions, 33 deletions
diff --git a/storage/innobase/dict/dict0mem.cc b/storage/innobase/dict/dict0mem.cc
index 3056f73f0cb..077fab8f131 100644
--- a/storage/innobase/dict/dict0mem.cc
+++ b/storage/innobase/dict/dict0mem.cc
@@ -34,7 +34,6 @@ Created 1/8/1996 Heikki Tuuri
#include "mach0data.h"
#include "dict0dict.h"
#include "fts0priv.h"
-#include "ut0crc32.h"
#include "lock0lock.h"
#include "sync0sync.h"
#include "row0row.h"
@@ -82,10 +81,6 @@ const char table_name_t::part_suffix[4]
= "#P#";
#endif
-/** An interger randomly initialized at startup used to make a temporary
-table name as unuique as possible. */
-static ib_uint32_t dict_temp_file_num;
-
/** Display an identifier.
@param[in,out] s output stream
@param[in] id_name SQL identifier (other than table name)
@@ -1105,35 +1100,15 @@ dict_mem_create_temporary_tablename(
ut_ad(dbend);
size_t dblen = size_t(dbend - dbtab) + 1;
- /* Increment a randomly initialized number for each temp file. */
- my_atomic_add32((int32*) &dict_temp_file_num, 1);
-
- size = dblen + (sizeof(TEMP_FILE_PREFIX) + 3 + 20 + 1 + 10);
+ size = dblen + (sizeof(TEMP_FILE_PREFIX) + 3 + 20);
name = static_cast<char*>(mem_heap_alloc(heap, size));
memcpy(name, dbtab, dblen);
snprintf(name + dblen, size - dblen,
- TEMP_FILE_PREFIX_INNODB UINT64PF "-" UINT32PF,
- id, dict_temp_file_num);
+ TEMP_FILE_PREFIX_INNODB UINT64PF, id);
return(name);
}
-/** Initialize dict memory variables */
-void
-dict_mem_init(void)
-{
- /* Initialize a randomly distributed temporary file number */
- ib_uint32_t now = static_cast<ib_uint32_t>(ut_time());
-
- const byte* buf = reinterpret_cast<const byte*>(&now);
-
- dict_temp_file_num = ut_crc32(buf, sizeof(now));
-
- DBUG_PRINT("dict_mem_init",
- ("Starting Temporary file number is " UINT32PF,
- dict_temp_file_num));
-}
-
/** Validate the search order in the foreign key set.
@param[in] fk_set the foreign key set to be validated
@return true if search order is fine in the set, false otherwise. */
diff --git a/storage/innobase/include/dict0mem.h b/storage/innobase/include/dict0mem.h
index 63cf5c8bbec..a2ad0e2e546 100644
--- a/storage/innobase/include/dict0mem.h
+++ b/storage/innobase/include/dict0mem.h
@@ -494,10 +494,6 @@ dict_mem_create_temporary_tablename(
const char* dbtab,
table_id_t id);
-/** Initialize dict memory variables */
-void
-dict_mem_init(void);
-
/** SQL identifier name wrapper for pretty-printing */
class id_name_t
{
diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc
index f3cab013437..312bf9abb84 100644
--- a/storage/innobase/srv/srv0srv.cc
+++ b/storage/innobase/srv/srv0srv.cc
@@ -1071,8 +1071,6 @@ srv_init()
trx_i_s_cache_init(trx_i_s_cache);
ut_crc32_init();
-
- dict_mem_init();
}
/*********************************************************************//**