1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fix for a bug in SHOW GRANTS when :

grant on database.* to xx@yy with grant option;

is done.



sql/item.cc:
  fix for update of non-null column with function returning NULL
This commit is contained in:
unknown
2003-01-11 18:02:10 +02:00
parent 8a0a97f022
commit ca8498e89d
4 changed files with 11 additions and 1 deletions

View File

@ -64,3 +64,8 @@ GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, CREATE TE
revoke all privileges on mysqltest.* from mysqltest_1@localhost; revoke all privileges on mysqltest.* from mysqltest_1@localhost;
delete from mysql.user where user='mysqltest_1'; delete from mysql.user where user='mysqltest_1';
flush privileges; flush privileges;
grant usage on test.* to user@localhost with grant option;
show grants for user@localhost;
Grants for user@localhost
GRANT USAGE ON *.* TO 'user'@'localhost'
GRANT USAGE ON `test`.* TO 'user'@'localhost' WITH GRANT OPTION

View File

@ -39,3 +39,6 @@ show grants for mysqltest_1@localhost;
revoke all privileges on mysqltest.* from mysqltest_1@localhost; revoke all privileges on mysqltest.* from mysqltest_1@localhost;
delete from mysql.user where user='mysqltest_1'; delete from mysql.user where user='mysqltest_1';
flush privileges; flush privileges;
grant usage on test.* to user@localhost with grant option;
show grants for user@localhost;

View File

@ -505,7 +505,7 @@ bool Item::save_in_field(Field *field, bool no_conversions)
{ {
double nr=val(); double nr=val();
if (null_value) if (null_value)
return set_field_to_null(field); return set_field_to_null_with_conversions(field, no_conversions);
field->set_notnull(); field->set_notnull();
field->store(nr); field->store(nr);
} }

View File

@ -2894,6 +2894,8 @@ int mysql_show_grants(THD *thd,LEX_USER *lex_user)
if (test_all_bits(want_access,(DB_ACLS & ~GRANT_ACL))) if (test_all_bits(want_access,(DB_ACLS & ~GRANT_ACL)))
db.append("ALL PRIVILEGES",14); db.append("ALL PRIVILEGES",14);
else if (!(want_access & ~GRANT_ACL))
db.append("USAGE",5);
else else
{ {
int found=0, cnt; int found=0, cnt;