Commit 78242066 authored by unknown's avatar unknown

- Applying Sinisa's Patch "Fixing the error messages returned on

   GRANT commands"
parent 798f4468
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
"Host '%-.64s' is not allowed to connect to this MySQL server", "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 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", "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", "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", "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", "Column count doesn't match value count at row %ld",
......
...@@ -1203,7 +1203,8 @@ static bool update_user_table(THD *thd, const char *host, const char *user, ...@@ -1203,7 +1203,8 @@ static bool update_user_table(THD *thd, const char *host, const char *user,
(byte*) table->field[0]->ptr,0, (byte*) table->field[0]->ptr,0,
HA_READ_KEY_EXACT)) 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 */ DBUG_RETURN(1); /* purecov: deadcode */
} }
store_record(table,1); store_record(table,1);
...@@ -1445,7 +1446,8 @@ static int replace_db_table(TABLE *table, const char *db, ...@@ -1445,7 +1446,8 @@ static int replace_db_table(TABLE *table, const char *db,
// is there such a user in user table in memory ???? // is there such a user in user table in memory ????
if (!initialized || !find_acl_user(combo.host.str,combo.user.str)) 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); DBUG_RETURN(-1);
} }
...@@ -1888,6 +1890,8 @@ static int replace_table_table(THD *thd, GRANT_TABLE *grant_table, ...@@ -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)) if (!find_acl_user(combo.host.str,combo.user.str))
{ {
my_error(ER_PASSWORD_NO_MATCH,MYF(0)); /* purecov: deadcode */ 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 */ DBUG_RETURN(-1); /* purecov: deadcode */
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment