Roxen.git / server / etc / modules / DBManager.pmod

version» Context lines:

Roxen.git/server/etc/modules/DBManager.pmod:989:    set_perms_in_db_table (db, "localhost",    indices (write_dbs), autouser, WRITE);    if (sizeof (read_dbs))    set_perms_in_db_table (db, "localhost",    indices (read_dbs), autouser, READ);    if (sizeof (none_dbs))    set_perms_in_db_table (db, "localhost",    indices (none_dbs), autouser, -1);       set_perms_in_user_table(db, "localhost", autouser, -1); +  +  if (normalized_server_version >= "010.002") { +  // NB: set_perms_in_user_table() does not flush the privileges +  // in this case. +  // +  // Flushing is needed to activate the changes done by +  // set_perms_in_db_table() above. +  db->big_query ("FLUSH PRIVILEGES");    } -  +  }       void invalidate_autousers (string db_name)    // Invalidates the autousers that have any access on the given    // database. Invalidates all autousers if db_name is zero.    {    Sql.Sql db = connect_to_my_mysql (0, "mysql");       if (db_name) {    array(string) users = ({});    Sql.sql_result sqlres =