• unknown's avatar
    Bug#16297 In memory grant tables not flushed when users's hostname is "" · d899c7ff
    unknown authored
     - In function 'handle_grant_struct' when searching the memory structures for an 
       entry to modify, convert all entries here host.hostname is NULL to "" and compare that 
       with the host passed in argument "user_from".
     - A user created with hostname "" is stored in "mysql.user" table as host="" but when loaded into 
       memory it'll be stored as host.hostname NULL. Specifiying "" as hostname means
       that "any host" can connect. Thus is's correct to turn on allow_all_hosts
       when such a user is found. 
     - Review and fix other places where host.hostname may be NULL.
    
    
    mysql-test/init_db.sql:
      Rename: BitKeeper/deleted/.del-init_db.sql~af2dfeabaa348dd7 -> mysql-test/init_db.sql
    mysql-test/r/grant.result:
      Add test cases for users with hostname ""
    mysql-test/t/grant.test:
      Add test cases for users with hostname ""
       - Test create, grant and drop as well as connecting as the user with hostname "".
    sql/sql_acl.cc:
      Convert places where host.hostname is NULL to "" before using it.
    d899c7ff
grant.test 22.2 KB