Commit f95c8008 authored by unknown's avatar unknown

Merge bk-internal.mysql.com:/home/bk/mysql-4.1

into narttu.mysql.fi:/my/mysql-4.1


sql/mysqld.cc:
  Auto merged
parents eb302b37 491cbf40
......@@ -294,10 +294,10 @@ ha_print_info(
{
hash_cell_t* cell;
/* ha_node_t* node; */
ulint nodes = 0;
/* ulint nodes = 0; */
ulint cells = 0;
ulint len = 0;
ulint max_len = 0;
/* ulint len = 0; */
/* ulint max_len = 0; */
ulint n_bufs;
ulint i;
......
......@@ -54,7 +54,7 @@ explain select level,id,parent_id from t1 where level=1;
select level,id from t1 where level=1;
select level,id,parent_id from t1 where level=1;
optimize table t1;
--replace_result 87 # 48 # 43 # 24 # 6 # 3 #
--replace_result 87 # 50 # 48 # 43 # 25 # 24 # 6 # 3 #
show keys from t1;
drop table t1;
......
......@@ -58,10 +58,9 @@ EXTRA_SCRIPTS = make_binary_distribution.sh \
EXTRA_DIST = $(EXTRA_SCRIPTS) \
mysqlaccess.conf \
mysqlbug \
fill_help_tables.sql
mysqlbug
pkgdata_DATA = make_binary_distribution
pkgdata_DATA = fill_help_tables.sql
# mysqlbug should be distributed built so that people can report build
# failures with it.
......@@ -81,8 +80,8 @@ CLEANFILES = @server_scripts@ \
mysqlhotcopy \
mysqldumpslow \
mysqld_multi \
fill_help_tables \
fill_help_tables.sql
fill_help_tables \
fill_help_tables.sql
SUPERCLEANFILES = mysqlbug
......@@ -103,6 +102,7 @@ SUFFIXES = .sh
-e 's!@''libexecdir''@!$(libexecdir)!g' \
-e 's!@''pkglibdir''@!$(pkglibdir)!g' \
-e 's!@''pkgincludedir''@!$(pkgincludedir)!g' \
-e 's!@''pkgdatadir''@!$(pkgdatadir)!g' \
-e 's!@''CC''@!@CC@!'\
-e 's!@''CXX''@!@CXX@!'\
-e 's!@''GXX''@!@GXX@!'\
......@@ -137,7 +137,12 @@ SUFFIXES = .sh
# Don't update the files from bitkeeper
%::SCCS/s.%
all: fill_help_tables.sql make_win_src_distribution
all: fill_help_tables.sql make_win_src_distribution make_binary_distribution
# The following rule is here to ensure that build will continue
# even if we don't have perl installed. In this case the help tables
# will be empty
fill_help_tables.sql: fill_help_tables ../Docs/manual.texi
./fill_help_tables < ../Docs/manual.texi > fill_help_tables.sql
-./fill_help_tables < ../Docs/manual.texi > fill_help_tables.sql
echo "" >> fill_help_tables.sql
......@@ -111,12 +111,12 @@ sub flush_all
$example= prepare_example($example);
if ($func_name ne "" && $text ne "" && !($func_name =~ /[abcdefghikjlmnopqrstuvwxyz]/)){
print "INSERT INTO help_topic (name,description,example) VALUES (";
print "INSERT IGNORE INTO help_topic (name,description,example) VALUES (";
print "'$func_name',";
print "'$text',";
print "'$example'";
print ");\n";
print "INSERT INTO help_relation (help_category_id,help_topic_id) VALUES (\@cur_category,LAST_INSERT_ID());\n";
print "INSERT IGNORE INTO help_relation (help_category_id,help_topic_id) VALUES (\@cur_category,LAST_INSERT_ID());\n";
}
$func_name= "";
......@@ -131,11 +131,11 @@ sub new_category
$category= prepare_text($category);
print "INSERT INTO help_category (name) VALUES (\'$category\');\n";
print "INSERT IGNORE INTO help_category (name) VALUES (\'$category\');\n";
print "SET \@cur_category=LAST_INSERT_ID();\n";
}
#print "INSERT INTO db (Host,DB,User,Select_priv) VALUES ('%','mysql_help','','Y');\n";
#print "INSERT IGNORE INTO db (Host,DB,User,Select_priv) VALUES ('%','mysql_help','','Y');\n";
#print "CREATE DATABASE mysql_help;\n";
print "USE mysql;\n";
......@@ -236,4 +236,3 @@ print "DELETE help_category ";
print "FROM help_category ";
print "LEFT JOIN help_relation ON help_category.help_category_id=help_relation.help_category_id ";
print "WHERE help_relation.help_category_id is null;"
......@@ -160,6 +160,7 @@ if [ $BASE_SYSTEM != "netware" ] ; then
fi
$CP support-files/* $BASE/support-files
$CP scripts/fill_help_tables.sql $BASE/support-files
if [ $BASE_SYSTEM = "netware" ] ; then
rm -f $BASE/support-files/magic \
......@@ -183,14 +184,14 @@ do
done
$CP mysql-test/include/*.inc $BASE/mysql-test/include
$CP mysql-test/std_data/*.dat mysql-test/std_data/*.001 $BASE/mysql-test/std_data
$CP mysql-test/std_data/*.dat mysql-test/std_data/*.*001 $BASE/mysql-test/std_data
$CP mysql-test/std_data/des_key_file $BASE/mysql-test/std_data
$CP mysql-test/t/*test mysql-test/t/*.opt mysql-test/t/*.slave-mi mysql-test/t/*.sh $BASE/mysql-test/t
$CP mysql-test/r/*result mysql-test/r/*.require $BASE/mysql-test/r
if [ $BASE_SYSTEM != "netware" ] ; then
$CP scripts/* $BASE/bin
$BASE/bin/replace \@localstatedir\@ ./data \@bindir\@ ./bin \@scriptdir\@ ./bin \@libexecdir\@ ./bin \@sbindir\@ ./bin \@prefix\@ . \@HOSTNAME\@ @HOSTNAME@ < $SOURCE/scripts/mysql_install_db.sh > $BASE/scripts/mysql_install_db
$BASE/bin/replace \@localstatedir\@ ./data \@bindir\@ ./bin \@scriptdir\@ ./bin \@libexecdir\@ ./bin \@sbindir\@ ./bin \@prefix\@ . \@HOSTNAME\@ @HOSTNAME@ \@pkgdatadir\@ ./support-files < $SOURCE/scripts/mysql_install_db.sh > $BASE/scripts/mysql_install_db
$BASE/bin/replace \@prefix\@ /usr/local/mysql \@bindir\@ ./bin \@MYSQLD_USER\@ root \@localstatedir\@ /usr/local/mysql/data \@HOSTNAME\@ @HOSTNAME@ < $SOURCE/support-files/mysql.server.sh > $BASE/support-files/mysql.server
$BASE/bin/replace /my/gnu/bin/hostname /bin/hostname -- $BASE/bin/mysqld_safe
mv $BASE/support-files/binary-configure $BASE/configure
......
#!/bin/sh
# Copyright (C) 2002 MySQL AB
# Copyright (C) 2002-2003 MySQL AB
# For a more info consult the file COPYRIGHT distributed with this file.
# This scripts creates the privilege tables db, host, user, tables_priv,
......@@ -43,6 +43,7 @@ parse_arguments() {
--basedir=*) basedir=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
--ldata=*|--datadir=*) ldata=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
--user=*) user=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
--verbose) verbose=1 ;;
*)
if test -n "$pick_args"
then
......@@ -76,6 +77,8 @@ execdir=
bindir=
basedir=
force=0
verbose=0
fill_help_tables=""
parse_arguments `$print_defaults $defaults mysqld mysql_install_db`
parse_arguments PICK-ARGS-FROM-ARGV "$@"
......@@ -85,17 +88,37 @@ then
basedir=@prefix@
bindir=@bindir@
execdir=@libexecdir@
pkgdatadir=@pkgdatadir@
else
bindir="$basedir/bin"
if test -x "$basedir/libexec/mysqld"
then
execdir="$basedir/libexec"
elif test -x "@libexecdir@/mysqld"
if test -x "$basedir/libexec/mysqld"
then
execdir="$basedir/libexec"
elif test -x "@libexecdir@/mysqld"
then
execdir="@libexecdir@"
else
execdir="$basedir/bin"
fi
# find fill_help_tables.sh
for i in $basedir/support-files $basedir/share $basedir/share/mysql $basedir/scripts @pkgdatadir@
do
if test -f $i/fill_help_tables.sql
then
pkgdatadir=$i
fi
done
fi
if test -f $pkgdatadir/fill_help_tables.sql
then
execdir="@libexecdir@"
fill_help_tables=$pkgdatadir/fill_help_tables.sql
else
execdir="$basedir/bin"
fi
if test $verbose -eq 1
then
echo "Could not find help file 'fill_help_tables.sql'".
fi
fi
mdata=$ldata/mysql
......@@ -160,8 +183,9 @@ c_t="" c_c=""
# Check for old tables
if test ! -f $mdata/db.frm
then
echo "Preparing db table"
if test $verbose -eq 1 ; then
echo "Preparing db table"
fi
# mysqld --bootstrap wants one command/line
c_d="$c_d CREATE TABLE db ("
c_d="$c_d Host char(60) binary DEFAULT '' NOT NULL,"
......@@ -190,7 +214,9 @@ fi
if test ! -f $mdata/host.frm
then
echo "Preparing host table"
if test $verbose -eq 1 ; then
echo "Preparing host table"
fi
c_h="$c_h CREATE TABLE host ("
c_h="$c_h Host char(60) binary DEFAULT '' NOT NULL,"
......@@ -214,7 +240,9 @@ fi
if test ! -f $mdata/user.frm
then
echo "Preparing user table"
if test $verbose -eq 1 ; then
echo "Preparing user table"
fi
c_u="$c_u CREATE TABLE user ("
c_u="$c_u Host char(60) binary DEFAULT '' NOT NULL,"
......@@ -256,7 +284,8 @@ then
REPLACE 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','','','','',0,0,0);
INSERT INTO user (host,user) values ('localhost','');"
INSERT INTO user (host,user) values ('localhost','');
"
if test "$windows" -eq 0
then
......@@ -270,7 +299,9 @@ fi
if test ! -f $mdata/func.frm
then
echo "Preparing func table"
if test $verbose -eq 1 ; then
echo "Preparing func table"
fi
c_f="$c_f CREATE TABLE func ("
c_f="$c_f name char(64) binary DEFAULT '' NOT NULL,"
......@@ -284,7 +315,9 @@ fi
if test ! -f $mdata/tables_priv.frm
then
echo "Preparing tables_priv table"
if test $verbose -eq 1 ; then
echo "Preparing tables_priv table"
fi
c_t="$c_t CREATE TABLE tables_priv ("
c_t="$c_t Host char(60) binary DEFAULT '' NOT NULL,"
......@@ -303,7 +336,9 @@ fi
if test ! -f $mdata/columns_priv.frm
then
echo "Preparing columns_priv table"
if test $verbose -eq 1 ; then
echo "Preparing columns_priv table"
fi
c_c="$c_c CREATE TABLE columns_priv ("
c_c="$c_c Host char(60) binary DEFAULT '' NOT NULL,"
......@@ -318,7 +353,7 @@ then
c_c="$c_c comment='Column privileges';"
fi
echo "Installing all prepared tables"
echo "Installing privilege tables"
if (
cat << END_OF_DATA
use mysql;
......@@ -337,7 +372,10 @@ $i_f
$c_t
$c_c
END_OF_DATA
cat fill_help_tables.sql
if test -n "$fill_help_tables"
then
cat $fill_help_tables
fi
) | eval "$execdir/mysqld $defaults --bootstrap --skip-grant-tables \
--basedir=$basedir --datadir=$ldata --skip-innodb --skip-bdb $args"
then
......@@ -377,7 +415,6 @@ then
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 https://order.mysql.com"
echo
exit 0
else
echo "Installation of grant tables failed!"
......
......@@ -894,7 +894,7 @@ extern "C" void unireg_abort(int exit_code)
DBUG_ENTER("unireg_abort");
if (exit_code)
sql_print_error("Aborting\n");
clean_up(1); /* purecov: inspected */
clean_up(exit_code || !opt_bootstrap); /* purecov: inspected */
DBUG_PRINT("quit",("done with cleanup in unireg_abort"));
my_thread_end();
clean_up_mutexes();
......
......@@ -34,8 +34,7 @@ pkgdata_DATA = my-small.cnf \
my-large.cnf \
my-huge.cnf \
mysql-log-rotate \
mysql-@VERSION@.spec \
binary-configure
mysql-@VERSION@.spec
pkgdata_SCRIPTS = mysql.server
......@@ -48,7 +47,6 @@ CLEANFILES = my-small.cnf \
mysql-log-rotate \
mysql.server \
binary-configure
mysql-@VERSION@.spec: mysql.spec
rm -f $@
......@@ -98,5 +96,7 @@ SUFFIXES = .sh
$< > $@-t
@MV@ $@-t $@
all: binary-configure
# Don't update the files from bitkeeper
%::SCCS/s.%
......@@ -14,11 +14,11 @@ echo "and start the MySQL server for you. If you run into any trouble, please"
echo "consult the MySQL manual, that you can find in the Docs directory."
echo ""
./scripts/mysql_install_db
./scripts/mysql_install_db --no-defaults
if [ $? = 0 ]
then
echo "Starting the mysqld server. You can test that it is up and running"
echo "with the command:"
echo "./bin/mysqladmin version"
./bin/mysqld_safe &
./bin/mysqld_safe --no-defaults &
fi
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment