List:Commits« Previous MessageNext Message »
From:msvensson Date:February 26 2007 11:03am
Subject:bk commit into 5.1 tree (msvensson:1.2446)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 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@stripped, 2007-02-26 12:03:13+01:00, msvensson@stripped +22 -0
  Merge pilot.blaudden:/home/msvensson/mysql/bug20166/my50-bug20166
  into  pilot.blaudden:/home/msvensson/mysql/bug20166/my51-bug20166
  MERGE: 1.1810.2372.105

  BitKeeper/deleted/.del-init_db.sql~a77d572c39d5a1f8@stripped, 2007-02-26 11:49:55+01:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.14.1.1

  BitKeeper/deleted/.del-init_db.sql~a77d572c39d5a1f8@stripped, 2007-02-26 11:49:55+01:00, msvensson@stripped +0 -0
    Merge rename: mysql-test/lib/init_db.sql -> BitKeeper/deleted/.del-init_db.sql~a77d572c39d5a1f8

  BitKeeper/deleted/.del-init_db.sql~af2dfeabaa348dd7@stripped, 2007-02-26 11:50:53+01:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.4.1.2

  BitKeeper/deleted/.del-init_db.sql~af2dfeabaa348dd7@stripped, 2007-02-26 11:50:53+01:00, msvensson@stripped +0 -0
    Merge rename: BitKeeper/deleted/.del-init_db.sql -> BitKeeper/deleted/.del-init_db.sql~af2dfeabaa348dd7

  BitKeeper/deleted/.del-mysql_create_system_tables.sh@stripped, 2007-02-26 11:49:55+01:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.12.1.19

  BitKeeper/deleted/.del-mysql_create_system_tables.sh@stripped, 2007-02-26 11:49:55+01:00, msvensson@stripped +0 -0
    Merge rename: scripts/mysql_create_system_tables.sh -> BitKeeper/deleted/.del-mysql_create_system_tables.sh

  BitKeeper/etc/ignore@stripped, 2007-02-26 11:49:49+01:00, msvensson@stripped +1 -1
    auto-union
    MERGE: 1.210.1.32

  mysql-test/Makefile.am@stripped, 2007-02-26 12:03:12+01:00, msvensson@stripped +0 -0
    Manual merge
    MERGE: 1.66.1.20

  mysql-test/mysql-test-run.pl@stripped, 2007-02-26 11:49:55+01:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.30.49.57

  mysql-test/r/create.result@stripped, 2007-02-26 11:49:55+01:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.107.1.17

  mysql-test/r/join.result@stripped, 2007-02-26 11:49:55+01:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.38.1.3

  mysql-test/r/mysql_upgrade.result@stripped, 2007-02-26 11:51:35+01:00, msvensson@stripped +0 -0
    SCCS merged
    MERGE: 1.1.1.1

  mysql-test/r/sp-security.result@stripped, 2007-02-26 11:49:55+01:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.25.1.7

  mysql-test/t/create.test@stripped, 2007-02-26 11:49:55+01:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.71.1.13

  mysql-test/t/grant2.test@stripped, 2007-02-26 11:49:55+01:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.31.2.7

  mysql-test/t/init_connect.test@stripped, 2007-02-26 11:49:55+01:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.5.1.4

  mysql-test/t/lock_multi.test@stripped, 2007-02-26 11:53:48+01:00, msvensson@stripped +0 -6
    Use local 5.1
    MERGE: 1.13.1.9

  mysql-test/t/ndb_basic.test@stripped, 2007-02-26 11:49:55+01:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.32.1.6

  mysql-test/t/ndb_index_ordered.test@stripped, 2007-02-26 11:49:55+01:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.25.1.3

  mysql-test/t/ndb_multi.test@stripped, 2007-02-26 11:49:55+01:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.5.1.6

  mysql-test/t/rpl_temporary.test@stripped, 2007-02-26 12:03:12+01:00, msvensson@stripped +3 -3
    Manual merge
    MERGE: 1.15.1.8

  scripts/Makefile.am@stripped, 2007-02-26 11:49:55+01:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.43.1.13

  scripts/mysql_fix_privilege_tables.sh@stripped, 2007-02-26 12:03:12+01:00, msvensson@stripped +0 -1
    Manual merge
    MERGE: 1.35.1.3

  scripts/mysql_fix_privilege_tables.sql.in@stripped, 2007-02-26 12:03:12+01:00, msvensson@stripped +1 -552
    Manual merge
    MERGE: 1.9.1.32

  scripts/mysql_fix_privilege_tables.sql.in@stripped, 2007-02-26 11:49:55+01:00, msvensson@stripped +0 -0
    Merge rename: scripts/mysql_fix_privilege_tables.sql -> scripts/mysql_fix_privilege_tables.sql.in

  scripts/mysql_install_db.sh@stripped, 2007-02-26 12:03:12+01:00, msvensson@stripped +2 -1
    Manual merge
    MERGE: 1.64.1.6

# 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:	pilot.blaudden
# Root:	/home/msvensson/mysql/bug20166/my51-bug20166/RESYNC

--- 1.61/scripts/Makefile.am	2006-12-31 01:06:33 +01:00
+++ 1.62/scripts/Makefile.am	2007-02-26 11:49:55 +01:00
@@ -29,8 +29,7 @@ bin_SCRIPTS =		@server_scripts@ \
 			mysql_find_rows \
 			mysqlhotcopy \
 			mysqldumpslow \
-			mysqld_multi \
-			mysql_create_system_tables
+			mysqld_multi
 
 noinst_SCRIPTS =	make_binary_distribution \
 			make_sharedlib_distribution
@@ -52,15 +51,18 @@ EXTRA_SCRIPTS =		make_binary_distributio
 			mysqlhotcopy.sh \
 			mysqldumpslow.sh \
 			mysqld_multi.sh \
-			mysqld_safe.sh \
-			mysql_create_system_tables.sh
+			mysqld_safe.sh
 
 EXTRA_DIST =		$(EXTRA_SCRIPTS) \
 			mysqlaccess.conf \
 			mysqlbug \
-			make_win_bin_dist
+			make_win_bin_dist \
+			mysql_fix_privilege_tables.sql.in
 
-dist_pkgdata_DATA =		fill_help_tables.sql mysql_fix_privilege_tables.sql
+dist_pkgdata_DATA =	fill_help_tables.sql \
+			mysql_fix_privilege_tables.sql \
+			mysql_system_tables.sql \
+			mysql_test_data_timezone.sql
 
 # mysqlbug should be distributed built so that people can report build
 # failures with it.
@@ -87,6 +89,14 @@ DISTCLEANFILES =        mysqlbug
 
 # We want the right version and configure comand line in mysqlbug
 mysqlbug: ${top_builddir}/config.status mysqlbug.sh
+
+# Build mysql_fix_privilege_tables.sql from the files that contain
+# the system tables for this version of MySQL plus any commands
+# needed to upgrade the system tables from an older version
+mysql_fix_privilege_tables.sql: mysql_fix_privilege_tables.sql.in \
+				mysql_system_tables.sql
+	@echo "Building $@";
+	@cat mysql_system_tables.sql $@.in > $@
 
 SUFFIXES = .sh
 

--- 1.38/scripts/mysql_fix_privilege_tables.sh	2006-12-31 01:06:33 +01:00
+++ 1.39/scripts/mysql_fix_privilege_tables.sh	2007-02-26 12:03:12 +01:00
@@ -175,7 +175,7 @@ s_echo()
 }
 
 s_echo "This script updates all the mysql privilege tables to be usable by"
-s_echo "MySQL 5.1 and above."
+s_echo "the current version of MySQL"
 s_echo ""
 
 if test $verbose = 1

--- 1.71/scripts/mysql_install_db.sh	2007-01-11 23:05:07 +01:00
+++ 1.72/scripts/mysql_install_db.sh	2007-02-26 12:03:12 +01:00
@@ -14,8 +14,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-# This scripts creates the privilege tables db, host, user, tables_priv,
-# columns_priv, procs_priv in the mysql database, as well as the func table.
+# This scripts creates the MySQL Server system tables
 #
 # All unrecognized arguments to this script are passed to mysqld.
 
@@ -30,6 +29,14 @@ case "$1" in
       ;;
 esac
 
