summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc15
1 files changed, 11 insertions, 4 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 6307564c14f..10e6716cadf 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -6563,10 +6563,7 @@ insert_fields(THD *thd, Name_resolution_context *context, const char *db_name,
!any_privileges)
{
field_iterator.set(tables);
- if (check_grant_all_columns(thd, SELECT_ACL, field_iterator.grant(),
- field_iterator.db_name(),
- field_iterator.table_name(),
- &field_iterator))
+ if (check_grant_all_columns(thd, SELECT_ACL, &field_iterator))
DBUG_RETURN(TRUE);
}
#endif
@@ -7758,7 +7755,17 @@ open_performance_schema_table(THD *thd, TABLE_LIST *one_table,
table->timestamp_field_type= TIMESTAMP_NO_AUTO_SET;
}
else
+ {
+ /*
+ If error in mysql_lock_tables(), open_ltable doesn't close the
+ table. Thread kill during mysql_lock_tables() is such error. But
+ open tables cannot be accepted when restoring the open tables
+ state.
+ */
+ if (thd->killed)
+ close_thread_tables(thd);
thd->restore_backup_open_tables_state(backup);
+ }
thd->utime_after_lock= save_utime_after_lock;
DBUG_RETURN(table);