mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 10:31:54 +01:00
Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0
into whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
This commit is contained in:
commit
82fd9d10e9
11 changed files with 124 additions and 79 deletions
|
@ -1351,3 +1351,5 @@ win/vs71cache.txt
|
||||||
win/vs8cache.txt
|
win/vs8cache.txt
|
||||||
zlib/*.ds?
|
zlib/*.ds?
|
||||||
zlib/*.vcproj
|
zlib/*.vcproj
|
||||||
|
scripts/make_win_src_distribution_old
|
||||||
|
server-tools/instance-manager/net_serv.cc
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
EXTRA_DIST = mysql.info INSTALL-BINARY
|
EXTRA_DIST = mysql.info INSTALL-BINARY @extra_docs@
|
||||||
|
|
||||||
# make sure that "make install" installs the info page, too
|
# make sure that "make install" installs the info page, too
|
||||||
# automake only seems to take care of this automatically,
|
# automake only seems to take care of this automatically,
|
||||||
|
|
|
@ -102,7 +102,7 @@ dist-hook:
|
||||||
rm -rf `find $(distdir) -type d -name SCCS -print`
|
rm -rf `find $(distdir) -type d -name SCCS -print`
|
||||||
rm -f `find $(distdir) -type l -print`
|
rm -f `find $(distdir) -type l -print`
|
||||||
mkdir -p $(distdir)/win
|
mkdir -p $(distdir)/win
|
||||||
scripts/mysql_install_db --no-defaults --windows \
|
scripts/mysql_install_db --no-defaults --cross-bootstrap \
|
||||||
--basedir=$(top_builddir) \
|
--basedir=$(top_builddir) \
|
||||||
--datadir=$(distdir)/win/data \
|
--datadir=$(distdir)/win/data \
|
||||||
--srcdir=$(top_srcdir)
|
--srcdir=$(top_srcdir)
|
||||||
|
|
|
@ -2452,10 +2452,15 @@ AC_ARG_WITH(docs,
|
||||||
if test "$with_docs" = "yes"
|
if test "$with_docs" = "yes"
|
||||||
then
|
then
|
||||||
docs_dirs="Docs"
|
docs_dirs="Docs"
|
||||||
|
if test -f "$srcdir/Docs/manual.chm" ; then
|
||||||
|
extra_docs="manual.chm"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
docs_dirs=""
|
docs_dirs=""
|
||||||
|
extra_docs=""
|
||||||
fi
|
fi
|
||||||
AC_SUBST(docs_dirs)
|
AC_SUBST(docs_dirs)
|
||||||
|
AC_SUBST(extra_docs)
|
||||||
|
|
||||||
# Shall we build the man pages?
|
# Shall we build the man pages?
|
||||||
AC_ARG_WITH(man,
|
AC_ARG_WITH(man,
|
||||||
|
|
|
@ -109,36 +109,31 @@
|
||||||
The macros below are used to allow build of Universal/fat binaries of
|
The macros below are used to allow build of Universal/fat binaries of
|
||||||
MySQL and MySQL applications under darwin.
|
MySQL and MySQL applications under darwin.
|
||||||
*/
|
*/
|
||||||
#ifdef TARGET_FAT_BINARY
|
#if defined(__APPLE__) && defined(__MACH__)
|
||||||
# undef SIZEOF_CHARP
|
# undef SIZEOF_CHARP
|
||||||
# undef SIZEOF_INT
|
# undef SIZEOF_SHORT
|
||||||
# undef SIZEOF_LONG
|
# undef SIZEOF_INT
|
||||||
# undef SIZEOF_LONG_LONG
|
# undef SIZEOF_LONG
|
||||||
# undef SIZEOF_OFF_T
|
# undef SIZEOF_LONG_LONG
|
||||||
# undef SIZEOF_SHORT
|
# undef SIZEOF_OFF_T
|
||||||
|
# undef WORDS_BIGENDIAN
|
||||||
#if defined(__i386__)
|
# define SIZEOF_SHORT 2
|
||||||
# undef WORDS_BIGENDIAN
|
# define SIZEOF_INT 4
|
||||||
# define SIZEOF_CHARP 4
|
# define SIZEOF_LONG_LONG 8
|
||||||
# define SIZEOF_INT 4
|
# define SIZEOF_OFF_T 8
|
||||||
# define SIZEOF_LONG 4
|
# if defined(__i386__) || defined(__ppc__)
|
||||||
# define SIZEOF_LONG_LONG 8
|
# define SIZEOF_CHARP 4
|
||||||
# define SIZEOF_OFF_T 8
|
# define SIZEOF_LONG 4
|
||||||
# define SIZEOF_SHORT 2
|
# elif defined(__x86_64__) || defined(__ppc64__)
|
||||||
|
# define SIZEOF_CHARP 8
|
||||||
#elif defined(__ppc__)
|
# define SIZEOF_LONG 8
|
||||||
# define WORDS_BIGENDIAN
|
# else
|
||||||
# define SIZEOF_CHARP 4
|
# error Building FAT binary for an unknown architecture.
|
||||||
# define SIZEOF_INT 4
|
# endif
|
||||||
# define SIZEOF_LONG 4
|
# if defined(__ppc__) || defined(__ppc64__)
|
||||||
# define SIZEOF_LONG_LONG 8
|
# define WORDS_BIGENDIAN
|
||||||
# define SIZEOF_OFF_T 8
|
# endif
|
||||||
# define SIZEOF_SHORT 2
|
#endif /* defined(__APPLE__) && defined(__MACH__) */
|
||||||
|
|
||||||
#else
|
|
||||||
# error Building FAT binary for an unknown architecture.
|
|
||||||
#endif
|
|
||||||
#endif /* TARGET_FAT_BINARY */
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -9836,16 +9836,23 @@ f2
|
||||||
two
|
two
|
||||||
SET sql_mode = 'traditional,ansi';
|
SET sql_mode = 'traditional,ansi';
|
||||||
CREATE OR REPLACE VIEW v1 AS
|
CREATE OR REPLACE VIEW v1 AS
|
||||||
|
SELECT f3 AS "pure column f3:", f1 + f3 AS "sum of columns f1 + f3 =",
|
||||||
|
3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1):",
|
||||||
|
'->' || CAST(f3 AS CHAR) || '<-'
|
||||||
|
AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR):"
|
||||||
|
FROM t1 WHERE f1 = 2;
|
||||||
|
CREATE OR REPLACE VIEW v1 AS
|
||||||
SELECT f3 AS "pure column f3: ", f1 + f3 AS "sum of columns f1 + f3 = ",
|
SELECT f3 AS "pure column f3: ", f1 + f3 AS "sum of columns f1 + f3 = ",
|
||||||
3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1): ",
|
3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1): ",
|
||||||
'->' || CAST(f3 AS CHAR) || '<-'
|
'->' || CAST(f3 AS CHAR) || '<-'
|
||||||
AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): "
|
AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): "
|
||||||
FROM t1 WHERE f1 = 2;
|
FROM t1 WHERE f1 = 2;
|
||||||
|
ERROR 42000: Incorrect column name 'pure column f3: '
|
||||||
SELECT * FROM v1;
|
SELECT * FROM v1;
|
||||||
pure column f3: 2.20000
|
pure column f3: 2.20000
|
||||||
sum of columns f1 + f3 = 4.20000
|
sum of columns f1 + f3 = 4.20000
|
||||||
product of constants 3 * (- 0.11111E+1): -3.3333
|
product of constants 3 * (- 0.11111E+1): -3.3333
|
||||||
expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<-
|
expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<-
|
||||||
SET sql_mode = '';
|
SET sql_mode = '';
|
||||||
|
|
||||||
Testcases 3.3.1.55 - 3.3.1.62
|
Testcases 3.3.1.55 - 3.3.1.62
|
||||||
|
|
|
@ -9841,16 +9841,23 @@ f2
|
||||||
two
|
two
|
||||||
SET sql_mode = 'traditional,ansi';
|
SET sql_mode = 'traditional,ansi';
|
||||||
CREATE OR REPLACE VIEW v1 AS
|
CREATE OR REPLACE VIEW v1 AS
|
||||||
|
SELECT f3 AS "pure column f3:", f1 + f3 AS "sum of columns f1 + f3 =",
|
||||||
|
3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1):",
|
||||||
|
'->' || CAST(f3 AS CHAR) || '<-'
|
||||||
|
AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR):"
|
||||||
|
FROM t1 WHERE f1 = 2;
|
||||||
|
CREATE OR REPLACE VIEW v1 AS
|
||||||
SELECT f3 AS "pure column f3: ", f1 + f3 AS "sum of columns f1 + f3 = ",
|
SELECT f3 AS "pure column f3: ", f1 + f3 AS "sum of columns f1 + f3 = ",
|
||||||
3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1): ",
|
3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1): ",
|
||||||
'->' || CAST(f3 AS CHAR) || '<-'
|
'->' || CAST(f3 AS CHAR) || '<-'
|
||||||
AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): "
|
AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): "
|
||||||
FROM t1 WHERE f1 = 2;
|
FROM t1 WHERE f1 = 2;
|
||||||
|
ERROR 42000: Incorrect column name 'pure column f3: '
|
||||||
SELECT * FROM v1;
|
SELECT * FROM v1;
|
||||||
pure column f3: 2.20000
|
pure column f3: 2.20000
|
||||||
sum of columns f1 + f3 = 4.20000
|
sum of columns f1 + f3 = 4.20000
|
||||||
product of constants 3 * (- 0.11111E+1): -3.3333
|
product of constants 3 * (- 0.11111E+1): -3.3333
|
||||||
expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<-
|
expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<-
|
||||||
SET sql_mode = '';
|
SET sql_mode = '';
|
||||||
|
|
||||||
Testcases 3.3.1.55 - 3.3.1.62
|
Testcases 3.3.1.55 - 3.3.1.62
|
||||||
|
|
|
@ -9858,16 +9858,23 @@ f2
|
||||||
two
|
two
|
||||||
SET sql_mode = 'traditional,ansi';
|
SET sql_mode = 'traditional,ansi';
|
||||||
CREATE OR REPLACE VIEW v1 AS
|
CREATE OR REPLACE VIEW v1 AS
|
||||||
|
SELECT f3 AS "pure column f3:", f1 + f3 AS "sum of columns f1 + f3 =",
|
||||||
|
3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1):",
|
||||||
|
'->' || CAST(f3 AS CHAR) || '<-'
|
||||||
|
AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR):"
|
||||||
|
FROM t1 WHERE f1 = 2;
|
||||||
|
CREATE OR REPLACE VIEW v1 AS
|
||||||
SELECT f3 AS "pure column f3: ", f1 + f3 AS "sum of columns f1 + f3 = ",
|
SELECT f3 AS "pure column f3: ", f1 + f3 AS "sum of columns f1 + f3 = ",
|
||||||
3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1): ",
|
3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1): ",
|
||||||
'->' || CAST(f3 AS CHAR) || '<-'
|
'->' || CAST(f3 AS CHAR) || '<-'
|
||||||
AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): "
|
AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): "
|
||||||
FROM t1 WHERE f1 = 2;
|
FROM t1 WHERE f1 = 2;
|
||||||
|
ERROR 42000: Incorrect column name 'pure column f3: '
|
||||||
SELECT * FROM v1;
|
SELECT * FROM v1;
|
||||||
pure column f3: 2.20000
|
pure column f3: 2.20000
|
||||||
sum of columns f1 + f3 = 4.20000
|
sum of columns f1 + f3 = 4.20000
|
||||||
product of constants 3 * (- 0.11111E+1): -3.3333
|
product of constants 3 * (- 0.11111E+1): -3.3333
|
||||||
expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<-
|
expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<-
|
||||||
SET sql_mode = '';
|
SET sql_mode = '';
|
||||||
|
|
||||||
Testcases 3.3.1.55 - 3.3.1.62
|
Testcases 3.3.1.55 - 3.3.1.62
|
||||||
|
|
|
@ -2410,6 +2410,15 @@ SELECT * FROM v1;
|
||||||
# 3.3.1.54
|
# 3.3.1.54
|
||||||
--vertical_results
|
--vertical_results
|
||||||
SET sql_mode = 'traditional,ansi';
|
SET sql_mode = 'traditional,ansi';
|
||||||
|
# due to bug#32496 "no trailing blanks in identifier".
|
||||||
|
CREATE OR REPLACE VIEW v1 AS
|
||||||
|
SELECT f3 AS "pure column f3:", f1 + f3 AS "sum of columns f1 + f3 =",
|
||||||
|
3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1):",
|
||||||
|
'->' || CAST(f3 AS CHAR) || '<-'
|
||||||
|
AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR):"
|
||||||
|
FROM t1 WHERE f1 = 2;
|
||||||
|
# This error is not conformant with ansi (see bug#32496). hhunger
|
||||||
|
--error ER_WRONG_COLUMN_NAME
|
||||||
CREATE OR REPLACE VIEW v1 AS
|
CREATE OR REPLACE VIEW v1 AS
|
||||||
SELECT f3 AS "pure column f3: ", f1 + f3 AS "sum of columns f1 + f3 = ",
|
SELECT f3 AS "pure column f3: ", f1 + f3 AS "sum of columns f1 + f3 = ",
|
||||||
3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1): ",
|
3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1): ",
|
||||||
|
|
|
@ -30,13 +30,15 @@ user=""
|
||||||
force=0
|
force=0
|
||||||
in_rpm=0
|
in_rpm=0
|
||||||
ip_only=0
|
ip_only=0
|
||||||
windows=0
|
cross_bootstrap=0
|
||||||
|
|
||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
Usage: $0 [OPTIONS]
|
Usage: $0 [OPTIONS]
|
||||||
--basedir=path The path to the MySQL installation directory.
|
--basedir=path The path to the MySQL installation directory.
|
||||||
|
--cross-bootstrap For internal use. Used when building the MySQL system
|
||||||
|
tables on a different host than the target.
|
||||||
--datadir=path The path to the MySQL data directory.
|
--datadir=path The path to the MySQL data directory.
|
||||||
--force Causes mysql_install_db to run even if DNS does not
|
--force Causes mysql_install_db to run even if DNS does not
|
||||||
work. In that case, grant table entries that normally
|
work. In that case, grant table entries that normally
|
||||||
|
@ -56,8 +58,6 @@ Usage: $0 [OPTIONS]
|
||||||
user. You must be root to use this option. By default
|
user. You must be root to use this option. By default
|
||||||
mysqld runs using your current login name and files and
|
mysqld runs using your current login name and files and
|
||||||
directories that it creates will be owned by you.
|
directories that it creates will be owned by you.
|
||||||
--windows For internal use. This option is used for creating
|
|
||||||
Windows distributions.
|
|
||||||
|
|
||||||
All other options are passed to the mysqld program
|
All other options are passed to the mysqld program
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ EOF
|
||||||
|
|
||||||
s_echo()
|
s_echo()
|
||||||
{
|
{
|
||||||
if test "$in_rpm" -eq 0 -a "$windows" -eq 0
|
if test "$in_rpm" -eq 0 -a "$cross_bootstrap" -eq 0
|
||||||
then
|
then
|
||||||
echo "$1"
|
echo "$1"
|
||||||
fi
|
fi
|
||||||
|
@ -109,16 +109,17 @@ parse_arguments()
|
||||||
--no-defaults|--defaults-file=*|--defaults-extra-file=*)
|
--no-defaults|--defaults-file=*|--defaults-extra-file=*)
|
||||||
defaults="$arg" ;;
|
defaults="$arg" ;;
|
||||||
|
|
||||||
--windows)
|
--cross-bootstrap|--windows)
|
||||||
# This is actually a "cross bootstrap" argument used when
|
# Used when building the MySQL system tables on a different host than
|
||||||
# building the MySQL system tables on a different host
|
# the target. The platform-independent files that are created in
|
||||||
# than the target. The platform independent
|
# --datadir on the host can be copied to the target system.
|
||||||
# files that are created in --datadir on the host can
|
#
|
||||||
# be copied to the target system, the most common use for
|
# The most common use for this feature is in the Windows installer
|
||||||
# this feature is in the windows installer which will take
|
# which will take the files from datadir and include them as part of
|
||||||
# the files from datadir and include them as part of the install
|
# the install package. See top-level 'dist-hook' make target.
|
||||||
# package.
|
#
|
||||||
windows=1 ;;
|
# --windows is a deprecated alias
|
||||||
|
cross_bootstrap=1 ;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
if test -n "$pick_args"
|
if test -n "$pick_args"
|
||||||
|
@ -181,14 +182,14 @@ parse_arguments PICK-ARGS-FROM-ARGV "$@"
|
||||||
if test -n "$basedir"
|
if test -n "$basedir"
|
||||||
then
|
then
|
||||||
print_defaults=`find_in_basedir my_print_defaults bin extra`
|
print_defaults=`find_in_basedir my_print_defaults bin extra`
|
||||||
if ! test -x "$print_defaults"
|
if test ! -x "$print_defaults"
|
||||||
then
|
then
|
||||||
missing_in_basedir my_print_defaults
|
missing_in_basedir my_print_defaults
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
print_defaults="@bindir@/my_print_defaults"
|
print_defaults="@bindir@/my_print_defaults"
|
||||||
if ! test -x "$print_defaults"
|
if test ! -x "$print_defaults"
|
||||||
then
|
then
|
||||||
echo "FATAL ERROR: Could not find $print_defaults"
|
echo "FATAL ERROR: Could not find $print_defaults"
|
||||||
echo
|
echo
|
||||||
|
@ -213,8 +214,8 @@ then
|
||||||
pkgdatadir="@pkgdatadir@"
|
pkgdatadir="@pkgdatadir@"
|
||||||
else
|
else
|
||||||
bindir="$basedir/bin"
|
bindir="$basedir/bin"
|
||||||
# We set up bootstrap-specific paths later, so skip this for --windows
|
# We set up bootstrap-specific paths later, so skip this for now
|
||||||
if test "$windows" -eq 0
|
if test "$cross_bootstrap" -eq 0
|
||||||
then
|
then
|
||||||
pkgdatadir=`find_in_basedir --dir fill_help_tables.sql share share/mysql`
|
pkgdatadir=`find_in_basedir --dir fill_help_tables.sql share share/mysql`
|
||||||
if test -z "$pkgdatadir"
|
if test -z "$pkgdatadir"
|
||||||
|
@ -223,7 +224,7 @@ else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
mysqld=`find_in_basedir mysqld libexec sbin bin`
|
mysqld=`find_in_basedir mysqld libexec sbin bin`
|
||||||
if ! test -x "$mysqld"
|
if test ! -x "$mysqld"
|
||||||
then
|
then
|
||||||
missing_in_basedir mysqld
|
missing_in_basedir mysqld
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -256,8 +257,8 @@ do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Set up Windows-specific paths
|
# Set up bootstrap-specific paths
|
||||||
if test "$windows" -eq 1
|
if test "$cross_bootstrap" -eq 1
|
||||||
then
|
then
|
||||||
mysqld="./sql/mysqld"
|
mysqld="./sql/mysqld"
|
||||||
if test -n "$srcdir" -a -f "$srcdir/sql/share/english/errmsg.sys"
|
if test -n "$srcdir" -a -f "$srcdir/sql/share/english/errmsg.sys"
|
||||||
|
@ -280,7 +281,7 @@ fi
|
||||||
hostname=`@HOSTNAME@`
|
hostname=`@HOSTNAME@`
|
||||||
|
|
||||||
# Check if hostname is valid
|
# Check if hostname is valid
|
||||||
if test "$windows" -eq 0 -a "$in_rpm" -eq 0 -a "$force" -eq 0
|
if test "$cross_bootstrap" -eq 0 -a "$in_rpm" -eq 0 -a "$force" -eq 0
|
||||||
then
|
then
|
||||||
resolved=`$bindir/resolveip $hostname 2>&1`
|
resolved=`$bindir/resolveip $hostname 2>&1`
|
||||||
if [ $? -ne 0 ]
|
if [ $? -ne 0 ]
|
||||||
|
@ -329,6 +330,16 @@ then
|
||||||
args="$args --user=$user"
|
args="$args --user=$user"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# When doing a "cross bootstrap" install, no reference to the current
|
||||||
|
# host should be added to the system tables. So we filter out any
|
||||||
|
# lines which contain the current host name.
|
||||||
|
if test $cross_bootstrap -eq 1
|
||||||
|
then
|
||||||
|
filter_cmd_line="sed -e '/@current_hostname/d'"
|
||||||
|
else
|
||||||
|
filter_cmd_line="cat"
|
||||||
|
fi
|
||||||
|
|
||||||
# Peform the install of system tables
|
# Peform the install of system tables
|
||||||
mysqld_bootstrap="${MYSQLD_BOOTSTRAP-$mysqld}"
|
mysqld_bootstrap="${MYSQLD_BOOTSTRAP-$mysqld}"
|
||||||
mysqld_install_cmd_line="$mysqld_bootstrap $defaults $mysqld_opt --bootstrap \
|
mysqld_install_cmd_line="$mysqld_bootstrap $defaults $mysqld_opt --bootstrap \
|
||||||
|
@ -337,15 +348,14 @@ mysqld_install_cmd_line="$mysqld_bootstrap $defaults $mysqld_opt --bootstrap \
|
||||||
|
|
||||||
# Pipe mysql_system_tables.sql to "mysqld --bootstrap"
|
# Pipe mysql_system_tables.sql to "mysqld --bootstrap"
|
||||||
s_echo "Installing MySQL system tables..."
|
s_echo "Installing MySQL system tables..."
|
||||||
if `(echo "use mysql;"; cat $create_system_tables $fill_system_tables) | $mysqld_install_cmd_line`
|
if { echo "use mysql;"; cat $create_system_tables $fill_system_tables; } | eval "$filter_cmd_line" | $mysqld_install_cmd_line > /dev/null
|
||||||
then
|
then
|
||||||
s_echo "OK"
|
s_echo "OK"
|
||||||
|
|
||||||
s_echo "Filling help tables..."
|
s_echo "Filling help tables..."
|
||||||
# Pipe fill_help_tables.sql to "mysqld --bootstrap"
|
# Pipe fill_help_tables.sql to "mysqld --bootstrap"
|
||||||
if `(echo "use mysql;"; cat $fill_help_tables) | $mysqld_install_cmd_line`
|
if { echo "use mysql;"; cat $fill_help_tables; } | $mysqld_install_cmd_line > /dev/null
|
||||||
then
|
then
|
||||||
# Fill suceeded
|
|
||||||
s_echo "OK"
|
s_echo "OK"
|
||||||
else
|
else
|
||||||
echo
|
echo
|
||||||
|
@ -359,14 +369,12 @@ then
|
||||||
s_echo "support-files/mysql.server to the right place for your system"
|
s_echo "support-files/mysql.server to the right place for your system"
|
||||||
s_echo
|
s_echo
|
||||||
|
|
||||||
if test "$windows" -eq 0
|
if test "$cross_bootstrap" -eq 0
|
||||||
then
|
then
|
||||||
# A root password should of course also be set on Windows!
|
# This is not a true installation on a running system. The end user must
|
||||||
# The reason for not displaying these prompts here is that when
|
# set a password after installing the data files on the real host system.
|
||||||
# executing this script with the --windows argument the script
|
# At this point, there is no end user, so it does not make sense to print
|
||||||
# is used to generate system tables mainly used by the
|
# this reminder.
|
||||||
# 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 "PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !"
|
||||||
echo "To do so, start the server, then issue the following commands:"
|
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 password 'new-password'"
|
||||||
|
|
|
@ -2,6 +2,12 @@
|
||||||
-- The inital data for system tables of MySQL Server
|
-- The inital data for system tables of MySQL Server
|
||||||
--
|
--
|
||||||
|
|
||||||
|
-- When setting up a "cross bootstrap" database (e.g., creating data on a Unix
|
||||||
|
-- host which will later be included in a Windows zip file), any lines
|
||||||
|
-- containing "@current_hostname" are filtered out by mysql_install_db.
|
||||||
|
set @current_hostname= @@hostname;
|
||||||
|
|
||||||
|
|
||||||
-- Fill "db" table with default grants for anyone to
|
-- Fill "db" table with default grants for anyone to
|
||||||
-- access database 'test' and 'test_%' if "db" table didn't exist
|
-- access database 'test' and 'test_%' if "db" table didn't exist
|
||||||
CREATE TEMPORARY TABLE tmp_db LIKE db;
|
CREATE TEMPORARY TABLE tmp_db LIKE db;
|
||||||
|
@ -15,10 +21,9 @@ DROP TABLE tmp_db;
|
||||||
-- from local machine if "users" table didn't exist before
|
-- from local machine if "users" table didn't exist before
|
||||||
CREATE TEMPORARY TABLE tmp_user LIKE user;
|
CREATE TEMPORARY TABLE tmp_user LIKE user;
|
||||||
INSERT INTO tmp_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);
|
INSERT INTO tmp_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);
|
||||||
set @hostname= @@hostname;
|
REPLACE INTO tmp_user VALUES (@current_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 tmp_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 tmp_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);
|
REPLACE INTO tmp_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);
|
||||||
INSERT INTO tmp_user (host,user) VALUES ('localhost','');
|
INSERT INTO tmp_user (host,user) VALUES ('localhost','');
|
||||||
INSERT INTO tmp_user (host,user) VALUES (@@hostname,'');
|
INSERT INTO tmp_user (host,user) VALUES (@current_hostname,'');
|
||||||
INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0;
|
INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0;
|
||||||
DROP TABLE tmp_user;
|
DROP TABLE tmp_user;
|
||||||
|
|
Loading…
Add table
Reference in a new issue