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
635f3182
Commit
635f3182
authored
Aug 31, 2007
by
malff/marcsql@weblab.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into weblab.(none):/home/marcsql/TREE/mysql-5.1-30712
parents
143d8e46
88091e82
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
19 deletions
+29
-19
sql/log.cc
sql/log.cc
+8
-2
sql/sql_base.cc
sql/sql_base.cc
+21
-17
No files found.
sql/log.cc
View file @
635f3182
...
...
@@ -656,8 +656,14 @@ int Log_to_csv_event_handler::
table
=
open_performance_schema_table
(
thd
,
&
table_list
,
&
open_tables_backup
);
result
=
(
table
?
0
:
1
);
close_performance_schema_table
(
thd
,
&
open_tables_backup
);
if
(
table
)
{
result
=
0
;
close_performance_schema_table
(
thd
,
&
open_tables_backup
);
}
else
result
=
1
;
DBUG_RETURN
(
result
);
}
...
...
sql/sql_base.cc
View file @
635f3182
...
...
@@ -7747,6 +7747,9 @@ open_performance_schema_table(THD *thd, TABLE_LIST *one_table,
*/
table
->
timestamp_field_type
=
TIMESTAMP_NO_AUTO_SET
;
}
else
thd
->
restore_backup_open_tables_state
(
backup
);
thd
->
utime_after_lock
=
save_utime_after_lock
;
DBUG_RETURN
(
table
);
}
...
...
@@ -7762,24 +7765,25 @@ void close_performance_schema_table(THD *thd, Open_tables_state *backup)
{
bool
found_old_table
;
if
(
thd
->
lock
)
{
/*
Note:
We do not create explicitly a separate transaction for the
performance table I/O, but borrow the current transaction.
lock + unlock will autocommit the change done in the
performance schema table: this is the expected result.
The current transaction should not be affected by this code.
TODO: Note that if a transactional engine is used for log tables,
this code will need to be revised, as a separate transaction
might be needed.
*/
mysql_unlock_tables
(
thd
,
thd
->
lock
);
thd
->
lock
=
0
;
}
/*
If open_performance_schema_table() fails,
this function should not be called.
*/
DBUG_ASSERT
(
thd
->
lock
!=
NULL
);
safe_mutex_assert_not_owner
(
&
LOCK_open
);
/*
Note:
We do not create explicitly a separate transaction for the
performance table I/O, but borrow the current transaction.
lock + unlock will autocommit the change done in the
performance schema table: this is the expected result.
The current transaction should not be affected by this code.
TODO: Note that if a transactional engine is used for log tables,
this code will need to be revised, as a separate transaction
might be needed.
*/
mysql_unlock_tables
(
thd
,
thd
->
lock
);
thd
->
lock
=
0
;
pthread_mutex_lock
(
&
LOCK_open
);
...
...
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