+s_echo()
+{
+  if test "$in_rpm" -eq 0 -a "$windows" -eq 0
+  then
+    echo $1
+  fi
+}
+
 parse_arguments() {
   # We only need to pass arguments through to the server if we don't
   # handle them here.  So, we collect unrecognized options (passed on
@@ -53,9 +60,20 @@ parse_arguments() {
         # where a chown of datadir won't help)
 	 user=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
       --skip-name-resolve) ip_only=1 ;;
-      --verbose) verbose=1 ;;
+      --verbose) verbose=1 ;; # Obsolete
       --rpm) in_rpm=1 ;;
-      --windows) windows=1 ;;
+
+      --windows)
+	# This is actually a "cross bootstrap" argument used when
+        # building the MySQL system tables on a different host
+        # than the target. The platform independent
+        # files that are created in --datadir on the host can
+        # be copied to the target system, the most common use for
+        # this feature is in the windows installer which will take
+        # the files from datadir and include them as part of the install
+        # package.
+         windows=1 ;;
+
       *)
         if test -n "$pick_args"
         then
@@ -93,8 +111,6 @@ bindir=
 basedir=
 srcdir=
 force=0
-verbose=0
-fill_help_tables=""
 
 parse_arguments `$print_defaults $defaults mysqld mysql_install_db`
 parse_arguments PICK-ARGS-FROM-ARGV "$@"
@@ -119,29 +135,42 @@ else
   fi
 fi
 
-# find fill_help_tables.sh
+# Find SQL scripts needed for bootstrap
+fill_help_tables="fill_help_tables.sql"
+create_system_tables="mysql_system_tables.sql"
 if test -n "$srcdir"
 then
-  fill_help_tables=$srcdir/scripts/fill_help_tables.sql
+  fill_help_tables=$srcdir/scripts/$fill_help_tables
+  create_system_tables=$srcdir/scripts/$create_system_tables
 else
   for i in $basedir/support-files $basedir/share $basedir/share/mysql \
            $basedir/scripts `pwd` `pwd`/scripts @pkgdatadir@
   do
-    if test -f $i/fill_help_tables.sql
+    if test -f $i/$fill_help_tables
     then
       pkgdatadir=$i
     fi
   done
 
-  fill_help_tables=$pkgdatadir/fill_help_tables.sql
+  fill_help_tables=$pkgdatadir/$fill_help_tables
+  create_system_tables=$pkgdatadir/$create_system_tables
+fi
+
+if test ! -f $create_system_tables
+then
+  echo "FATAL ERROR: Could not find SQL file '$create_system_tables' in"
+  echo "@pkgdatadir@ or inside $basedir"
+  exit 1;
 fi
 
 if test ! -f $fill_help_tables
 then
-  echo "Could not find help file 'fill_help_tables.sql' in @pkgdatadir@ or inside $basedir".
+  echo "FATAL ERROR: Could not find help file '$fill_help_tables' in"
+  echo "@pkgdatadir@ or inside $basedir"
   exit 1;
 fi
 
+# Find executables and paths
 mdata=$ldata/mysql
 mysqld=$execdir/mysqld
 mysqld_opt=""
@@ -167,7 +196,7 @@ then
     echo "FATAL ERROR $mysqld not found!"
     exit 1
   else
-    echo "Didn't find $mysqld"
+    echo "FATAL ERROR Didn't find $mysqld"
     echo "You should do a 'make install' before executing this script"
     exit 1
   fi
@@ -187,9 +216,10 @@ then
     then
       echo "Neither host '$hostname' nor 'localhost' could be looked up with"
       echo "$bindir/resolveip"
-      echo "Please configure the 'hostname' command to return a correct hostname."
-      echo "If you want to solve this at a later stage, restart this script with"
-      echo "the --force option"
+      echo "Please configure the 'hostname' command to return a correct"
+      echo "hostname."
+      echo "If you want to solve this at a later stage, restart this script"
+      echo "with the --force option"
       exit 1
     fi
     echo "WARNING: The host '$hostname' could not be looked up with resolveip."
@@ -208,101 +238,113 @@ then
 fi
 
 # Create database directories mysql & test
-
-  if test ! -d $ldata; then mkdir $ldata; chmod 700 $ldata ; fi
-  if test ! -d $ldata/mysql; then mkdir $ldata/mysql;  chmod 700 $ldata/mysql ; fi
-  if test ! -d $ldata/test; then mkdir $ldata/test;  chmod 700 $ldata/test ; fi
-  if test -w / -a ! -z "$user"; then
-    chown $user $ldata $ldata/mysql $ldata/test;
-  fi
-
-if test ! -f $mdata/db.frm
-then
-  c_d="yes"
+if test ! -d $ldata; then
+  mkdir $ldata;
+  chmod 700 $ldata ;
+fi
+if test ! -d $ldata/mysql; then
+  mkdir $ldata/mysql;
+  chmod 700 $ldata/mysql ;
+fi
+if test ! -d $ldata/test; then
+  mkdir $ldata/test;
+  chmod 700 $ldata/test ;
+fi
+if test -w / -a ! -z "$user"; then
+  chown $user $ldata $ldata/mysql $ldata/test;
 fi
 
-if test $verbose = 1
+# Check is "db" table already exist
+if test ! -f $mdata/db.frm
 then
-  create_option="verbose"
-else
-  create_option="real"
+  db_table_already_exist="yes"
 fi
 
 if test -n "$user"; then
   args="$args --user=$user"
 fi
 
-if test "$in_rpm" -eq 0 -a "$windows" -eq 0
-then
-  echo "Installing all prepared tables"
-fi
+# Peform the install of system tables
 mysqld_bootstrap="${MYSQLD_BOOTSTRAP-$mysqld}"
 mysqld_install_cmd_line="$mysqld_bootstrap $defaults $mysqld_opt --bootstrap \
---skip-grant-tables --basedir=$basedir --datadir=$ldata --skip-innodb \
---skip-ndbcluster $args --max_allowed_packet=8M --net_buffer_length=16K"
-if $scriptdir/mysql_create_system_tables $create_option $mdata $hostname $windows \
-   | eval "$mysqld_install_cmd_line" 
+--basedir=$basedir --datadir=$ldata --skip-innodb \
+--skip-ndbcluster $args --max_allowed_packet=8M \
+--net_buffer_length=16K"
+
+# Pipe mysql_system_tables.sql to "mysqld --bootstrap"
+s_echo "Installing MySQL system tables..."
+if `(echo "use mysql;"; cat $create_system_tables) | $mysqld_install_cmd_line`
 then
+  s_echo "OK"
+
   if test -n "$fill_help_tables"
   then
-    if test "$in_rpm" -eq 0 -a "$windows" -eq 0
-    then
-      echo "Fill help tables"
-    fi
-    (echo "use mysql;"; cat $fill_help_tables) | eval "$mysqld_install_cmd_line"
-    res=$?
-    if test $res != 0
+    s_echo "Filling help tables..."
+    # Pipe fill_help_tables.sql to "mysqld --bootstrap"
+    if `(echo "use mysql;"; cat $fill_help_tables) | $mysqld_install_cmd_line`
     then
+      # Fill suceeded
+      s_echo "OK"
+    else
       echo ""
       echo "WARNING: HELP FILES ARE NOT COMPLETELY INSTALLED!"
       echo "The \"HELP\" command might not work properly"
       echo ""
     fi
   fi
-  if test "$in_rpm" = 0 -a "$windows" = 0
-  then
-    echo ""
-    echo "To start mysqld at boot time you have to copy support-files/mysql.server"
-    echo "to the right place for your system"
-    echo
-  fi
+
+  s_echo ""
+  s_echo "To start mysqld at boot time you have to copy"
+  s_echo "support-files/mysql.server to the right place for your system"
+  s_echo
+
   if test "$windows" -eq 0
   then
