summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlenz@mysql.com <>2003-02-19 14:50:40 +0100
committerlenz@mysql.com <>2003-02-19 14:50:40 +0100
commit64b204891420fdb754cd77ca7c5a57fcc337d63a (patch)
tree31c07af97af9aaa98a369625bbcda280ef5dbded
parentdc5bca35bbcc887df1f2c573089529b89d540f33 (diff)
downloadmariadb-git-64b204891420fdb754cd77ca7c5a57fcc337d63a.tar.gz
- Applying Sinisa's Patch "Fixing the error messages returned on
GRANT commands"
-rw-r--r--sql/share/english/errmsg.txt2
-rw-r--r--sql/sql_acl.cc8
2 files changed, 7 insertions, 3 deletions
diff --git a/sql/share/english/errmsg.txt b/sql/share/english/errmsg.txt
index a11be9b0e7f..23b25e37ade 100644
--- a/sql/share/english/errmsg.txt
+++ b/sql/share/english/errmsg.txt
@@ -134,7 +134,7 @@
"Host '%-.64s' is not allowed to connect to this MySQL server",
"You are using MySQL as an anonymous users and anonymous users are not allowed to change passwords",
"You must have privileges to update tables in the mysql database to be able to change passwords for others",
-"Can't find any matching row in the user table",
+"Password string is of inadequate length",
"Rows matched: %ld Changed: %ld Warnings: %ld",
"Can't create a new thread (errno %d). If you are not out of available memory, you can consult the manual for a possible OS-dependent bug",
"Column count doesn't match value count at row %ld",
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index ee9d3f1c1ea..92db643e8dc 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -1203,7 +1203,8 @@ static bool update_user_table(THD *thd, const char *host, const char *user,
(byte*) table->field[0]->ptr,0,
HA_READ_KEY_EXACT))
{
- my_error(ER_PASSWORD_NO_MATCH,MYF(0)); /* purecov: deadcode */
+ my_printf_error(ER_NONEXISTING_GRANT,ER(ER_NONEXISTING_GRANT),
+ MYF(0),user,host);
DBUG_RETURN(1); /* purecov: deadcode */
}
store_record(table,1);
@@ -1445,7 +1446,8 @@ static int replace_db_table(TABLE *table, const char *db,
// is there such a user in user table in memory ????
if (!initialized || !find_acl_user(combo.host.str,combo.user.str))
{
- my_error(ER_PASSWORD_NO_MATCH,MYF(0));
+ my_printf_error(ER_NONEXISTING_GRANT,ER(ER_NONEXISTING_GRANT),MYF(0),
+ combo.user.str,combo.host.str);
DBUG_RETURN(-1);
}
@@ -1888,6 +1890,8 @@ static int replace_table_table(THD *thd, GRANT_TABLE *grant_table,
if (!find_acl_user(combo.host.str,combo.user.str))
{
my_error(ER_PASSWORD_NO_MATCH,MYF(0)); /* purecov: deadcode */
+ my_printf_error(ER_NONEXISTING_GRANT,ER(ER_NONEXISTING_GRANT),MYF(0),
+ combo.user.str,combo.host.str);
DBUG_RETURN(-1); /* purecov: deadcode */
}