diff options
author | Michael Widenius <monty@mariadb.org> | 2018-04-11 03:18:03 +0300 |
---|---|---|
committer | Michael Widenius <monty@mariadb.org> | 2018-04-16 20:16:43 +0300 |
commit | 3bae6a2b9886d185509dce0dacc489dda42152aa (patch) | |
tree | 6c02aa5520da92d77620278deec6727a4c940be2 /sql/sql_acl.cc | |
parent | ddc5764303dd72f68d2c69cc574a6f42e8bcf86d (diff) | |
download | mariadb-git-3bae6a2b9886d185509dce0dacc489dda42152aa.tar.gz |
Remove not needed calls to print_error
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r-- | sql/sql_acl.cc | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index ec195f82069..ffc109d7d26 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -9286,11 +9286,8 @@ static int handle_roles_mappings_table(TABLE *table, bool drop, DBUG_PRINT("info", ("Rewriting entry in roles_mapping table: %s@%s", user_from->user.str, user_from->host.str)); table->use_all_columns(); - if ((error= table->file->ha_rnd_init(1))) - { - table->file->print_error(error, MYF(0)); + if (unlikely(error= table->file->ha_rnd_init_with_error(1))) result= -1; - } else { while((error= table->file->ha_rnd_next(table->record[0])) != @@ -9451,11 +9448,8 @@ static int handle_grant_table(THD *thd, const Grant_table_base& grant_table, And their host- and user fields are not consecutive. Thus, we need to do a table scan to find all matching records. */ - if ((error= table->file->ha_rnd_init(1))) - { - table->file->print_error(error, MYF(0)); + if (unlikely(error= table->file->ha_rnd_init_with_error(1))) result= -1; - } else { #ifdef EXTRA_DEBUG |