diff options
author | unknown <gkodinov/kgeorge@magare.gmz> | 2007-06-19 14:30:03 +0300 |
---|---|---|
committer | unknown <gkodinov/kgeorge@magare.gmz> | 2007-06-19 14:30:03 +0300 |
commit | dc22a429546bef6d14d09a7fe047d180d87d03b3 (patch) | |
tree | ded0a83bb2cbf15940245db223fd48c58a96c926 /sql/sql_acl.cc | |
parent | d616511e0d359cfe2610c32c6ea55199f73381a8 (diff) | |
parent | fe593bf1ab939bf11827d0ab14ebb69387d9358c (diff) | |
download | mariadb-git-dc22a429546bef6d14d09a7fe047d180d87d03b3.tar.gz |
Merge bk-internal:/home/bk/mysql-5.1-opt
into magare.gmz:/home/kgeorge/mysql/autopush/B26418-5.1-opt
sql/sql_acl.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r-- | sql/sql_acl.cc | 45 |
1 files changed, 7 insertions, 38 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 1b57e9363e4..e295b47e525 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -3143,12 +3143,7 @@ bool mysql_table_grant(THD *thd, TABLE_LIST *table_list, if (!result) /* success */ { - if (mysql_bin_log.is_open()) - { - thd->clear_error(); - thd->binlog_query(THD::MYSQL_QUERY_TYPE, - thd->query, thd->query_length, FALSE, FALSE); - } + write_bin_log(thd, TRUE, thd->query, thd->query_length); } rw_unlock(&LOCK_grant); @@ -3315,12 +3310,7 @@ bool mysql_routine_grant(THD *thd, TABLE_LIST *table_list, bool is_proc, pthread_mutex_unlock(&acl_cache->lock); if (!result && !no_error) { - if (mysql_bin_log.is_open()) - { - thd->clear_error(); - thd->binlog_query(THD::MYSQL_QUERY_TYPE, - thd->query, thd->query_length, FALSE, FALSE); - } + write_bin_log(thd, TRUE, thd->query, thd->query_length); } rw_unlock(&LOCK_grant); @@ -3435,12 +3425,7 @@ bool mysql_grant(THD *thd, const char *db, List <LEX_USER> &list, if (!result) { - if (mysql_bin_log.is_open()) - { - thd->clear_error(); - thd->binlog_query(THD::MYSQL_QUERY_TYPE, - thd->query, thd->query_length, FALSE, FALSE); - } + write_bin_log(thd, TRUE, thd->query, thd->query_length); } rw_unlock(&LOCK_grant); @@ -5469,11 +5454,7 @@ bool mysql_create_user(THD *thd, List <LEX_USER> &list) VOID(pthread_mutex_unlock(&acl_cache->lock)); - if (mysql_bin_log.is_open()) - { - thd->binlog_query(THD::MYSQL_QUERY_TYPE, - thd->query, thd->query_length, FALSE, FALSE); - } + write_bin_log(thd, FALSE, thd->query, thd->query_length); rw_unlock(&LOCK_grant); close_thread_tables(thd); @@ -5539,11 +5520,7 @@ bool mysql_drop_user(THD *thd, List <LEX_USER> &list) VOID(pthread_mutex_unlock(&acl_cache->lock)); - if (mysql_bin_log.is_open()) - { - thd->binlog_query(THD::MYSQL_QUERY_TYPE, - thd->query, thd->query_length, FALSE, FALSE); - } + write_bin_log(thd, FALSE, thd->query, thd->query_length); rw_unlock(&LOCK_grant); close_thread_tables(thd); @@ -5622,11 +5599,7 @@ bool mysql_rename_user(THD *thd, List <LEX_USER> &list) VOID(pthread_mutex_unlock(&acl_cache->lock)); - if (mysql_bin_log.is_open()) - { - thd->binlog_query(THD::MYSQL_QUERY_TYPE, - thd->query, thd->query_length, FALSE, FALSE); - } + write_bin_log(thd, FALSE, thd->query, thd->query_length); rw_unlock(&LOCK_grant); close_thread_tables(thd); @@ -5810,11 +5783,7 @@ bool mysql_revoke_all(THD *thd, List <LEX_USER> &list) VOID(pthread_mutex_unlock(&acl_cache->lock)); - if (mysql_bin_log.is_open()) - { - thd->binlog_query(THD::MYSQL_QUERY_TYPE, - thd->query, thd->query_length, FALSE, FALSE); - } + write_bin_log(thd, FALSE, thd->query, thd->query_length); rw_unlock(&LOCK_grant); close_thread_tables(thd); |