summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-02-02 10:06:29 +0100
committerSergei Golubchik <sergii@pisem.net>2014-02-02 10:06:29 +0100
commitfa11d613cfbaee23d48cabfb65435d83adee7818 (patch)
treebd90c2e71a319c8366d355c79d33a985130330b6 /sql/sql_parse.cc
parentd929342b0f8d5a85aac4e76486b0ff2aff7ca54f (diff)
downloadmariadb-git-fa11d613cfbaee23d48cabfb65435d83adee7818.tar.gz
MySQL WL#5522 - InnoDB transportable tablespaces.
Cleanups: * remove unused HA_EXTRA_EXPORT (can be added later if needed, e.g. for Aria) * clarify the meaning of HA_CAN_EXPORT * make all engines that support EXPORT to announce it * reduce code duplication
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc15
1 files changed, 3 insertions, 12 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index ec4e873f8ec..221ed09c215 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -4221,25 +4221,16 @@ end_with_restore_list:
if (check_global_access(thd,RELOAD_ACL))
goto error;
- if (first_table && lex->type & REFRESH_READ_LOCK)
+ if (first_table && lex->type & (REFRESH_READ_LOCK|REFRESH_FOR_EXPORT))
{
/* Check table-level privileges. */
if (check_table_access(thd, LOCK_TABLES_ACL | SELECT_ACL, all_tables,
FALSE, UINT_MAX, FALSE))
goto error;
+
if (flush_tables_with_read_lock(thd, all_tables))
goto error;
- my_ok(thd);
- break;
- }
- else if (first_table && lex->type & REFRESH_FOR_EXPORT)
- {
- /* Check table-level privileges. */
- if (check_table_access(thd, LOCK_TABLES_ACL | SELECT_ACL, all_tables,
- FALSE, UINT_MAX, FALSE))
- goto error;
- if (flush_tables_for_export(thd, all_tables))
- goto error;
+
my_ok(thd);
break;
}