Commit 92367e8b authored by unknown's avatar unknown
Browse files

Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0

into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug3-5.0


sql/sql_parse.cc:
  Auto merged
parents 7e2024b4 38b8687d
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -312,3 +312,12 @@ flush privileges;
drop database mysqltest_1;
set password = password("changed");
ERROR 42000: Access denied for user ''@'localhost' to database 'mysql'
lock table mysql.user write;
 flush privileges;
 grant all on *.* to 'mysqltest_1'@'localhost';
unlock tables;
lock table mysql.user write;
 set password for 'mysqltest_1'@'localhost' = password('');
 revoke all on *.* from 'mysqltest_1'@'localhost';
unlock tables;
drop user 'mysqltest_1'@'localhost';
+43 −0
Original line number Diff line number Diff line
@@ -351,4 +351,47 @@ set password = password("changed");
disconnect n5;
connection default;


# Bug #12423 "Deadlock when doing FLUSH PRIVILEGES and GRANT in 
# multi-threaded environment". We should be able to execute FLUSH
# PRIVILEGES and SET PASSWORD simultaneously with other account
# management commands (such as GRANT and REVOKE) without causing
# deadlocks. To achieve this we should ensure that all account
# management commands take table and internal locks in the same order.
connect (con2root,localhost,root,,);
connect (con3root,localhost,root,,);
# Check that we can execute FLUSH PRIVILEGES and GRANT simultaneously
# This will check that locks are taken in proper order during both
# user/db-level and table/column-level privileges reloading.
connection default;
lock table mysql.user write;
connection con2root;
send flush privileges;
connection con3root;
send grant all on *.* to 'mysqltest_1'@'localhost';
connection default;
unlock tables;
connection con2root;
reap;
connection con3root;
reap;
# Check for simultaneous SET PASSWORD and REVOKE.
connection default;
lock table mysql.user write;
connection con2root;
send set password for 'mysqltest_1'@'localhost' = password('');
connection con3root;
send revoke all on *.* from 'mysqltest_1'@'localhost';
connection default;
unlock tables;
connection con2root;
reap;
connection con3root;
reap;
connection default;
# Clean-up
drop user 'mysqltest_1'@'localhost';
disconnect con2root;
disconnect con3root;

# End of 4.1 tests
+1 −0
Original line number Diff line number Diff line
@@ -127,6 +127,7 @@ SUFFIXES = .sh
	  -e 's!@''innodb_system_libs''@!@innodb_system_libs@!' \
	  -e 's!@''openssl_libs''@!@openssl_libs@!' \
	  -e 's!@''VERSION''@!@VERSION@!' \
	  -e 's!@''MYSQL_BASE_VERSION''@!@MYSQL_BASE_VERSION@!' \
	  -e 's!@''MYSQL_SERVER_SUFFIX''@!@MYSQL_SERVER_SUFFIX@!' \
	  -e 's!@''COMPILATION_COMMENT''@!@COMPILATION_COMMENT@!' \
	  -e 's!@''MACHINE_TYPE''@!@MACHINE_TYPE@!' \
+2 −2
Original line number Diff line number Diff line
@@ -3254,7 +3254,7 @@ we force server id to 2, but this MySQL server will not act as a slave.");
  */
  error_handler_hook= my_message_sql;
  start_signal_handler();				// Creates pidfile
  if (acl_init((THD *)0, opt_noacl) || 
  if (acl_init(opt_noacl) ||
      my_tz_init((THD *)0, default_tz_name, opt_bootstrap))
  {
    abort_loop=1;
@@ -3271,7 +3271,7 @@ we force server id to 2, but this MySQL server will not act as a slave.");
    exit(1);
  }
  if (!opt_noacl)
    (void) grant_init((THD *)0);
    (void) grant_init();

#ifdef HAVE_DLOPEN
  if (!opt_noacl)
+2 −2
Original line number Diff line number Diff line
@@ -244,8 +244,8 @@ sp_eval_func_item(THD *thd, Item **it_addr, enum enum_field_types type,
    }
    DBUG_PRINT("info",("STRING_RESULT: %*s",
                       s->length(), s->c_ptr_quick()));
    CREATE_ON_CALLERS_ARENA(it= new(reuse, &rsize)
                            Item_string(it->collation.collation),
    CHARSET_INFO *itcs= it->collation.collation;
    CREATE_ON_CALLERS_ARENA(it= new(reuse, &rsize) Item_string(itcs),
                            use_callers_arena, &backup_current_arena);
    /*
      We have to use special constructor and allocate string
Loading