-  echo "PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !"
-  echo "To do so, start the server, then issue the following commands:"
-  echo "$bindir/mysqladmin -u root password 'new-password'"
-  echo "$bindir/mysqladmin -u root -h $hostname password 'new-password'"
-  echo "See the manual for more instructions."
-  #
-  # Print message about upgrading unless we have created a new db table.
-  if test -z "$c_d"
-  then
+    # A root password should of course also be set on Windows!
+    # The reason for not displaying these prompts here is that when
+    # executing this script with the --windows argument the script
+    # is used to generate system tables mainly used by the
+    # windows installer. And thus the password should not be set until
+    # those files has been copied to the target system
+    echo "PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !"
+    echo "To do so, start the server, then issue the following commands:"
+    echo "$bindir/mysqladmin -u root password 'new-password'"
+    echo "$bindir/mysqladmin -u root -h $hostname password 'new-password'"
+    echo "See the manual for more instructions."
+
+    # Print message about upgrading unless we have created a new db table.
+    if test -z "$db_table_already_exist"
+    then
+      echo
+      echo "NOTE: If you are upgrading from a previous MySQL verision you "
+      echo "should run '$bindir/mysql_upgrade', to make sure all tables have "
+     echo "been upgraded for this version of MySQL"
+    fi
     echo
-    echo "NOTE:  If you are upgrading from a MySQL <= 3.22.10 you should run"
-    echo "the $bindir/mysql_fix_privilege_tables. Otherwise you will not be"
-    echo "able to use the new GRANT command!"
-  fi
-  echo
-  if test "$in_rpm" = "0"
-  then
-    echo "You can start the MySQL daemon with:"
-    echo "cd @prefix@ ; $bindir/mysqld_safe &"
+
+    if test "$in_rpm" = "0"
+    then
+      echo "You can start the MySQL daemon with:"
+      echo "cd @prefix@ ; $bindir/mysqld_safe &"
+      echo
+      echo "You can test the MySQL daemon with mysql-test-run.pl"
+      echo "cd mysql-test ; perl mysql-test-run.pl"
+      echo
+    fi
+    echo "Please report any problems with the @scriptdir@/mysqlbug script!"
     echo
-  fi
-  echo "Please report any problems with the @scriptdir@/mysqlbug script!"
-  echo
-  echo "The latest information about MySQL is available on the web at"
-  echo "http://www.mysql.com"
-  echo "Support MySQL by buying support/licenses at http://shop.mysql.com"
+    echo "The latest information about MySQL is available on the web at"
+    echo "http://www.mysql.com"
+    echo "Support MySQL by buying support/licenses at http://shop.mysql.com"
   fi
   exit 0
 else
   echo "Installation of system tables failed!"
   echo
   echo "Examine the logs in $ldata for more information."
-  echo "You can also try to start the mysqld daemon with:"
+  echo "You can try to start the mysqld daemon with:"
   echo "$mysqld --skip-grant &"
-  echo "You can use the command line tool"
+  echo "and use the command line tool"
   echo "$bindir/mysql to connect to the mysql"
   echo "database and look at the grant tables:"
   echo

--- 1.9/mysql-test/t/init_connect.test	2006-11-15 10:26:56 +01:00
+++ 1.10/mysql-test/t/init_connect.test	2007-02-26 11:49:55 +01:00
@@ -2,6 +2,8 @@
 # Test of init_connect variable
 #
 
+--source include/add_anonymous_users.inc
+
 # should work with embedded server after mysqltest is fixed
 -- source include/not_embedded.inc
 connect (con0,localhost,root,,);
@@ -40,6 +42,8 @@ disconnect con2;
 disconnect con3;
 disconnect con4;
 disconnect con5;
+
+--source include/delete_anonymous_users.inc
 
 --echo End of 4.1 tests
 #

--- 1.274/mysql-test/mysql-test-run.pl	2007-02-20 12:48:54 +01:00
+++ 1.275/mysql-test/mysql-test-run.pl	2007-02-26 11:49:55 +01:00
@@ -300,6 +300,8 @@ our $path_ndb_examples_dir;
 our $exe_ndb_example;
 our $path_ndb_testrun_log;
 
+our $path_sql_dir;
+
 our @data_dir_lst;
 
 our $used_binlog_format;
@@ -1498,12 +1500,16 @@ sub executable_setup () {
     $exe_mysql_fix_system_tables=
       mtr_script_exists("$glob_basedir/scripts/mysql_fix_privilege_tables",
 			"$path_client_bindir/mysql_fix_privilege_tables");
+
   }
 
+  # Look for SQL scripts directory
+  $path_sql_dir= mtr_path_exists("$glob_basedir/share",
+				 "$glob_basedir/scripts");
+
   # Look for mysql_fix_privilege_tables.sql script
   $file_mysql_fix_privilege_tables=
