diff options
author | monty@mysql.com <> | 2004-11-12 11:17:53 +0200 |
---|---|---|
committer | monty@mysql.com <> | 2004-11-12 11:17:53 +0200 |
commit | 9252656d4985a4b35ccef85c127875978ace3990 (patch) | |
tree | 59f4a8722fd9657366da60b4af149031105872ab /sql/sql_acl.cc | |
parent | bfe2917f8978f2a5fcf99ccee294bb919a5eab52 (diff) | |
parent | 2ad7d5c662d785664ac3690240e89ce8d11ed21f (diff) | |
download | mariadb-git-9252656d4985a4b35ccef85c127875978ace3990.tar.gz |
merge with 4.0
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r-- | sql/sql_acl.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 98dde1071c3..9067d01a06d 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -1685,7 +1685,7 @@ static int replace_db_table(TABLE *table, const char *db, goto table_error; /* purecov: deadcode */ } } - else if ((error=table->file->write_row(table->record[0]))) + else if (rights && (error=table->file->write_row(table->record[0]))) { if (error && error != HA_ERR_FOUND_DUPP_KEY) /* purecov: inspected */ goto table_error; /* purecov: deadcode */ @@ -1695,6 +1695,7 @@ static int replace_db_table(TABLE *table, const char *db, if (old_row_exists) acl_update_db(combo.user.str,combo.host.str,db,rights); else + if (rights) acl_insert_db(combo.user.str,combo.host.str,db,rights); DBUG_RETURN(0); |