List:Commits« Previous MessageNext Message »
From:msvensson Date:January 9 2006 10:00am
Subject:bk commit into 5.0 tree (msvensson:1.2009)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2009 06/01/09 11:00:33 msvensson@neptunus.(none) +3 -0
  Merge neptunus.(none):/home/msvensson/mysql/bug15598/my41-bug15598
  into  neptunus.(none):/home/msvensson/mysql/bug15598/my50-bug15598

  mysql-test/r/grant.result
    1.47 06/01/09 11:00:30 msvensson@neptunus.(none) +30 -30
    Merge 4.1 to 5.0

  sql/sql_acl.cc
    1.185 06/01/09 10:58:54 msvensson@neptunus.(none) +0 -0
    Auto merged

  mysql-test/t/grant.test
    1.37 06/01/09 10:58:53 msvensson@neptunus.(none) +0 -0
    Auto merged

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	msvensson
# Host:	neptunus.(none)
# Root:	/home/msvensson/mysql/bug15598/my50-bug15598/RESYNC

--- 1.184/sql/sql_acl.cc	2005-12-06 17:04:21 +01:00
+++ 1.185/sql/sql_acl.cc	2006-01-09 10:58:54 +01:00
@@ -1528,7 +1528,8 @@
 	acl_user->user && !strcmp(user,acl_user->user))
     {
       if (exact ? !my_strcasecmp(&my_charset_latin1, host,
-                                 acl_user->host.hostname) :
+                                 acl_user->host.hostname ?
+				 acl_user->host.hostname : "") :
           compare_hostname(&acl_user->host,host,host))
       {
 	DBUG_RETURN(acl_user);
@@ -4623,7 +4624,7 @@
     if (!(user=acl_user->user))
       user= "";
     if (!(host=acl_user->host.hostname))
-      host= "%";
+      host= "";
     if (!strcmp(user_name->user.str,user) &&
 	!my_strcasecmp(system_charset_info, user_name->host.str, host))
       break;

--- 1.46/mysql-test/r/grant.result	2005-11-28 14:06:26 +01:00
+++ 1.47/mysql-test/r/grant.result	2006-01-09 11:00:30 +01:00
@@ -260,29 +260,29 @@
 GRANT SELECT, INSERT, UPDATE ON `test`.* TO 'mysqltest_1'@'localhost'
 drop user mysqltest_1@localhost;
 SET NAMES koi8r;
+CREATE DATABASE ÂÄ;
+USE ÂÄ;
+CREATE TABLE ÔÁÂ (ËÏÌ int);
+GRANT SELECT ON ÂÄ.* TO ÀÚÅÒ@localhost;
+SHOW GRANTS FOR ÀÚÅÒ@localhost;
+Grants for ÀÚÅÒ@localhost
+GRANT USAGE ON *.* TO 'ÀÚÅÒ'@'localhost'
+GRANT SELECT ON `ÂÄ`.* TO 'ÀÚÅÒ'@'localhost'
+REVOKE SELECT ON ÂÄ.* FROM ÀÚÅÒ@localhost;
+GRANT SELECT ON ÂÄ.ÔÁÂ TO ÀÚÅÒ@localhost;
+SHOW GRANTS FOR ÀÚÅÒ@localhost;
+Grants for ÀÚÅÒ@localhost
+GRANT USAGE ON *.* TO 'ÀÚÅÒ'@'localhost'
+GRANT SELECT ON `ÂÄ`.`ÔÁÂ` TO 'ÀÚÅÒ'@'localhost'
+REVOKE SELECT ON ÂÄ.ÔÁÂ FROM ÀÚÅÒ@localhost;
+GRANT SELECT (ËÏÌ) ON ÂÄ.ÔÁÂ TO ÀÚÅÒ@localhost;
+SHOW GRANTS FOR ÀÚÅÒ@localhost;
+Grants for ÀÚÅÒ@localhost
+GRANT USAGE ON *.* TO 'ÀÚÅÒ'@'localhost'
+GRANT SELECT (ËÏÌ) ON `ÂÄ`.`ÔÁÂ` TO 'ÀÚÅÒ'@'localhost'
+REVOKE SELECT (ËÏÌ) ON ÂÄ.ÔÁÂ FROM ÀÚÅÒ@localhost;
+DROP USER ÀÚÅÒ@localhost;
+DROP DATABASE ÂÄ;
 SET NAMES latin1;
 USE test;
 CREATE TABLE t1 (a int );
@@ -437,6 +437,15 @@
 flush privileges;
 drop database mysqltest_1;
 drop database mysqltest_2;
+insert into mysql.user (host, user) values ('', 'mysqltest_7');
+flush privileges;
+set password for mysqltest_7@ = password('systpass');
+show grants for mysqltest_7@;
+Grants for mysqltest_7@
+GRANT USAGE ON *.* TO 'mysqltest_7'@'' IDENTIFIED BY PASSWORD '*2FB071A056F9BB745219D9C876814231DAF46517'
+drop user mysqltest_7@;
+show grants for mysqltest_7@;
+ERROR 42000: There is no such grant defined for user 'mysqltest_7' on host ''
 SHOW PRIVILEGES;
 Privilege	Context	Comment
 Alter	Tables	To alter the table
@@ -595,22 +604,22 @@
 select * from mysql.db where user=@user123;
 Host	Db	User	Select_priv	Insert_priv	Update_priv	Delete_priv	Create_priv	Drop_priv	Grant_priv	References_priv	Index_priv	Alter_priv	Create_tmp_table_priv	Lock_tables_priv	Create_view_priv	Show_view_priv	Create_routine_priv	Alter_routine_priv	Execute_priv
 set names koi8r;
+create database ÂÄ;
+grant select on ÂÄ.* to root@localhost;
+select hex(Db) from mysql.db where Db='ÂÄ';
 hex(Db)
 D0B1D0B4
 show grants for root@localhost;
 Grants for root@localhost
 GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION
+GRANT SELECT ON `ÂÄ`.* TO 'root'@'localhost'
 flush privileges;
 show grants for root@localhost;
 Grants for root@localhost
 GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION
+GRANT SELECT ON `ÂÄ`.* TO 'root'@'localhost'
+drop database ÂÄ;
+revoke all privileges on ÂÄ.* from root@localhost;
 show grants for root@localhost;
 Grants for root@localhost
 GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION

--- 1.36/mysql-test/t/grant.test	2005-11-28 12:28:37 +01:00
+++ 1.37/mysql-test/t/grant.test	2006-01-09 10:58:53 +01:00
@@ -499,4 +499,16 @@
 show grants for root@localhost;
 set names latin1;
 
+#
+# Bug #15598 Server crashes in specific case during setting new password
+# - Caused by a user with host ''
+#
+insert into mysql.user (host, user) values ('', 'mysqltest_7');
+flush privileges;
+set password for mysqltest_7@ = password('systpass');
+show grants for mysqltest_7@;
+drop user mysqltest_7@;
+--error 1141
+show grants for mysqltest_7@;
+
 # End of 4.1 tests
Thread
bk commit into 5.0 tree (msvensson:1.2009)msvensson9 Jan