-    mtr_file_exists("$glob_basedir/scripts/mysql_fix_privilege_tables.sql",
-		    "$glob_basedir/share/mysql_fix_privilege_tables.sql");
+    mtr_file_exists("$path_sql_dir/mysql_fix_privilege_tables.sql");
 
   if ( ! $opt_skip_ndbcluster and executable_setup_ndb())
   {
@@ -1954,6 +1960,7 @@ sub environment_setup () {
       "--port=$master->[0]->{'port'} " .
       "--socket=$master->[0]->{'path_sock'}";
     $ENV{'MYSQL_FIX_SYSTEM_TABLES'}=  $cmdline_mysql_fix_system_tables;
+
   }
   $ENV{'MYSQL_FIX_PRIVILEGE_TABLES'}=  $file_mysql_fix_privilege_tables;
 
@@ -2871,38 +2878,11 @@ sub install_db ($$) {
   my $type=      shift;
   my $data_dir=  shift;
 
-  my $init_db_sql=     "lib/init_db.sql";
-  my $init_db_sql_tmp= "/tmp/init_db.sql$$";
-  my $args;
-
   mtr_report("Installing \u$type Database");
 
-  open(IN, $init_db_sql)
-    or mtr_error("Can't open $init_db_sql: $!");
-  open(OUT, ">", $init_db_sql_tmp)
-    or mtr_error("Can't write to $init_db_sql_tmp: $!");
-  while (<IN>)
-  {
-    chomp;
-    s/\@HOSTNAME\@/$glob_hostname/;
-    if ( /^\s*$/ )
-    {
-      print OUT "\n";
-    }
-    elsif (/;$/)
-    {
-      print OUT "$_\n";
-    }
-    else
-    {
-      print OUT "$_ ";
-    }
-  }
-  close OUT;
-  close IN;
 
+  my $args;
   mtr_init_args(\$args);
-
   mtr_add_arg($args, "--no-defaults");
   mtr_add_arg($args, "--bootstrap");
   mtr_add_arg($args, "--basedir=%s", $path_my_basedir);
@@ -2936,21 +2916,44 @@ sub install_db ($$) {
   # ----------------------------------------------------------------------
   $ENV{'MYSQLD_BOOTSTRAP_CMD'}= "$exe_mysqld_bootstrap " . join(" ", @$args);
 
+  # ----------------------------------------------------------------------
+  # Create the bootstrap.sql file
+  # ----------------------------------------------------------------------
+  my $bootstrap_sql_file= "$opt_vardir/tmp/bootstrap.sql$$";
+
+  # Use the mysql database for system tables
+  mtr_tofile($bootstrap_sql_file, "use mysql");
+
+  # Add the offical mysql system tables and initial system data
+  # for a prodcuction system
+  mtr_appendfile_to_file("$path_sql_dir/mysql_system_tables.sql",
+			 $bootstrap_sql_file);
+
+  # Add test data for timezone - this is just a subset, on a real
+  # system these tables will be populated either by mysql_tzinfo_to_sql
+  # or by downloading the timezone table package from our website
+  mtr_appendfile_to_file("$path_sql_dir/mysql_test_data_timezone.sql",
+			 $bootstrap_sql_file);
+
+  # Fill help tables, just an empty file when running from bk repo
+  # but will be replaced by a real fill_help_tables.sql when
+  # building the source dist
+  mtr_appendfile_to_file("$path_sql_dir/fill_help_tables.sql",
+			 $bootstrap_sql_file);
+
   # Log bootstrap command
   my $path_bootstrap_log= "$opt_vardir/log/bootstrap.log";
   mtr_tofile($path_bootstrap_log,
 	     "$exe_mysqld_bootstrap " . join(" ", @$args) . "\n");
 
-  if ( mtr_run($exe_mysqld_bootstrap, $args, $init_db_sql_tmp,
+  if ( mtr_run($exe_mysqld_bootstrap, $args, $bootstrap_sql_file,
                $path_bootstrap_log, $path_bootstrap_log,
 	       "", { append_log_file => 1 }) != 0 )
 
   {
-    unlink($init_db_sql_tmp);
     mtr_error("Error executing mysqld --bootstrap\n" .
-              "Could not install $type test DBs");
+              "Could not install system database, see $path_bootstrap_log");
   }
-  unlink($init_db_sql_tmp);
 }
 
 

--- 1.51/mysql-test/t/ndb_basic.test	2007-01-29 00:51:37 +01:00
+++ 1.52/mysql-test/t/ndb_basic.test	2007-02-26 11:49:55 +01:00
@@ -597,8 +597,8 @@ drop table t1;
 # Test auto_increment
 #
 
-connect (con1,localhost,,,test);
-connect (con2,localhost,,,test);
+connect (con1,localhost,root,,test);
+connect (con2,localhost,root,,test);
 
 create table t1
 	(counter int(64) NOT NULL auto_increment,
@@ -631,7 +631,7 @@ drop table t1;
 #
 # Bug #17249 delete statement with join where clause fails 
 # when table do not have pk
-#
+	#
 
 create table t1 (a int) engine=ndb;
 create table t2 (a int) engine=ndb;

--- 1.32/mysql-test/t/ndb_index_ordered.test	2007-01-08 14:20:16 +01:00
+++ 1.33/mysql-test/t/ndb_index_ordered.test	2007-02-26 11:49:55 +01:00
@@ -336,8 +336,8 @@ drop table t1;
 # bug#7798
 create table t1(a int primary key, b int not null, index(b));
 insert into t1 values (1,1), (2,2);
-connect (con1,localhost,,,test);
-connect (con2,localhost,,,test);
+connect (con1,localhost,root,,test);
+connect (con2,localhost,root,,test);
 connection con1;
 set autocommit=0;
 begin;

--- 1.132/mysql-test/r/create.result	2007-01-23 01:00:24 +01:00
+++ 1.133/mysql-test/r/create.result	2007-02-26 11:49:55 +01:00
@@ -522,9 +522,11 @@ drop database mysqltest;
 select database();
 database()
 NULL
+create user mysqltest_1;
 select database(), user();
 database()	user()
 NULL	mysqltest_1@localhost
+drop user mysqltest_1;
 use test;
 create table t1 (a int, index `primary` (a));
 ERROR 42000: Incorrect index name 'primary'

--- 1.43/mysql-test/r/join.result	2007-01-12 11:48:58 +01:00
+++ 1.44/mysql-test/r/join.result	2007-02-26 11:49:55 +01:00
@@ -701,7 +701,7 @@ select * from information_schema.statist
 using(table_name,column_name) where table_name='user';
 TABLE_NAME	COLUMN_NAME	TABLE_CATALOG	TABLE_SCHEMA	NON_UNIQUE	INDEX_SCHEMA	INDEX_NAME	SEQ_IN_INDEX	COLLATION	CARDINALITY	SUB_PART	PACKED	NULLABLE	INDEX_TYPE	COMMENT	TABLE_CATALOG	TABLE_SCHEMA	ORDINAL_POSITION	COLUMN_DEFAULT	IS_NULLABLE	DATA_TYPE	CHARACTER_MAXIMUM_LENGTH	CHARACTER_OCTET_LENGTH	NUMERIC_PRECISION	NUMERIC_SCALE	CHARACTER_SET_NAME	COLLATION_NAME	COLUMN_TYPE	COLUMN_KEY	EXTRA	PRIVILEGES	COLUMN_COMMENT
 user	Host	NULL	mysql	0	mysql	PRIMARY	1	A	NULL	NULL	NULL		BTREE		NULL	mysql	1		NO	char	60	180	NULL	NULL	utf8	utf8_bin	char(60)	PRI		#	
-user	User	NULL	mysql	0	mysql	PRIMARY	2	A	5	NULL	NULL		BTREE		NULL	mysql	2		NO	char	16	48	NULL	NULL	utf8	utf8_bin	char(16)	PRI		#	
+user	User	NULL	mysql	0	mysql	PRIMARY	2	A	3	NULL	NULL		BTREE		NULL	mysql	2		NO	char	16	48	NULL	NULL	utf8	utf8_bin	char(16)	PRI		#	
 drop table t1;
 drop table t2;
 drop table t3;

--- 1.88/mysql-test/t/create.test	2007-01-22 17:42:48 +01:00
+++ 1.89/mysql-test/t/create.test	2007-02-26 11:49:55 +01:00
@@ -410,12 +410,14 @@ select database();
 drop database mysqltest;
 select database();
 
-# Connect without a database
+# Connect without a database as user mysqltest_1
+create user mysqltest_1;
 connect (user1,localhost,mysqltest_1,,*NO-ONE*);
 connection user1;
 select database(), user();
 connection default;
 disconnect user1;
+drop user mysqltest_1;
 use test;
 
 #

--- 1.54/scripts/mysql_fix_privilege_tables.sql	2007-01-02 18:42:11 +01:00
+++ 1.56/scripts/mysql_fix_privilege_tables.sql.in	2007-02-26 12:03:12 +01:00
@@ -1,5 +1,6 @@
-# This script converts any old privilege tables to privilege tables suitable
-# for this version of MySQL
+# This part converts any old privilege tables to privilege tables suitable
+# for current version of MySQL
+
 # You can safely ignore all 'Duplicate column' and 'Unknown column' errors"
 # because these just mean that your tables are already up to date.
 # This script is safe to run even if your tables are already up to date!
@@ -11,20 +12,6 @@
 set sql_mode='';
 set storage_engine=MyISAM;
 
-CREATE TABLE IF NOT EXISTS func (
-  name char(64) binary DEFAULT '' NOT NULL,
-  ret tinyint(1) DEFAULT '0' NOT NULL,
-  dl char(128) DEFAULT '' NOT NULL,
-  type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL,
-  PRIMARY KEY (name)
-) CHARACTER SET utf8 COLLATE utf8_bin;
-
-CREATE TABLE IF NOT EXISTS plugin (
-  name char(64) binary DEFAULT '' NOT NULL,
-  dl char(128) DEFAULT '' NOT NULL,
-  PRIMARY KEY (name)
-) CHARACTER SET utf8 COLLATE utf8_bin;
-
 ALTER TABLE user add File_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL;
 
 # Detect whether or not we had the Grant_priv column
@@ -52,716 +39,12 @@ ADD x509_subject BLOB NOT NULL;
 ALTER TABLE user MODIFY ssl_type enum('','ANY','X509', 'SPECIFIED') NOT NULL;
 
 #
-# tables_priv
-#
-CREATE TABLE IF NOT EXISTS tables_priv (
-  Host char(60) binary DEFAULT '' NOT NULL,
-  Db char(64) binary DEFAULT '' NOT NULL,
-  User char(16) binary DEFAULT '' NOT NULL,
-  Table_name char(64) binary DEFAULT '' NOT NULL,
-  Grantor char(77) DEFAULT '' NOT NULL,
-  Timestamp timestamp(14),
-  Table_priv set('Select','Insert','Update','Delete','Create',
-                 'Drop','Grant','References','Index','Alter')
-    COLLATE utf8_general_ci DEFAULT '' NOT NULL,
-  Column_priv set('Select','Insert','Update','References')
-    COLLATE utf8_general_ci DEFAULT '' NOT NULL,
-  PRIMARY KEY (Host,Db,User,Table_name)
-) CHARACTER SET utf8 COLLATE utf8_bin;
-# Fix collation of set fields
-ALTER TABLE tables_priv
-  ADD KEY Grantor (Grantor);
-
-ALTER TABLE tables_priv
-  MODIFY Host char(60) NOT NULL default '',
-  MODIFY Db char(64) NOT NULL default '',
-  MODIFY User char(16) NOT NULL default '',
-  MODIFY Table_name char(64) NOT NULL default '',
-  MODIFY Grantor char(77) NOT NULL default '',
-  ENGINE=MyISAM,
-  CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
-
-ALTER TABLE tables_priv
-  MODIFY Column_priv set('Select','Insert','Update','References')
-    COLLATE utf8_general_ci DEFAULT '' NOT NULL,
-  MODIFY Table_priv set('Select','Insert','Update','Delete','Create',
-                        'Drop','Grant','References','Index','Alter',
-                        'Create View','Show view')
-    COLLATE utf8_general_ci DEFAULT '' NOT NULL,
-  COMMENT='Table privileges';
-
-#
-# columns_priv
-#
-CREATE TABLE IF NOT EXISTS columns_priv (
-  Host char(60) DEFAULT '' NOT NULL,
-  Db char(64) DEFAULT '' NOT NULL,
-  User char(16) DEFAULT '' NOT NULL,
-  Table_name char(64) DEFAULT '' NOT NULL,
-  Column_name char(64) DEFAULT '' NOT NULL,
-  Timestamp timestamp(14),
-  Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL,
-  PRIMARY KEY (Host,Db,User,Table_name,Column_name)
-) CHARACTER SET utf8 COLLATE utf8_bin;
-#
 # Name change of Type -> Column_priv from MySQL 3.22.12
 #
-ALTER TABLE columns_priv
-  CHANGE Type Column_priv set('Select','Insert','Update','References')
-    COLLATE utf8_general_ci DEFAULT '' NOT NULL;
-
-ALTER TABLE columns_priv
-  MODIFY Host char(60) NOT NULL default '',
-  MODIFY Db char(64) NOT NULL default '',
-  MODIFY User char(16) NOT NULL default '',
-  MODIFY Table_name char(64) NOT NULL default '',
-  MODIFY Column_name char(64) NOT NULL default '',
-  ENGINE=MyISAM,
-  CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin,
-  COMMENT='Column privileges';
-
-ALTER TABLE columns_priv
-  MODIFY Column_priv set('Select','Insert','Update','References')
-    COLLATE utf8_general_ci DEFAULT '' NOT NULL;
-
-#
-#  Add the new 'type' column to the func table.
-#
-
-ALTER TABLE func add type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL;
-
-#
-#  Change the user,db and host tables to MySQL 4.0 format
-#
-
-# Detect whether we had Show_db_priv
-SET @hadShowDbPriv:=0;
-SELECT @hadShowDbPriv:=1 FROM user WHERE Show_db_priv LIKE '%';
-
-ALTER TABLE user
-ADD Show_db_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Alter_priv,
-ADD Super_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Show_db_priv,
-ADD Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Super_priv,
-ADD Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_tmp_table_priv,
-ADD Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Lock_tables_priv,
-ADD Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Execute_priv,
-ADD Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Repl_slave_priv;
-
-# Convert privileges so that users have similar privileges as before
-
-UPDATE user SET Show_db_priv= Select_priv, Super_priv=Process_priv, Execute_priv=Process_priv, Create_tmp_table_priv='Y', Lock_tables_priv='Y', Repl_slave_priv=file_priv, Repl_client_priv=File_priv where user<>"" AND @hadShowDbPriv = 0;
-
-
-#  Add fields that can be used to limit number of questions and connections
-#  for some users.
-ALTER TABLE user
-ADD max_questions int(11) NOT NULL DEFAULT 0 AFTER x509_subject,
-ADD max_updates   int(11) unsigned NOT NULL DEFAULT 0 AFTER max_questions,
-ADD max_connections int(11) unsigned NOT NULL DEFAULT 0 AFTER max_updates;
-
-
-#
-#  Add Create_tmp_table_priv and Lock_tables_priv to db and host
-#
-
-ALTER TABLE db
-ADD Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-ADD Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
-ALTER TABLE host
-ADD Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL,
-ADD Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL;
-
-alter table user change max_questions max_questions int(11) unsigned DEFAULT 0  NOT NULL;
-
-
-alter table db comment='Database privileges';
-alter table host comment='Host privileges;  Merged with database privileges';
-alter table user comment='Users and global privileges';
-alter table func comment='User defined functions';
-
-# Convert all tables to UTF-8 with binary collation
-# and reset all char columns to correct width
-ALTER TABLE user
-  MODIFY Host char(60) NOT NULL default '',
-  MODIFY User char(16) NOT NULL default '',
-  ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
-ALTER TABLE user
-  MODIFY Password char(41) character set latin1 collate latin1_bin NOT NULL default '',
-  MODIFY Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY Reload_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY Shutdown_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY Process_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY File_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY Show_db_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY Super_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY ssl_type enum('','ANY','X509', 'SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL;
-
-ALTER TABLE db
-  MODIFY Host char(60) NOT NULL default '',
-  MODIFY Db char(64) NOT NULL default '',
-  MODIFY User char(16) NOT NULL default '',
-  ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
-ALTER TABLE db
-  MODIFY  Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY  Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY  Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY  Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY  Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY  Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY  Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY  References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY  Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY  Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY  Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY  Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
-
-ALTER TABLE host
-  MODIFY Host char(60) NOT NULL default '',
-  MODIFY Db char(64) NOT NULL default '',
-  ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
-ALTER TABLE host
-  MODIFY Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-  MODIFY Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
-
-ALTER TABLE func
-  ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
-ALTER TABLE func
-  MODIFY type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL;
-
-#
-# Detect whether we had Create_view_priv
-# 
-SET @hadCreateViewPriv:=0;
-SELECT @hadCreateViewPriv:=1 FROM user WHERE Create_view_priv LIKE '%';
-
-#
-# Create VIEWs privileges (v5.0)
-#
-ALTER TABLE db ADD Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Lock_tables_priv;
-ALTER TABLE db MODIFY Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Lock_tables_priv;
-
-ALTER TABLE host ADD Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Lock_tables_priv;
-ALTER TABLE host MODIFY Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Lock_tables_priv;
-
-ALTER TABLE user ADD Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Repl_client_priv;
-ALTER TABLE user MODIFY Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Repl_client_priv;
-
-#
-# Show VIEWs privileges (v5.0)
-#
-ALTER TABLE db ADD Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_view_priv;
-ALTER TABLE db MODIFY Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_view_priv;
-
-ALTER TABLE host ADD Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_view_priv;
-ALTER TABLE host MODIFY Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_view_priv;
-
-ALTER TABLE user ADD Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_view_priv;
-ALTER TABLE user MODIFY Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_view_priv;
-
-#
-# Assign create/show view privileges to people who have create provileges
-#
-UPDATE user SET Create_view_priv=Create_priv, Show_view_priv=Create_priv where user<>"" AND @hadCreateViewPriv = 0;
-
-#
-#
-#
-SET @hadCreateRoutinePriv:=0;
-SELECT @hadCreateRoutinePriv:=1 FROM user WHERE Create_routine_priv LIKE '%';
-
-#
-# Create PROCEDUREs privileges (v5.0)
-#
-ALTER TABLE db ADD Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Show_view_priv;
-ALTER TABLE db MODIFY Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Show_view_priv;
-
-ALTER TABLE host ADD Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Show_view_priv;
-ALTER TABLE host MODIFY Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Show_view_priv;
-
-ALTER TABLE user ADD Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Show_view_priv;
-ALTER TABLE user MODIFY Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Show_view_priv;
-
-#
-# Alter PROCEDUREs privileges (v5.0)
-#
-ALTER TABLE db ADD Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_routine_priv;
-ALTER TABLE db MODIFY Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_routine_priv;
-
-ALTER TABLE host ADD Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_routine_priv;
-ALTER TABLE host MODIFY Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_routine_priv;
-
-ALTER TABLE user ADD Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_routine_priv;
-ALTER TABLE user MODIFY Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_routine_priv;
-
-ALTER TABLE db ADD Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Alter_routine_priv;
-ALTER TABLE db MODIFY Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Alter_routine_priv;
-
-ALTER TABLE host ADD Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Alter_routine_priv;
-ALTER TABLE host MODIFY Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Alter_routine_priv;
-
-#
-# Assign create/alter routine privileges to people who have create privileges
-#
-UPDATE user SET Create_routine_priv=Create_priv, Alter_routine_priv=Alter_priv where user<>"" AND @hadCreateRoutinePriv = 0;
-UPDATE db SET Create_routine_priv=Create_priv, Alter_routine_priv=Alter_priv, Execute_priv=Select_priv where user<>"" AND @hadCreateRoutinePriv = 0;
-UPDATE host SET Create_routine_priv=Create_priv, Alter_routine_priv=Alter_priv, Execute_priv=Select_priv where @hadCreateRoutinePriv = 0;
-
-#
-# Add max_user_connections resource limit 
-#
-ALTER TABLE user ADD max_user_connections int(11) unsigned DEFAULT '0' NOT NULL AFTER max_connections;
-
-#
-# user.Create_user_priv
-#
-
-SET @hadCreateUserPriv:=0;
-SELECT @hadCreateUserPriv:=1 FROM user WHERE Create_user_priv LIKE '%';
-
-ALTER TABLE user ADD Create_user_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Alter_routine_priv;
-ALTER TABLE user MODIFY Create_user_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Alter_routine_priv;
-UPDATE user LEFT JOIN db USING (Host,User) SET Create_user_priv='Y'
-  WHERE @hadCreateUserPriv = 0 AND
-        (user.Grant_priv = 'Y' OR db.Grant_priv = 'Y');
-
---
--- procs_priv
---
-CREATE TABLE IF NOT EXISTS procs_priv (
-  Host char(60) binary DEFAULT '' NOT NULL,
-  Db char(64) binary DEFAULT '' NOT NULL,
-  User char(16) binary DEFAULT '' NOT NULL,
-  Routine_name char(64) binary DEFAULT '' NOT NULL,
-  Routine_type enum('FUNCTION','PROCEDURE') NOT NULL,
-  Grantor char(77) DEFAULT '' NOT NULL,
-  Proc_priv set('Execute','Alter Routine','Grant')
-    COLLATE utf8_general_ci DEFAULT '' NOT NULL,
-  Timestamp timestamp(14),
-  PRIMARY KEY (Host, Db, User, Routine_name, Routine_type),
-  KEY Grantor (Grantor)
-) CHARACTER SET utf8 COLLATE utf8_bin comment='Procedure privileges';
-
-ALTER TABLE procs_priv
-  ENGINE=MyISAM,
-  CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
-
-ALTER TABLE procs_priv
-  MODIFY Proc_priv set('Execute','Alter Routine','Grant')
-    COLLATE utf8_general_ci DEFAULT '' NOT NULL;
-
-ALTER TABLE procs_priv
-  ADD Routine_type enum('FUNCTION','PROCEDURE')
-    COLLATE utf8_general_ci NOT NULL AFTER Routine_name;
-
-ALTER TABLE procs_priv
-  MODIFY Timestamp timestamp(14) AFTER Proc_priv;
-
---
--- servers 
---
-CREATE TABLE servers (
-  Server_name char(64) NOT NULL DEFAULT '',
-  Host char(64) NOT NULL DEFAULT '',
-  Db char(64) NOT NULL DEFAULT '',
-  Username char(64) NOT NULL DEFAULT '',
-  Password char(64) NOT NULL DEFAULT '',
-  Port INT(4) NOT NULL DEFAULT '0',
-  Socket char(64) NOT NULL DEFAULT '',
-  Wrapper char(64) NOT NULL DEFAULT '',
-  Owner char(64) NOT NULL DEFAULT '',
-  PRIMARY KEY (Server_name))
-  CHARACTER SET utf8 comment='MySQL Foreign Servers table';
-
---
--- help_topic
---
-CREATE TABLE IF NOT EXISTS help_topic (
-help_topic_id int unsigned not null,
-name varchar(64) not null,
-help_category_id smallint unsigned not null,
-description text not null,
-example text not null,
-url varchar(128) not null,
-primary key (help_topic_id), unique index (name)
-) CHARACTER SET utf8 comment='help topics';
-
-CREATE TABLE IF NOT EXISTS help_category (
-help_category_id smallint unsigned not null,
-name varchar(64) not null,
-parent_category_id smallint unsigned null,
-url varchar(128) not null,
-primary key (help_category_id),
-unique index (name)
-) CHARACTER SET utf8 comment='help categories';
-
-CREATE TABLE IF NOT EXISTS help_relation (
-help_topic_id int unsigned not null references help_topic,
-help_keyword_id  int unsigned not null references help_keyword,
-primary key (help_keyword_id, help_topic_id)
-) CHARACTER SET utf8 comment='keyword-topic relation';
-
-CREATE TABLE IF NOT EXISTS help_keyword (
-help_keyword_id int unsigned not null,
-name varchar(64) not null,
-primary key (help_keyword_id),
-unique index (name)
-) CHARACTER SET utf8 comment='help keywords';
-
-#
-# Create missing time zone related tables
-#
-
-CREATE TABLE IF NOT EXISTS time_zone_name (
-Name char(64) NOT NULL,   
-Time_zone_id int  unsigned NOT NULL,
-PRIMARY KEY Name (Name) 
-) CHARACTER SET utf8 comment='Time zone names';
-
-CREATE TABLE IF NOT EXISTS time_zone (
-Time_zone_id int unsigned NOT NULL auto_increment,
-Use_leap_seconds  enum('Y','N') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-PRIMARY KEY TzId (Time_zone_id) 
-) CHARACTER SET utf8 comment='Time zones';
-# Make enum field case-insensitive
-ALTER TABLE time_zone
-  MODIFY Use_leap_seconds enum('Y','N') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
-
-CREATE TABLE IF NOT EXISTS time_zone_transition (
-Time_zone_id int unsigned NOT NULL,
-Transition_time bigint signed NOT NULL,   
-Transition_type_id int unsigned NOT NULL,
-PRIMARY KEY TzIdTranTime (Time_zone_id, Transition_time) 
-) CHARACTER SET utf8 comment='Time zone transitions';
-
-CREATE TABLE IF NOT EXISTS time_zone_transition_type (
-Time_zone_id int unsigned NOT NULL,
-Transition_type_id int unsigned NOT NULL,
-Offset int signed DEFAULT 0 NOT NULL,
-Is_DST tinyint unsigned DEFAULT 0 NOT NULL,
-Abbreviation char(8) DEFAULT '' NOT NULL,
-PRIMARY KEY TzIdTrTId (Time_zone_id, Transition_type_id) 
-) CHARACTER SET utf8 comment='Time zone transition types';
-
-CREATE TABLE IF NOT EXISTS time_zone_leap_second (
-Transition_time bigint signed NOT NULL,
-Correction int signed NOT NULL,   
-PRIMARY KEY TranTime (Transition_time) 
-) CHARACTER SET utf8 comment='Leap seconds information for time zones';
-
-
-#
-# Create proc table if it does not exists
 #
-
-CREATE TABLE IF NOT EXISTS proc (
-  db                char(64) collate utf8_bin DEFAULT '' NOT NULL,
-  name              char(64) DEFAULT '' NOT NULL,
-  type              enum('FUNCTION','PROCEDURE') NOT NULL,
-  specific_name     char(64) DEFAULT '' NOT NULL,
-  language          enum('SQL') DEFAULT 'SQL' NOT NULL,
-  sql_data_access   enum('CONTAINS_SQL',
-                         'NO_SQL',
-                         'READS_SQL_DATA',
-                         'MODIFIES_SQL_DATA'
-                    ) DEFAULT 'CONTAINS_SQL' NOT NULL,
-  is_deterministic  enum('YES','NO') DEFAULT 'NO' NOT NULL,
-  security_type     enum('INVOKER','DEFINER') DEFAULT 'DEFINER' NOT NULL,
-  param_list        blob DEFAULT '' NOT NULL,
-  returns           char(64) DEFAULT '' NOT NULL,
-  body              longblob DEFAULT '' NOT NULL,
-  definer           char(77) collate utf8_bin DEFAULT '' NOT NULL,
-  created           timestamp,
-  modified          timestamp,
-  sql_mode          set(
-                        'REAL_AS_FLOAT',
-                        'PIPES_AS_CONCAT',
-                        'ANSI_QUOTES',
-                        'IGNORE_SPACE',
-                        'NOT_USED',
-                        'ONLY_FULL_GROUP_BY',
-                        'NO_UNSIGNED_SUBTRACTION',
-                        'NO_DIR_IN_CREATE',
-                        'POSTGRESQL',
-                        'ORACLE',
-                        'MSSQL',
-                        'DB2',
-                        'MAXDB',
-                        'NO_KEY_OPTIONS',
-                        'NO_TABLE_OPTIONS',
-                        'NO_FIELD_OPTIONS',
-                        'MYSQL323',
-                        'MYSQL40',
-                        'ANSI',
-                        'NO_AUTO_VALUE_ON_ZERO',
-                        'NO_BACKSLASH_ESCAPES',
-                        'STRICT_TRANS_TABLES',
-                        'STRICT_ALL_TABLES',
-                        'NO_ZERO_IN_DATE',
-                        'NO_ZERO_DATE',
-                        'INVALID_DATES',
-                        'ERROR_FOR_DIVISION_BY_ZERO',
-                        'TRADITIONAL',
-                        'NO_AUTO_CREATE_USER',
-                        'HIGH_NOT_PRECEDENCE'
-                    ) DEFAULT '' NOT NULL,
-  comment           char(64) collate utf8_bin DEFAULT '' NOT NULL,
-  PRIMARY KEY (db,name,type)
-) engine=MyISAM
-  character set utf8
-  comment='Stored Procedures';
-
-# Correct the name fields to not binary, and expand sql_data_access
-ALTER TABLE proc MODIFY name char(64) DEFAULT '' NOT NULL,
-                 MODIFY specific_name char(64) DEFAULT '' NOT NULL,
-                 MODIFY sql_data_access
-                        enum('CONTAINS_SQL',
-                             'NO_SQL',
-                             'READS_SQL_DATA',
-                             'MODIFIES_SQL_DATA'
-                            ) DEFAULT 'CONTAINS_SQL' NOT NULL,
-                 MODIFY body longblob DEFAULT '' NOT NULL,
-                 MODIFY sql_mode
-                        set('REAL_AS_FLOAT',
-                            'PIPES_AS_CONCAT',
-                            'ANSI_QUOTES',
-                            'IGNORE_SPACE',
-                            'NOT_USED',
-                            'ONLY_FULL_GROUP_BY',
-                            'NO_UNSIGNED_SUBTRACTION',
-                            'NO_DIR_IN_CREATE',
-                            'POSTGRESQL',
-                            'ORACLE',
-                            'MSSQL',
-                            'DB2',
-                            'MAXDB',
-                            'NO_KEY_OPTIONS',
-                            'NO_TABLE_OPTIONS',
-                            'NO_FIELD_OPTIONS',
-                            'MYSQL323',
-                            'MYSQL40',
-                            'ANSI',
-                            'NO_AUTO_VALUE_ON_ZERO',
-                            'NO_BACKSLASH_ESCAPES',
-                            'STRICT_TRANS_TABLES',
-                            'STRICT_ALL_TABLES',
-                            'NO_ZERO_IN_DATE',
-                            'NO_ZERO_DATE',
-                            'INVALID_DATES',
-                            'ERROR_FOR_DIVISION_BY_ZERO',
-                            'TRADITIONAL',
-                            'NO_AUTO_CREATE_USER',
-                            'HIGH_NOT_PRECEDENCE'
-                            ) DEFAULT '' NOT NULL,
-                 DEFAULT CHARACTER SET utf8;
-
-# Correct the character set and collation
-ALTER TABLE proc CONVERT TO CHARACTER SET utf8;
-# Reset some fields after the conversion
-ALTER TABLE proc  MODIFY db
-                         char(64) collate utf8_bin DEFAULT '' NOT NULL,
-                  MODIFY definer
-                         char(77) collate utf8_bin DEFAULT '' NOT NULL,
-                  MODIFY comment
-                         char(64) collate utf8_bin DEFAULT '' NOT NULL;
-
-#
-# Create missing log tables (5.1)
-#
-
-delimiter //
-CREATE PROCEDURE create_log_tables()
-BEGIN
-  DECLARE is_csv_enabled int DEFAULT 0;
-  SELECT @@have_csv = 'YES' INTO is_csv_enabled;
-  IF (is_csv_enabled) THEN
-    CREATE TABLE IF NOT EXISTS general_log (
-      event_time TIMESTAMP NOT NULL,
-      user_host    MEDIUMTEXT,
-      thread_id INTEGER,
-      server_id INTEGER,
-      command_type VARCHAR(64),
-      argument     MEDIUMTEXT
-    ) engine=CSV CHARACTER SET utf8 comment='General log';
-    CREATE TABLE IF NOT EXISTS slow_log (
-      start_time TIMESTAMP NOT NULL,
-      user_host MEDIUMTEXT NOT NULL,
-      query_time   TIME NOT NULL,
-      lock_time    TIME NOT NULL,
-      rows_sent    INTEGER NOT NULL,
-      rows_examined INTEGER NOT NULL,
-      db VARCHAR(512),
-      last_insert_id INTEGER,
-      insert_id INTEGER,
-      server_id INTEGER,
-      sql_text MEDIUMTEXT NOT NULL
-    ) engine=CSV CHARACTER SET utf8 comment='Slow log';
-  END IF;
-END//
-delimiter ;
-CALL create_log_tables();
-DROP PROCEDURE create_log_tables;
-#
-# EVENT table
-#
-
-
-CREATE TABLE event (
-  db char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',
-  name char(64) CHARACTER SET utf8 NOT NULL default '',
-  body longblob NOT NULL,
-  definer char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',
-  execute_at DATETIME default NULL,
-  interval_value int(11) default NULL,
-  interval_field ENUM('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK',
-                       'SECOND','MICROSECOND', 'YEAR_MONTH','DAY_HOUR',
-                       'DAY_MINUTE','DAY_SECOND',
-                       'HOUR_MINUTE','HOUR_SECOND',
-                       'MINUTE_SECOND','DAY_MICROSECOND',
-                       'HOUR_MICROSECOND','MINUTE_MICROSECOND',
-                       'SECOND_MICROSECOND') default NULL,
-  created TIMESTAMP NOT NULL,
-  modified TIMESTAMP NOT NULL,
-  last_executed DATETIME default NULL,
-  starts DATETIME default NULL,
-  ends DATETIME default NULL,
-  status ENUM('ENABLED','DISABLED') NOT NULL default 'ENABLED',
-  on_completion ENUM('DROP','PRESERVE') NOT NULL default 'DROP',
-  sql_mode          set(
-                        'REAL_AS_FLOAT',
-                        'PIPES_AS_CONCAT',
-                        'ANSI_QUOTES',
-                        'IGNORE_SPACE',
-                        'NOT_USED',
-                        'ONLY_FULL_GROUP_BY',
-                        'NO_UNSIGNED_SUBTRACTION',
-                        'NO_DIR_IN_CREATE',
-                        'POSTGRESQL',
-                        'ORACLE',
-                        'MSSQL',
-                        'DB2',
-                        'MAXDB',
-                        'NO_KEY_OPTIONS',
-                        'NO_TABLE_OPTIONS',
-                        'NO_FIELD_OPTIONS',
-                        'MYSQL323',
-                        'MYSQL40',
-                        'ANSI',
-                        'NO_AUTO_VALUE_ON_ZERO',
-                        'NO_BACKSLASH_ESCAPES',
-                        'STRICT_TRANS_TABLES',
-                        'STRICT_ALL_TABLES',
-                        'NO_ZERO_IN_DATE',
-                        'NO_ZERO_DATE',
-                        'INVALID_DATES',
-                        'ERROR_FOR_DIVISION_BY_ZERO',
-                        'TRADITIONAL',
-                        'NO_AUTO_CREATE_USER',
-                        'HIGH_NOT_PRECEDENCE'
-                    ) DEFAULT '' NOT NULL,
-  comment char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',
-  PRIMARY KEY  (db,name)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT 'Events';
-
-
-#
-# EVENT privilege
-#
-
-SET @hadEventPriv := 0;
-SELECT @hadEventPriv :=1 FROM user WHERE Event_priv LIKE '%';
-
-ALTER TABLE user add Event_priv enum('N','Y') character set utf8 DEFAULT 'N' NOT NULL AFTER Create_user_priv;
-ALTER TABLE user MODIFY Event_priv enum('N','Y') character set utf8 DEFAULT 'N' NOT NULL AFTER Create_user_priv;
-
-ALTER TABLE db add Event_priv enum('N','Y') character set utf8 DEFAULT 'N' NOT NULL;
-ALTER TABLE db MODIFY Event_priv enum('N','Y') character set utf8 DEFAULT 'N' NOT NULL;
-
-ALTER TABLE event DROP PRIMARY KEY;
-ALTER TABLE event ADD PRIMARY KEY(db, name);
-ALTER TABLE event ADD sql_mode
-                        set('REAL_AS_FLOAT',
-                            'PIPES_AS_CONCAT',
-                            'ANSI_QUOTES',
-                            'IGNORE_SPACE',
-                            'NOT_USED',
-                            'ONLY_FULL_GROUP_BY',
-                            'NO_UNSIGNED_SUBTRACTION',
-                            'NO_DIR_IN_CREATE',
-                            'POSTGRESQL',
-                            'ORACLE',
-                            'MSSQL',
-                            'DB2',
-                            'MAXDB',
-                            'NO_KEY_OPTIONS',
-                            'NO_TABLE_OPTIONS',
-                            'NO_FIELD_OPTIONS',
-                            'MYSQL323',
-                            'MYSQL40',
-                            'ANSI',
-                            'NO_AUTO_VALUE_ON_ZERO',
-                            'NO_BACKSLASH_ESCAPES',
-                            'STRICT_TRANS_TABLES',
-                            'STRICT_ALL_TABLES',
-                            'NO_ZERO_IN_DATE',
-                            'NO_ZERO_DATE',
-                            'INVALID_DATES',
-                            'ERROR_FOR_DIVISION_BY_ZERO',
-                            'TRADITIONAL',
-                            'NO_AUTO_CREATE_USER',
-                            'HIGH_NOT_PRECEDENCE'
-                            ) DEFAULT '' NOT NULL AFTER on_completion;
-
-UPDATE user SET Event_priv=Super_priv WHERE @hadEventPriv = 0;
-ALTER TABLE event MODIFY name char(64) CHARACTER SET utf8 NOT NULL default '';
-
-#
-# TRIGGER privilege
+# tables_priv
 #
 
-SET @hadTriggerPriv := 0;
-SELECT @hadTriggerPriv :=1 FROM user WHERE Trigger_priv LIKE '%';
-
-ALTER TABLE user ADD Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Event_priv;
-ALTER TABLE user MODIFY Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Event_priv;
-
-ALTER TABLE host ADD Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
-ALTER TABLE host MODIFY Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
-
-ALTER TABLE db ADD Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
-ALTER TABLE db MODIFY Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
-
-ALTER TABLE tables_priv MODIFY Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') COLLATE utf8_general_ci DEFAULT '' NOT NULL;
-
-UPDATE user SET Trigger_priv=Super_priv WHERE @hadTriggerPriv = 0;
 
-CREATE TABLE IF NOT EXISTS ndb_binlog_index (Position BIGINT UNSIGNED NOT NULL, File VARCHAR(255) NOT NULL, epoch BIGINT UNSIGNED NOT NULL, inserts BIGINT UNSIGNED NOT NULL, updates BIGINT UNSIGNED NOT NULL, deletes BIGINT UNSIGNED NOT NULL, schemaops BIGINT UNSIGNED NOT NULL, PRIMARY KEY(epoch)) ENGINE=MYISAM;
 
-# Activate the new, possible modified privilege tables
-# This should not be needed, but gives us some extra testing that the above
-# changes was correct
 
-flush privileges;

--- 1.17/mysql-test/t/ndb_multi.test	2006-11-15 11:12:42 +01:00
+++ 1.18/mysql-test/t/ndb_multi.test	2007-02-26 11:49:55 +01:00
@@ -21,8 +21,8 @@ select * from t2;
 show status like 'handler_discover%';
 
 # Check dropping and recreating table on same server
-connect (con1,localhost,,,test);
-connect (con2,localhost,,,test);
+connect (con1,localhost,root,,test);
+connect (con2,localhost,root,,test);
 connection con1;
 select * from t1;
 connection con2;

--- 1.36/mysql-test/r/sp-security.result	2006-08-14 11:27:04 +02:00
+++ 1.37/mysql-test/r/sp-security.result	2007-02-26 11:49:55 +01:00
@@ -45,7 +45,7 @@ db1_secret
 select * from db1_secret.t1;
 ERROR 42000: SELECT command denied to user ''@'localhost' for table 't1'
 create procedure db1_secret.dummy() begin end;
-ERROR 42000: Access denied for user ''@'localhost' to database 'db1_secret'
+ERROR 42000: Access denied for user ''@'%' to database 'db1_secret'
 drop procedure db1_secret.dummy;
 ERROR 42000: PROCEDURE db1_secret.dummy does not exist
 select * from t1;
@@ -76,9 +76,9 @@ ERROR 42000: Access denied for user 'use
 select db1_secret.db();
 ERROR 42000: Access denied for user 'user1'@'localhost' to database 'db1_secret'
 call db1_secret.stamp(6);
-ERROR 42000: Access denied for user ''@'localhost' to database 'db1_secret'
+ERROR 42000: Access denied for user ''@'%' to database 'db1_secret'
 select db1_secret.db();
-ERROR 42000: Access denied for user ''@'localhost' to database 'db1_secret'
+ERROR 42000: Access denied for user ''@'%' to database 'db1_secret'
 drop database if exists db2;
 create database db2;
 use db2;

--- 1.276/BitKeeper/etc/ignore	2007-02-13 10:27:20 +01:00
+++ 1.277/BitKeeper/etc/ignore	2007-02-26 11:49:49 +01:00
@@ -1813,6 +1813,7 @@ scripts/mysql_explain_log
 scripts/mysql_find_rows
 scripts/mysql_fix_extensions
 scripts/mysql_fix_privilege_tables
+scripts/mysql_fix_privilege_tables.sql
 scripts/mysql_install_db
 scripts/mysql_secure_installation
 scripts/mysql_setpermission

--- 1.102/mysql-test/Makefile.am	2007-02-03 09:44:35 +01:00
+++ 1.103/mysql-test/Makefile.am	2007-02-26 12:03:12 +01:00
@@ -70,7 +70,6 @@ dist-hook:
 	$(INSTALL_DATA) $(srcdir)/std_data/*.cnf $(distdir)/std_data
 	$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup50/BACKUP* $(distdir)/std_data/ndb_backup50
 	$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51/BACKUP* $(distdir)/std_data/ndb_backup51
-	$(INSTALL_DATA) $(srcdir)/lib/init_db.sql $(distdir)/lib
 	$(INSTALL_DATA) $(srcdir)/lib/*.pl $(distdir)/lib
 
 install-data-local:
@@ -112,7 +111,6 @@ install-data-local:
 	$(INSTALL_DATA) $(srcdir)/std_data/*.cnf $(DESTDIR)$(testdir)/std_data
 	$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup50/BACKUP* $(DESTDIR)$(testdir)/std_data/ndb_backup50
 	$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51/BACKUP* $(DESTDIR)$(testdir)/std_data/ndb_backup51
-	$(INSTALL_DATA) $(srcdir)/lib/init_db.sql $(DESTDIR)$(testdir)/lib
 	$(INSTALL_DATA) $(srcdir)/lib/*.pl $(DESTDIR)$(testdir)/lib
 
 uninstall-local:

--- 1.40/mysql-test/t/grant2.test	2006-11-17 21:28:43 +01:00
+++ 1.41/mysql-test/t/grant2.test	2007-02-26 11:49:55 +01:00
@@ -395,6 +395,8 @@ delete from mysql.user where user like '
 flush privileges;
 drop database mysqltest_1;
 
+--source include/add_anonymous_users.inc
+
 # But anonymous users can't change their password
 connect (n5,localhost,test,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
 connection n5;
@@ -402,6 +404,8 @@ connection n5;
 set password = password("changed");
 disconnect n5;
 connection default;
+
+--source include/delete_anonymous_users.inc
 
 
 # Bug #12423 "Deadlock when doing FLUSH PRIVILEGES and GRANT in 

--- 1.28/mysql-test/t/rpl_temporary.test	2006-07-08 23:29:30 +02:00
+++ 1.29/mysql-test/t/rpl_temporary.test	2007-02-26 12:03:12 +01:00
@@ -1,3 +1,6 @@
+# Test need anonymous user when connection are made as "zedjzlcsjhd"
+source include/add_anonymous_users.inc;
+
 
 -- source include/master-slave.inc
 
@@ -21,8 +24,8 @@ connection master;
 connect (con1,localhost,root,,);
 connect (con2,localhost,root,,);
 # We want to connect as an unprivileged user. But if we use user="" then this
-# will pick the Unix login, which will cause problems if you're running the test
-# as root.
+# will pick the Unix login, which will cause problems if you're running the
+# test as root.
 connect (con3,localhost,zedjzlcsjhd,,);
 
 # We are going to use SET PSEUDO_THREAD_ID in this test;
@@ -199,5 +202,8 @@ select * from t1;
 
 connection master; 
 drop table t1;
+
+# Delete the anonymous users
+source include/delete_anonymous_users.inc;
 
 # End of 5.1 tests
Thread
bk commit into 5.1 tree (msvensson:1.2446)msvensson26 Feb