=== modified file 'mysql-test/include/default_my.cnf' --- mysql-test/include/default_my.cnf 2007-12-12 17:19:24 +0000 +++ mysql-test/include/default_my.cnf 2009-02-04 10:21:32 +0000 @@ -12,14 +12,6 @@ log-bin= master-bin [mysqlbinlog] disable-force-if-open -# mysql_fix_privilege_tables.sh does not read from [client] so it -# need its own section -[mysql_fix_privilege_tables] -socket= @client.socket -port= @client.port -user= @client.user -password= @client.password - [ENV] MASTER_MYPORT= @mysqld.1.port MASTER_MYSOCK= @mysqld.1.socket === modified file 'mysql-test/mysql-test-run.pl' --- mysql-test/mysql-test-run.pl 2009-02-02 11:05:02 +0000 +++ mysql-test/mysql-test-run.pl 2009-02-04 10:19:15 +0000 @@ -1531,24 +1531,6 @@ sub client_debug_arg($$) { } -sub mysql_fix_arguments () { - - return "" if ( IS_WINDOWS ); - - my $exe= - mtr_script_exists("$basedir/scripts/mysql_fix_privilege_tables", - "$path_client_bindir/mysql_fix_privilege_tables"); - my $args; - mtr_init_args(\$args); - mtr_add_arg($args, "--defaults-file=%s", $path_config_file); - - mtr_add_arg($args, "--basedir=", $basedir); - mtr_add_arg($args, "--bindir=", $path_client_bindir); - mtr_add_arg($args, "--verbose"); - return mtr_args2str($exe, @$args); -} - - sub client_arguments ($) { my $client_name= shift; my $client_exe= mtr_exe_exists("$path_client_bindir/$client_name"); @@ -1840,7 +1822,6 @@ sub environment_setup { $ENV{'MYSQL_UPGRADE'}= client_arguments("mysql_upgrade"); $ENV{'MYSQLADMIN'}= native_path($exe_mysqladmin); $ENV{'MYSQL_CLIENT_TEST'}= mysql_client_test_arguments(); - $ENV{'MYSQL_FIX_SYSTEM_TABLES'}= mysql_fix_arguments(); $ENV{'EXE_MYSQL'}= $exe_mysql; # ---------------------------------------------------- @@ -2407,14 +2388,6 @@ sub create_config_file_for_extern { [mysqlbinlog] character-sets-dir= $path_charsetsdir -# mysql_fix_privilege_tables.sh don't read from [client] -[mysql_fix_privilege_tables] -socket = $opts{'socket'} -port = $opts{'port'} -user = $opts{'user'} -password = $opts{'password'} - - EOF ; === removed file 'mysql-test/t/system_mysql_db_fix30020.test' --- mysql-test/t/system_mysql_db_fix30020.test 2009-02-02 20:50:45 +0000 +++ mysql-test/t/system_mysql_db_fix30020.test 1970-01-01 00:00:00 +0000 @@ -1,109 +0,0 @@ -# Embedded server doesn't support external clients ---source include/not_embedded.inc - -# Don't run this test if $MYSQL_FIX_SYSTEM_TABLES isn't set -# to the location of mysql_fix_privilege_tables.sql -if (`SELECT LENGTH("$MYSQL_FIX_SYSTEM_TABLES") <= 0`) -{ - skip Test need MYSQL_FIX_SYSTEM_TABLES; -} -# check that CSV engine was compiled in, as the test relies on the presence -# of the log tables (which are CSV-based) ---source include/have_csv.inc - -# -# This is the test for mysql_fix_privilege_tables -# It checks that a system tables from mysql 3.20 -# can be upgraded to current system table format -# -# Note: If this test fails, don't be confused about the errors reported -# by mysql-test-run This shows warnings generated by -# mysql_fix_system_tables which should be ignored. -# Instead, concentrate on the errors in r/system_mysql_db.reject - --- disable_result_log --- disable_query_log - -use test; - -# create system tables as in mysql-3.20 - ---disable_warnings -CREATE TABLE db ( - Host char(60) binary DEFAULT '' NOT NULL, - Db char(32) binary DEFAULT '' NOT NULL, - User char(16) binary DEFAULT '' NOT NULL, - Select_priv enum('N','Y') DEFAULT 'N' NOT NULL, - Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL, - Update_priv enum('N','Y') DEFAULT 'N' NOT NULL, - Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL, - Create_priv enum('N','Y') DEFAULT 'N' NOT NULL, - Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL, - PRIMARY KEY Host (Host,Db,User), - KEY User (User) -) -engine=MyISAM; ---enable_warnings - -INSERT INTO db VALUES ('%','test', '','Y','Y','Y','Y','Y','Y'); -INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y'); - ---disable_warnings -CREATE TABLE host ( - Host char(60) binary DEFAULT '' NOT NULL, - Db char(32) binary DEFAULT '' NOT NULL, - Select_priv enum('N','Y') DEFAULT 'N' NOT NULL, - Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL, - Update_priv enum('N','Y') DEFAULT 'N' NOT NULL, - Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL, - Create_priv enum('N','Y') DEFAULT 'N' NOT NULL, - Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL, - PRIMARY KEY Host (Host,Db) -) -engine=MyISAM; ---enable_warnings - ---disable_warnings -CREATE TABLE user ( - Host char(60) binary DEFAULT '' NOT NULL, - User char(16) binary DEFAULT '' NOT NULL, - Password char(16), - Select_priv enum('N','Y') DEFAULT 'N' NOT NULL, - Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL, - Update_priv enum('N','Y') DEFAULT 'N' NOT NULL, - Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL, - Create_priv enum('N','Y') DEFAULT 'N' NOT NULL, - Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL, - Reload_priv enum('N','Y') DEFAULT 'N' NOT NULL, - Shutdown_priv enum('N','Y') DEFAULT 'N' NOT NULL, - Process_priv enum('N','Y') DEFAULT 'N' NOT NULL, - PRIMARY KEY Host (Host,User) -) -engine=MyISAM; ---enable_warnings - -INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y'); -INSERT INTO user VALUES ('localhost','', '','N','N','N','N','N','N','N','N','N'); - -# Call the "shell script" $MYSQL_FIX_SYSTEM_TABLES using system --- system $MYSQL_FIX_SYSTEM_TABLES --database=test > $MYSQLTEST_VARDIR/log/system_mysql_db_fix30020.log 2>&1 --- enable_query_log --- enable_result_log - --- source include/system_db_struct.inc - --- disable_query_log - -DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, -procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, -time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, -time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index, -backup_history, backup_progress; - --- enable_query_log - -# check that we dropped all system tables -show tables; - -exit; -# End of 4.1 tests === modified file 'scripts/Makefile.am' --- scripts/Makefile.am 2008-12-14 11:36:15 +0000 +++ scripts/Makefile.am 2009-02-04 10:17:00 +0000 @@ -23,7 +23,6 @@ EXTRA_PROGRAMS = comp_sql bin_SCRIPTS = @server_scripts@ \ msql2mysql \ mysql_config \ - mysql_fix_privilege_tables \ mysql_fix_extensions \ mysql_setpermission \ mysql_secure_installation \ @@ -44,7 +43,6 @@ EXTRA_SCRIPTS = make_binary_distributio msql2mysql.sh \ mysql_config.sh \ mysql_config.pl.in \ - mysql_fix_privilege_tables.sh \ mysql_fix_extensions.sh \ mysql_install_db.sh \ mysql_install_db.pl.in \ @@ -80,7 +78,6 @@ CLEANFILES = @server_scripts@ \ make_sharedlib_distribution \ msql2mysql \ mysql_config \ - mysql_fix_privilege_tables \ mysql_fix_extensions \ mysql_setpermission \ mysql_secure_installation \ === removed file 'scripts/mysql_fix_privilege_tables.sh' --- scripts/mysql_fix_privilege_tables.sh 2008-01-07 17:02:10 +0000 +++ scripts/mysql_fix_privilege_tables.sh 1970-01-01 00:00:00 +0000 @@ -1,223 +0,0 @@ -#!/bin/sh -# Copyright (C) 2000-2006 MySQL AB -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -# This script is a wrapper to pipe the mysql_fix_privilege_tables.sql -# through the mysql client program to the mysqld server - -# Default values (Can be changed in my.cnf) -password="" -host="localhost" -user="root" -sql_only=0 -basedir="@prefix@" -verbose=0 -args="" -# no elaborate fallback here; with no argument, it will happen in "mysql" -port="" -socket="" -database="mysql" -bindir="" -pkgdatadir="@pkgdatadir@" -print_defaults_bindir="." - -file=mysql_fix_privilege_tables.sql - -# The following test is to make this script compatible with the 4.0 where -# the single argument could be a password -if test "$#" = 1 -then - case "$1" in - --*) ;; - *) old_style_password="$1" ; shift ;; - esac -fi - -# The following code is almost identical to the code in mysql_install_db.sh - -case "$1" in - --no-defaults|--defaults-file=*|--defaults-extra-file=*) - defaults="$1"; shift - ;; -esac - -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 - # the command line) into the args variable. - pick_args= - if test "$1" = PICK-ARGS-FROM-ARGV - then - pick_args=1 - shift - fi - - for arg do - case "$arg" in - --basedir=*) basedir=`echo "$arg" | sed -e 's/^[^=]*=//'` ;; - --user=*) user=`echo "$arg" | sed -e 's/^[^=]*=//'` ;; - --password=*) password=`echo "$arg" | sed -e 's/^[^=]*=//'` ;; - --host=*) host=`echo "$arg" | sed -e 's/^[^=]*=//'` ;; - --sql|--sql-only) sql_only=1 ;; - --verbose) verbose=1 ;; - --port=*) port=`echo "$arg" | sed -e "s;--port=;;"` ;; - --socket=*) socket=`echo "$arg" | sed -e "s;--socket=;;"` ;; - --database=*) database=`echo "$arg" | sed -e "s;--database=;;"` ;; - --bindir=*) bindir=`echo "$arg" | sed -e "s;--bindir=;;"` - print_defaults_bindir=$bindir - ;; - *) - if test -n "$pick_args" - then - # This sed command makes sure that any special chars are quoted, - # so the arg gets passed exactly to the server. - args="$args "`echo "$arg" | sed -e 's,\([^=a-zA-Z0-9_.-]\),\\\\\1,g'` - fi - ;; - esac - done -} - -# Get first arguments from the my.cfg file, groups [mysqld] and -# [mysql_install_db], and then merge with the command line arguments - -print_defaults=my_print_defaults -for dir in ./extra ./bin @bindir@ @bindir@ $print_defaults_bindir/../bin $print_defaults_bindir/../extra -do - if test -x $dir/my_print_defaults - then - print_defaults="$dir/my_print_defaults" - break - fi -done - -parse_arguments `$print_defaults $defaults mysql_install_db mysql_fix_privilege_tables` -parse_arguments PICK-ARGS-FROM-ARGV "$@" - -if test -z "$password" -then - password=$old_style_password -fi - -# Find where 'mysql' command is located - -dirname=`dirname "$0"` - -if test -z "$bindir" -then - for i in "$dirname/../client" $basedir/bin @bindir@ - do - if test -f $i/mysql - then - bindir=$i - break - fi - done -fi - -if test -z "$bindir" -then - echo "Could not find MySQL command-line client (mysql)." - echo "Please use --basedir to specify the directory where MySQL is installed." - exit 1 -fi - -cmd="$bindir/mysql --no-defaults --force --user=$user --host=$host" -if test ! -z "$port"; then - cmd="$cmd --port=$port" -fi -if test ! -z "$socket"; then - cmd="$cmd --socket=$socket" -fi -cmd="$cmd --database=$database" - -if test $sql_only = 1 -then - cmd="cat" -fi - -# Find where first mysql_fix_privilege_tables.sql is located -for i in "$dirname" $basedir/support-files $basedir/share \ - $basedir/share/mysql $basedir/scripts $pkgdatadir . -do - if test -f $i/$file - then - pkgdatadir=$i - break - fi -done - -sql_file="$pkgdatadir/$file" -if test ! -f $sql_file -then - echo "Could not find file '$file'." - echo "Please use --basedir to specify the directory where MySQL is installed" - exit 1 -fi - -s_echo() -{ - if test $sql_only = 0 - then - echo $1 - fi -} - -s_echo "This script updates all the mysql privilege tables to be usable by" -s_echo "the current version of MySQL" -s_echo "" - -if test $verbose = 1 -then - s_echo "You can safely ignore all 'Duplicate column' and 'Unknown column' errors" - s_echo "because these just mean that your tables are already up to date." - s_echo "This script is safe to run even if your tables are already up to date!" - s_echo "" -fi - -run_cmd() { - # Password argument is added here to allow for spaces in password. - - if test ! -z "$password" - then - cat $sql_file | $cmd --password="$password" - else - cat $sql_file | $cmd - fi -} - -if test $verbose = 0 -then - run_cmd > /dev/null 2>&1 -else - run_cmd > /dev/null -fi -if test $? = 0 -then - s_echo "done" -else - s_echo "Got a failure from command:" - s_echo "cat $sql_file | $cmd" - s_echo "Please check the above output and try again." - if test $verbose = 0 - then - s_echo "" - s_echo "Running the script with the --verbose option may give you some information" - s_echo "of what went wrong." - fi - s_echo "" - s_echo "If you get an 'Access denied' error, you should run this script again and" - s_echo "give the MySQL root user password as an argument with the --password= option" -fi === modified file 'scripts/mysql_system_tables_fix.sql' --- scripts/mysql_system_tables_fix.sql 2008-10-15 20:00:48 +0000 +++ scripts/mysql_system_tables_fix.sql 2009-02-04 10:23:57 +0000 @@ -5,10 +5,6 @@ # 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! -# On unix, you should use the mysql_fix_privilege_tables script to execute -# this sql script. -# On windows you should do 'mysql --force mysql < mysql_fix_privilege_tables.sql' - set sql_mode=''; set storage_engine=MyISAM; === modified file 'sql/udf_example.c' --- sql/udf_example.c 2008-11-03 20:13:35 +0000 +++ sql/udf_example.c 2009-02-04 10:24:29 +0000 @@ -107,7 +107,7 @@ ** option. ** ** If you can't get AGGREGATES to work, check that you have the column -** 'type' in the mysql.func table. If not, run 'mysql_fix_privilege_tables'. +** 'type' in the mysql.func table. If not, run 'mysql_upgrade'. ** */