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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
d71b75c9
Commit
d71b75c9
authored
Apr 09, 2013
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moving LOCK_open into get_table_share()
parent
16388266
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
105 additions
and
96 deletions
+105
-96
sql/sql_admin.cc
sql/sql_admin.cc
+0
-2
sql/sql_base.cc
sql/sql_base.cc
+98
-85
sql/sql_show.cc
sql/sql_show.cc
+3
-4
sql/sql_view.cc
sql/sql_view.cc
+2
-3
sql/table.h
sql/table.h
+2
-2
No files found.
sql/sql_admin.cc
View file @
d71b75c9
...
...
@@ -128,10 +128,8 @@ static int prepare_for_repair(THD *thd, TABLE_LIST *table_list,
has_mdl_lock
=
TRUE
;
hash_value
=
my_calc_hash
(
&
table_def_cache
,
(
uchar
*
)
key
,
key_length
);
mysql_mutex_lock
(
&
LOCK_open
);
share
=
get_table_share
(
thd
,
table_list
,
key
,
key_length
,
FRM_READ_TABLE_ONLY
,
&
not_used
,
hash_value
);
mysql_mutex_unlock
(
&
LOCK_open
);
if
(
share
==
NULL
)
DBUG_RETURN
(
0
);
// Can't open frm file
...
...
sql/sql_base.cc
View file @
d71b75c9
This diff is collapsed.
Click to expand it.
sql/sql_show.cc
View file @
d71b75c9
...
...
@@ -4382,13 +4382,12 @@ static int fill_schema_table_from_frm(THD *thd, TABLE_LIST *tables,
key_length
=
create_table_def_key
(
thd
,
key
,
&
table_list
,
0
);
hash_value
=
my_calc_hash
(
&
table_def_cache
,
(
uchar
*
)
key
,
key_length
);
mysql_mutex_lock
(
&
LOCK_open
);
share
=
get_table_share
(
thd
,
&
table_list
,
key
,
key_length
,
FRM_READ_NO_ERROR_FOR_VIEW
,
&
not_used
,
hash_value
);
if
(
!
share
)
{
res
=
0
;
goto
end
_unlock
;
goto
end
;
}
if
(
share
->
is_view
)
...
...
@@ -4437,10 +4436,10 @@ static int fill_schema_table_from_frm(THD *thd, TABLE_LIST *tables,
free_root
(
&
tbl
.
mem_root
,
MYF
(
0
));
}
end_share:
mysql_mutex_lock
(
&
LOCK_open
);
release_table_share
(
share
);
end_unlock:
mysql_mutex_unlock
(
&
LOCK_open
);
end:
...
...
sql/sql_view.cc
View file @
d71b75c9
...
...
@@ -1707,9 +1707,8 @@ bool mysql_drop_view(THD *thd, TABLE_LIST *views, enum_drop_mode drop_mode)
some_views_deleted
=
TRUE
;
/*
For a view, there is a TABLE_SHARE object, but its
ref_count never goes above 1. Remove it from the table
definition cache, in case the view was cached.
For a view, there is a TABLE_SHARE object.
Remove it from the table definition cache, in case the view was cached.
*/
tdc_remove_table
(
thd
,
TDC_RT_REMOVE_ALL
,
view
->
db
,
view
->
table_name
,
FALSE
);
...
...
sql/table.h
View file @
d71b75c9
...
...
@@ -2188,9 +2188,9 @@ private:
#else
inline
void
set_check_merged
()
{}
#endif
/** See comments for set_
metadata
_id() */
/** See comments for set_
table_ref
_id() */
enum
enum_table_ref_type
m_table_ref_type
;
/** See comments for set_
metadata
_id() */
/** See comments for set_
table_ref
_id() */
ulong
m_table_ref_version
;
};
...
...
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