diff options
Diffstat (limited to 'databases/mysql51-server/files/patch-ab')
-rw-r--r-- | databases/mysql51-server/files/patch-ab | 86 |
1 files changed, 53 insertions, 33 deletions
diff --git a/databases/mysql51-server/files/patch-ab b/databases/mysql51-server/files/patch-ab index 2aa751c..1698b84 100644 --- a/databases/mysql51-server/files/patch-ab +++ b/databases/mysql51-server/files/patch-ab @@ -1,17 +1,29 @@ ---- scripts/mysql_install_db.sh.orig Mon Aug 17 23:09:45 1998 -+++ scripts/mysql_install_db.sh Tue Sep 1 15:38:03 1998 +--- scripts/mysql_install_db.sh.orig Sun Oct 18 23:59:46 1998 ++++ scripts/mysql_install_db.sh Wed Oct 21 15:22:31 1998 @@ -3,7 +3,6 @@ # For a more info consult the file COPYRIGHT distributed with this file # This scripts creates the privilige tables db, host, user in mysql --# It should be run from the top level installation directory +-# It should be run from the top level installation directory. # # All arguments to this script is passed to safe_mysqld -@@ -16,40 +15,12 @@ - bn=`basename $file .frm-new` - mv $file $dir/$bn.frm - done +@@ -11,36 +10,8 @@ + + if test "$1" = "-IN-RPM" + then +- # We are doing a rpm install. +- IN_RPM=1; shift +- # First check if we already have the mysql database. +- if test -f $mdata/user.frm-new -a ! -f $mdata/user.ISM +- then +- for file in $mdata/*.frm-new +- do +- dir=`dirname $file` +- bn=`basename $file .frm-new` +- cp $file $dir/$bn.frm +- done +- fi -else - if test ! -d "./data" - then @@ -30,27 +42,31 @@ - exit 1 - fi - fi ++ # Make -IN-RPM a noop, just in case... ++ shift fi if test ! -x @bindir@/mysqladmin - then -- if test "@localstatedir@" = "./data" +@@ -51,17 +22,6 @@ + ls -l /usr/bin/mysql* + echo "Didn't find @bindir@/mysqladmin" + exit 1 +- elif test "@localstatedir@" = "./data" - then - echo "Can't execute @bindir@/mysqladmin" +- echo "Can't execute @bindir@/mysqladmin" - echo "You should be in the distribution directory when executing this script" - echo "Please go to the directory where you unpacked this distribution" - echo "and start this script with 'scripts/mysql_install_db'" - exit 1 +- exit 1 - else - echo "Didn't find @bindir@/mysqladmin" - echo "You should do a 'make install' before executing this script" - exit 1 -- fi + fi fi - if test -f @localstatedir@/mysql/db.ISM -@@ -65,9 +36,6 @@ - exit 1 +@@ -84,9 +44,6 @@ + fi fi -# On IRIX hostname is in /usr/bsd so add this to the path @@ -59,29 +75,29 @@ hostname=`hostname` # Install this too in the user table # create database mysql & test -@@ -118,10 +86,7 @@ - # - if test ! -f @localstatedir@/mysql/user.frm +@@ -142,10 +99,7 @@ then -- if test "@localstatedir@" != "./data" -- then -- cp -p ./data/mysql/*.frm @localstatedir@/mysql -- fi -+ cp -p @pkgdatadir@/mysql/*.frm @localstatedir@/mysql + if test ! -f @localstatedir@/mysql/user.frm + then +- if test "@localstatedir@" != "./data" +- then +- cp -p ./data/mysql/*.frm @localstatedir@/mysql +- fi ++ cp -p ./data/mysql/*.frm @localstatedir@/mysql + fi fi - @bindir@/mysql mysql <<END_OF_DATA -@@ -150,9 +115,6 @@ +@@ -175,9 +129,6 @@ # Dumping data for table 'user' # -INSERT INTO user VALUES ('localhost','@MYSQLD_USER@','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'); -INSERT INTO user VALUES ('$hostname','@MYSQLD_USER@','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'); - - INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'); - INSERT INTO user VALUES ('$hostname','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'); + REPLACE INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'); + REPLACE INTO user VALUES ('$hostname','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'); -@@ -160,16 +122,19 @@ +@@ -185,6 +136,13 @@ INSERT INTO user VALUES ('$hostname','','','N','N','N','N','N','N','N','N','N','N'); END_OF_DATA @@ -95,13 +111,17 @@ if test $? -eq 0 then @bindir@/mysqladmin reload - echo "mysqld demon is running and mysql grant tables are installed." +@@ -197,13 +155,6 @@ echo echo "PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !" -- echo -- echo "You can test the MySQL demon with the benchmarks in the 'bench'" -- echo "directory:" -- echo "cd bench ; run-all-tests" echo +- if test -z "$IN_RPM" +- then +- echo "You can test the MySQL demon with the benchmarks in the 'bench'" +- echo "directory:" +- echo "cd bench ; run-all-tests" +- echo +- fi echo "You can also try the mysql command line tool with:" echo "@bindir@/mysql test" + echo |