mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 11:01:52 +01:00
Remove an unnecessary global declaration
This commit is contained in:
parent
d177a0ed14
commit
60ef478c2e
2 changed files with 23 additions and 38 deletions
|
@ -51,6 +51,29 @@ static const char* innobase_system_databases[] = {
|
|||
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 */
|
||||
const char table_name_t::part_suffix[4]
|
||||
#ifdef _WIN32
|
||||
|
@ -1167,35 +1190,6 @@ operator<< (std::ostream& out, const dict_foreign_set& fk_set)
|
|||
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.
|
||||
@param[in] clustered index definition after instant ADD COLUMN */
|
||||
inline void dict_index_t::instant_add_field(const dict_index_t& instant)
|
||||
|
|
|
@ -49,7 +49,6 @@ Created 1/8/1996 Heikki Tuuri
|
|||
#include "os0once.h"
|
||||
#include "ut0new.h"
|
||||
#include "fil0fil.h"
|
||||
#include <my_crypt.h>
|
||||
#include "fil0crypt.h"
|
||||
#include <set>
|
||||
#include <algorithm>
|
||||
|
@ -315,14 +314,6 @@ dict_mem_table_create(
|
|||
ulint n_v_cols, /*!< in: number of virtual columns */
|
||||
ulint flags, /*!< in: table flags */
|
||||
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. */
|
||||
void
|
||||
|
|
Loading…
Add table
Reference in a new issue