summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2019-04-26 14:02:37 +0200
committerSergei Golubchik <serg@mariadb.org>2019-04-26 14:02:37 +0200
commit2ce52790ffc72c4a4d3670ebf67c6655450620f2 (patch)
tree4be382f34905809f0a19e87574e2b07b91f5cb7c /sql/sql_acl.cc
parentcaa9023c9ed101acbcf6b9bd821a09daeb8271ee (diff)
parent757daa4174ed1b8786d0307852f79885dd08ea89 (diff)
downloadmariadb-git-2ce52790ffc72c4a4d3670ebf67c6655450620f2.tar.gz
Merge branch '5.5' into 10.1
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r--sql/sql_acl.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index c2e5bfd8c11..83526532bdd 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -1271,6 +1271,13 @@ static bool acl_load(THD *thd, TABLE_LIST *tables)
goto end;
table->use_all_columns();
+ if (table->s->fields < 13) // number of columns in 3.21
+ {
+ sql_print_error("Fatal error: mysql.user table is damaged or in "
+ "unsupported 3.20 format.");
+ goto end;
+ }
+
username_char_length= MY_MIN(table->field[1]->char_length(),
USERNAME_CHAR_LENGTH);
password_length= table->field[2]->field_length /
@@ -8550,8 +8557,7 @@ static int open_grant_tables(THD *thd, TABLE_LIST *tables,
acl_table_names[cur].length,
acl_table_names[cur].str, lock_type);
tables[cur].open_type= OT_BASE_ONLY;
- if (lock_type >= TL_WRITE_ALLOW_WRITE)
- tables[cur].updating= 1;
+ tables[cur].i_s_requested_object= OPEN_TABLE_ONLY;
if (cur >= FIRST_OPTIONAL_TABLE)
tables[cur].open_strategy= TABLE_LIST::OPEN_IF_EXISTS;
if (prev != -1)