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
d874cdec
Commit
d874cdec
authored
Sep 27, 2019
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dict_load_table(): Remove constant parameter cached=true
Spotted by Thirunarayanan Balathandayuthapani.
parent
718fcee0
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
14 additions
and
32 deletions
+14
-32
storage/innobase/dict/dict0dict.cc
storage/innobase/dict/dict0dict.cc
+1
-1
storage/innobase/dict/dict0load.cc
storage/innobase/dict/dict0load.cc
+6
-19
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+1
-1
storage/innobase/handler/handler0alter.cc
storage/innobase/handler/handler0alter.cc
+1
-1
storage/innobase/include/dict0load.h
storage/innobase/include/dict0load.h
+1
-6
storage/innobase/include/dict0priv.ic
storage/innobase/include/dict0priv.ic
+1
-1
storage/innobase/row/row0mysql.cc
storage/innobase/row/row0mysql.cc
+3
-3
No files found.
storage/innobase/dict/dict0dict.cc
View file @
d874cdec
...
...
@@ -1159,7 +1159,7 @@ dict_table_open_on_name(
table
=
dict_table_check_if_in_cache_low
(
table_name
);
if
(
table
==
NULL
)
{
table
=
dict_load_table
(
table_name
,
true
,
ignore_err
);
table
=
dict_load_table
(
table_name
,
ignore_err
);
}
ut_ad
(
!
table
||
table
->
cached
);
...
...
storage/innobase/dict/dict0load.cc
View file @
d874cdec
...
...
@@ -69,7 +69,6 @@ NULL. These tables must be subsequently loaded so that all the foreign
key constraints are loaded into memory.
@param[in] name Table name in the db/tablename format
@param[in] cached true=add to cache, false=do not
@param[in] ignore_err Error to be ignored when loading table
and its index definition
@param[out] fk_tables Related table names that must also be
...
...
@@ -82,7 +81,6 @@ static
dict_table_t
*
dict_load_table_one
(
const
table_name_t
&
name
,
bool
cached
,
dict_err_ignore_t
ignore_err
,
dict_names_t
&
fk_tables
);
...
...
@@ -2777,17 +2775,12 @@ the cluster definition if the table is a member in a cluster. Also loads
all foreign key constraints where the foreign key is in the table or where
a foreign key references columns in this table.
@param[in] name Table name in the dbname/tablename format
@param[in] cached true=add to cache, false=do not
@param[in] ignore_err Error to be ignored when loading
table and its index definition
@return table, NULL if does not exist; if the table is stored in an
.ibd file, but the file does not exist, then we set the file_unreadable
flag in the table object we return. */
dict_table_t
*
dict_load_table
(
const
char
*
name
,
bool
cached
,
dict_err_ignore_t
ignore_err
)
dict_table_t
*
dict_load_table
(
const
char
*
name
,
dict_err_ignore_t
ignore_err
)
{
dict_names_t
fk_list
;
dict_table_t
*
result
;
...
...
@@ -2802,12 +2795,12 @@ dict_load_table(
if
(
!
result
)
{
result
=
dict_load_table_one
(
const_cast
<
char
*>
(
name
),
cached
,
ignore_err
,
fk_list
);
ignore_err
,
fk_list
);
while
(
!
fk_list
.
empty
())
{
if
(
!
dict_table_check_if_in_cache_low
(
fk_list
.
front
()))
dict_load_table_one
(
const_cast
<
char
*>
(
fk_list
.
front
()),
cached
,
ignore_err
,
fk_list
);
ignore_err
,
fk_list
);
fk_list
.
pop_front
();
}
}
...
...
@@ -2898,7 +2891,6 @@ NULL. These tables must be subsequently loaded so that all the foreign
key constraints are loaded into memory.
@param[in] name Table name in the db/tablename format
@param[in] cached true=add to cache, false=do not
@param[in] ignore_err Error to be ignored when loading table
and its index definition
@param[out] fk_tables Related table names that must also be
...
...
@@ -2911,7 +2903,6 @@ static
dict_table_t
*
dict_load_table_one
(
const
table_name_t
&
name
,
bool
cached
,
dict_err_ignore_t
ignore_err
,
dict_names_t
&
fk_tables
)
{
...
...
@@ -2998,11 +2989,7 @@ dict_load_table_one(
dict_load_virtual
(
table
,
heap
);
if
(
cached
)
{
dict_table_add_to_cache
(
table
,
TRUE
,
heap
);
}
else
{
dict_table_add_system_columns
(
table
,
heap
);
}
dict_table_add_to_cache
(
table
,
TRUE
,
heap
);
mem_heap_empty
(
heap
);
...
...
@@ -3048,7 +3035,7 @@ dict_load_table_one(
of the error condition, since the user may want to dump data from the
clustered index. However we load the foreign key information only if
all indexes were loaded. */
if
(
!
cached
||
!
table
->
is_readable
())
{
if
(
!
table
->
is_readable
())
{
/* Don't attempt to load the indexes from disk. */
}
else
if
(
err
==
DB_SUCCESS
)
{
err
=
dict_load_foreigns
(
table
->
name
.
m_name
,
NULL
,
...
...
@@ -3229,7 +3216,7 @@ dict_load_table_on_id(
/* Load the table definition to memory */
char
*
table_name
=
mem_heap_strdupl
(
heap
,
(
char
*
)
field
,
len
);
table
=
dict_load_table
(
table_name
,
true
,
ignore_err
);
table
=
dict_load_table
(
table_name
,
ignore_err
);
}
}
}
...
...
storage/innobase/handler/ha_innodb.cc
View file @
d874cdec
...
...
@@ -12694,7 +12694,7 @@ int create_table_info_t::create_table(bool create_fk)
DICT_ERR_IGNORE_NONE
,
fk_tables
);
while
(
err
==
DB_SUCCESS
&&
!
fk_tables
.
empty
())
{
dict_load_table
(
fk_tables
.
front
(),
true
,
dict_load_table
(
fk_tables
.
front
(),
DICT_ERR_IGNORE_NONE
);
fk_tables
.
pop_front
();
}
...
...
storage/innobase/handler/handler0alter.cc
View file @
d874cdec
...
...
@@ -7446,7 +7446,7 @@ innobase_update_foreign_cache(
also be loaded. */
while
(
err
==
DB_SUCCESS
&&
!
fk_tables
.
empty
())
{
dict_table_t
*
table
=
dict_load_table
(
fk_tables
.
front
(),
true
,
DICT_ERR_IGNORE_NONE
);
fk_tables
.
front
(),
DICT_ERR_IGNORE_NONE
);
if
(
table
==
NULL
)
{
err
=
DB_TABLE_NOT_FOUND
;
...
...
storage/innobase/include/dict0load.h
View file @
d874cdec
...
...
@@ -110,17 +110,12 @@ the cluster definition if the table is a member in a cluster. Also loads
all foreign key constraints where the foreign key is in the table or where
a foreign key references columns in this table.
@param[in] name Table name in the dbname/tablename format
@param[in] cached true=add to cache, false=do not
@param[in] ignore_err Error to be ignored when loading
table and its index definition
@return table, NULL if does not exist; if the table is stored in an
.ibd file, but the file does not exist, then we set the file_unreadable
flag in the table object we return. */
dict_table_t
*
dict_load_table
(
const
char
*
name
,
bool
cached
,
dict_err_ignore_t
ignore_err
);
dict_table_t
*
dict_load_table
(
const
char
*
name
,
dict_err_ignore_t
ignore_err
);
/***********************************************************************//**
Loads a table object based on the table id.
...
...
storage/innobase/include/dict0priv.ic
View file @
d874cdec
...
...
@@ -55,7 +55,7 @@ dict_table_get_low(
}
if (table == NULL) {
table = dict_load_table(table_name,
true,
DICT_ERR_IGNORE_NONE);
table = dict_load_table(table_name, DICT_ERR_IGNORE_NONE);
}
ut_ad(!table || table->cached);
...
...
storage/innobase/row/row0mysql.cc
View file @
d874cdec
...
...
@@ -2671,7 +2671,7 @@ row_mysql_drop_garbage_tables()
btr_pcur_store_position
(
&
pcur
,
&
mtr
);
btr_pcur_commit_specify_mtr
(
&
pcur
,
&
mtr
);
if
(
dict_load_table
(
table_name
,
true
,
if
(
dict_load_table
(
table_name
,
DICT_ERR_IGNORE_DROP
))
{
row_drop_table_for_mysql
(
table_name
,
trx
,
...
...
@@ -3198,7 +3198,7 @@ row_drop_table_from_cache(
dict_table_remove_from_cache
(
table
);
if
(
dict_load_table
(
tablename
,
true
,
DICT_ERR_IGNORE_FK_NOKEY
))
{
if
(
dict_load_table
(
tablename
,
DICT_ERR_IGNORE_FK_NOKEY
))
{
ib
::
error
()
<<
"Not able to remove table "
<<
ut_get_name
(
trx
,
tablename
)
<<
" from the dictionary cache!"
;
...
...
@@ -4576,7 +4576,7 @@ row_rename_table_for_mysql(
dict_mem_table_fill_foreign_vcol_set
(
table
);
while
(
!
fk_tables
.
empty
())
{
dict_load_table
(
fk_tables
.
front
(),
true
,
dict_load_table
(
fk_tables
.
front
(),
DICT_ERR_IGNORE_NONE
);
fk_tables
.
pop_front
();
}
...
...
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