Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
60ef478c
Commit
60ef478c
authored
Mar 23, 2018
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove an unnecessary global declaration
parent
d177a0ed
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
38 deletions
+23
-38
storage/innobase/dict/dict0mem.cc
storage/innobase/dict/dict0mem.cc
+23
-29
storage/innobase/include/dict0mem.h
storage/innobase/include/dict0mem.h
+0
-9
No files found.
storage/innobase/dict/dict0mem.cc
View file @
60ef478c
...
...
@@ -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
)
...
...
storage/innobase/include/dict0mem.h
View file @
60ef478c
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment