List:Commits« Previous MessageNext Message »
From:msvensson Date:February 28 2007 1:27pm
Subject:bk commit into 5.0 tree (msvensson:1.2450) BUG#20166
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@stripped, 2007-02-28 14:26:58+01:00, msvensson@stripped +6 -0
  Bug#20166 mysql-test-run.pl does not test system privilege tables creation
   - Split out initial data in mysql_system_tables.sql to  it's own file
   - Use file from mysql_install_db and mysql-test-run

  mysql-test/mysql-test-run.pl@stripped, 2007-02-28 14:26:57+01:00, msvensson@stripped +10 -4
    - Add mysql_system_tables_data.sql as part of the bootstrap
    - Remove the addition of pid to end of bootstrap.sql, now
      to file used for bootstrap will be $opt_vardir/tmp/bootstrap.sql
    - Improve error message descibing how to find cause of a
      failed bootstrap

  scripts/Makefile.am@stripped, 2007-02-28 14:26:57+01:00, msvensson@stripped +9 -7
    - Rename mysql_fix_privileg_tables.sql.in to mysql_system_tables_fix.sql
    - Build mysql_fix_privilege_tables from mysql_system_tables.sql and
      mysql_system_tables_fix.sql
    - Add mysql_system_tables_fix.sql to EXTRA_DIST

  scripts/mysql_install_db.sh@stripped, 2007-02-28 14:26:57+01:00, msvensson@stripped +11 -1
    - Use mysql_system_tables_data.sql file when bootstrapping
      mysql, it will contain initial data for MysQL system tables

  scripts/mysql_system_tables.sql@stripped, 2007-02-28 14:26:57+01:00, msvensson@stripped +0 -10
    Move initial data for system tables to it's own file

  scripts/mysql_system_tables_data.sql@stripped, 2007-02-28 14:26:57+01:00, msvensson@stripped +13 -0
    Move initial data for system tables to it's own file

  scripts/mysql_system_tables_data.sql@stripped, 2007-02-28 14:26:57+01:00, msvensson@stripped +0 -0

  scripts/mysql_system_tables_fix.sql@stripped, 2007-02-28 11:37:38+01:00, msvensson@stripped +0 -0
    Rename: scripts/mysql_fix_privilege_tables.sql.in -> scripts/mysql_system_tables_fix.sql

# 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/mysql-5.0-maint-bug20166

--- 1.56/scripts/Makefile.am	2007-02-26 11:49:23 +01:00
+++ 1.57/scripts/Makefile.am	2007-02-28 14:26:57 +01:00
@@ -65,15 +65,14 @@ EXTRA_DIST =		$(EXTRA_SCRIPTS) \
 			mysqlaccess.conf \
 			mysqlbug \
 			make_win_bin_dist \
-			mysql_fix_privilege_tables.sql.in
+			mysql_system_tables_fix.sql
 
 dist_pkgdata_DATA =	fill_help_tables.sql \
 			mysql_fix_privilege_tables.sql \
 			mysql_system_tables.sql \
+			mysql_system_tables_data.sql \
 			mysql_test_data_timezone.sql
 
-# mysqlbug should be distributed built so that people can report build
-# failures with it.
 CLEANFILES =		@server_scripts@ \
 			make_binary_distribution \
 			make_sharedlib_distribution \
@@ -94,8 +93,11 @@ CLEANFILES =		@server_scripts@ \
 			mysql_upgrade_shell \
 			mysqld_multi \
 			make_win_src_distribution \
-			mysql_create_system_tables
+			mysql_create_system_tables \
+			mysql_fix_privilege_tables.sql
 
+# mysqlbug should be distributed built so that people can report build
+# failures with it.
 DISTCLEANFILES =        mysqlbug
 
 # We want the right version and configure comand line in mysqlbug
@@ -104,10 +106,10 @@ mysqlbug: ${top_builddir}/config.status 
 # 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
+mysql_fix_privilege_tables.sql: mysql_system_tables.sql \
+				mysql_system_tables_fix.sql
 	@echo "Building $@";
-	@cat mysql_system_tables.sql $@.in > $@
+	@cat mysql_system_tables.sql mysql_system_tables_fix.sql > $@
 
 SUFFIXES = .sh
 

--- 1.70/scripts/mysql_install_db.sh	2007-02-26 11:49:23 +01:00
+++ 1.71/scripts/mysql_install_db.sh	2007-02-28 14:26:57 +01:00
@@ -138,10 +138,12 @@ fi
 # Find SQL scripts needed for bootstrap
 fill_help_tables="fill_help_tables.sql"
 create_system_tables="mysql_system_tables.sql"
+fill_system_tables="mysql_system_tables_data.sql"
 if test -n "$srcdir"
 then
   fill_help_tables=$srcdir/scripts/$fill_help_tables
   create_system_tables=$srcdir/scripts/$create_system_tables
+  fill_system_tables=$srcdir/scripts/$fill_system_tables
 else
   for i in $basedir/support-files $basedir/share $basedir/share/mysql \
            $basedir/scripts `pwd` `pwd`/scripts @pkgdatadir@
@@ -154,6 +156,7 @@ else
 
   fill_help_tables=$pkgdatadir/$fill_help_tables
   create_system_tables=$pkgdatadir/$create_system_tables
+  fill_system_tables=$pkgdatadir/$fill_system_tables
 fi
 
 if test ! -f $create_system_tables
@@ -170,6 +173,13 @@ then
   exit 1;
 fi
 
+if test ! -f $fill_system_tables
+then
+  echo "FATAL ERROR: Could not find help file '$fill_system_tables' in"
+  echo "@pkgdatadir@ or inside $basedir"
+  exit 1;
+fi
+
 # Find executables and paths
 mdata=$ldata/mysql
 mysqld=$execdir/mysqld
@@ -273,7 +283,7 @@ mysqld_install_cmd_line="$mysqld_bootstr
 
 # 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`
+if `(echo "use mysql;"; cat $create_system_tables $fill_system_tables) | $mysqld_install_cmd_line`
 then
   s_echo "OK"
 

--- 1.201/mysql-test/mysql-test-run.pl	2007-02-27 14:54:31 +01:00
+++ 1.202/mysql-test/mysql-test-run.pl	2007-02-28 14:26:57 +01:00
@@ -2904,16 +2904,21 @@ sub install_db ($$) {
   # ----------------------------------------------------------------------
   # Create the bootstrap.sql file
   # ----------------------------------------------------------------------
-  my $bootstrap_sql_file= "$opt_vardir/tmp/bootstrap.sql$$";
+  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
+  # Add the offical mysql system tables
+  # for a production system
   mtr_appendfile_to_file("$path_sql_dir/mysql_system_tables.sql",
 			 $bootstrap_sql_file);
 
+  # Add the mysql system tables initial data
+  # for a production system
+  mtr_appendfile_to_file("$path_sql_dir/mysql_system_tables_data.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
@@ -2937,7 +2942,8 @@ sub install_db ($$) {
 
   {
     mtr_error("Error executing mysqld --bootstrap\n" .
-              "Could not install system database, see $path_bootstrap_log");
+              "Could not install system database from $bootstrap_sql_file\n" .
+	      "see $path_bootstrap_log for errors");
   }
 }
 

--- 1.3/scripts/mysql_system_tables.sql	2007-02-27 15:28:18 +01:00
+++ 1.4/scripts/mysql_system_tables.sql	2007-02-28 14:26:57 +01:00
@@ -6,10 +6,6 @@ set storage_engine=myisam;
 
 CREATE TABLE IF NOT EXISTS db (   Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y'!
 ) COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db,User), KEY User (User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Database privileges';
 
--- default grants for anyone to access database 'test' and 'test_%'
-INSERT INTO db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N');
-INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N');
-
 
 CREATE TABLE IF NOT EXISTS host (  Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT!
  NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Host privileges;  Merged with database privileges';
 
@@ -56,10 +52,4 @@ CREATE TABLE IF NOT EXISTS proc ( db cha
 
 
 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) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin   comment='Procedure privileges';
-
--- default users allowing root access from local machine
-INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
-REPLACE INTO user VALUES (@@hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
-REPLACE INTO user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
-
 
--- New file ---
+++ scripts/mysql_system_tables_data.sql	07/02/28 14:26:57
--
-- The inital data for system tables of MySQL Server
--

-- default grants for anyone to access database 'test' and 'test_%'
INSERT INTO db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N');
INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N');

-- default users allowing root access from local machine
INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
REPLACE INTO user VALUES (@@hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
REPLACE INTO user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);


Thread
bk commit into 5.0 tree (msvensson:1.2450) BUG#20166msvensson28 Feb