Commit 60ef478c authored by Marko Mäkelä's avatar Marko Mäkelä

Remove an unnecessary global declaration

parent d177a0ed
...@@ -51,6 +51,29 @@ static const char* innobase_system_databases[] = { ...@@ -51,6 +51,29 @@ static const char* innobase_system_databases[] = {
NullS NullS
}; };
/** Determine if a table belongs to innobase_system_databases[]
@param[in] name database_name/table_name
@return whether the database_name is in innobase_system_databases[] */
static bool dict_mem_table_is_system(const char *name)
{
/* table has the following format: database/table
and some system table are of the form SYS_* */
if (!strchr(name, '/')) {
return true;
}
size_t table_len = strlen(name);
const char *system_db;
int i = 0;
while ((system_db = innobase_system_databases[i++])
&& (system_db != NullS)) {
size_t len = strlen(system_db);
if (table_len > len && !strncmp(name, system_db, len)) {
return true;
}
}
return false;
}
/** The start of the table basename suffix for partitioned tables */ /** The start of the table basename suffix for partitioned tables */
const char table_name_t::part_suffix[4] const char table_name_t::part_suffix[4]
#ifdef _WIN32 #ifdef _WIN32
...@@ -1167,35 +1190,6 @@ operator<< (std::ostream& out, const dict_foreign_set& fk_set) ...@@ -1167,35 +1190,6 @@ operator<< (std::ostream& out, const dict_foreign_set& fk_set)
return(out); return(out);
} }
/****************************************************************//**
Determines if a table belongs to a system database
@return */
bool
dict_mem_table_is_system(
/*================*/
char *name) /*!< in: table name */
{
ut_ad(name);
/* table has the following format: database/table
and some system table are of the form SYS_* */
if (strchr(name, '/')) {
size_t table_len = strlen(name);
const char *system_db;
int i = 0;
while ((system_db = innobase_system_databases[i++])
&& (system_db != NullS)) {
size_t len = strlen(system_db);
if (table_len > len && !strncmp(name, system_db, len)) {
return true;
}
}
return false;
} else {
return true;
}
}
/** Adjust clustered index metadata for instant ADD COLUMN. /** Adjust clustered index metadata for instant ADD COLUMN.
@param[in] clustered index definition after instant ADD COLUMN */ @param[in] clustered index definition after instant ADD COLUMN */
inline void dict_index_t::instant_add_field(const dict_index_t& instant) inline void dict_index_t::instant_add_field(const dict_index_t& instant)
......
...@@ -49,7 +49,6 @@ Created 1/8/1996 Heikki Tuuri ...@@ -49,7 +49,6 @@ Created 1/8/1996 Heikki Tuuri
#include "os0once.h" #include "os0once.h"
#include "ut0new.h" #include "ut0new.h"
#include "fil0fil.h" #include "fil0fil.h"
#include <my_crypt.h>
#include "fil0crypt.h" #include "fil0crypt.h"
#include <set> #include <set>
#include <algorithm> #include <algorithm>
...@@ -315,14 +314,6 @@ dict_mem_table_create( ...@@ -315,14 +314,6 @@ dict_mem_table_create(
ulint n_v_cols, /*!< in: number of virtual columns */ ulint n_v_cols, /*!< in: number of virtual columns */
ulint flags, /*!< in: table flags */ ulint flags, /*!< in: table flags */
ulint flags2); /*!< in: table flags2 */ ulint flags2); /*!< in: table flags2 */
/**********************************************************************//**
Determines if a table belongs to a system database
@return */
UNIV_INTERN
bool
dict_mem_table_is_system(
/*==================*/
char *name); /*!< in: table name */
/****************************************************************//** /****************************************************************//**
Free a table memory object. */ Free a table memory object. */
void void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment