Commit d894ca49 authored by unknown's avatar unknown

Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.0

into sinisa.nasamreza.org:/mnt/work/mysql-4.0

parents 7e50f032 f6940525
#!/usr/bin/perl -w
use Getopt::Long;
$opt_help=0;
$opt_tarball=$opt_builddir="";
GetOptions(
"help",
"tarball=s",
"builddir=s",
) || print_help();
print_help() if ($opt_help);
chomp($MSDEV=`which msdev`);
if (!$opt_builddir) {
$opt_builddir = "/cygdrive/c/mysql-win-build";
}
$opt_tarball =~ /(mysql[^\/]*)-win-src\.tar/;
$mysqlver=$1;
$basedir = "$opt_builddir/$mysqlver";
# Make sure build dir exists
mkdir($opt_builddir);
# Clean out any previous build
system("rm -rf $basedir");
mkdir($basedir);
mkdir("$basedir/tarball");
system("cp $opt_tarball $basedir/tarball");
if (!chdir($basedir))
{
print "Do-win-build error: Could not change to $opt_builddir";
exit 1;
}
mkdir("build");
chdir("build");
system("tar -zxvf ../tarball/$mysqlver-win-src.tar.gz");
chdir($mysqlver);
system("\"$MSDEV\" mysql.dsw /MAKE \"ALL\" /OUT $mysqlver-build.log");
#
# Print a help text message
#
sub print_help
{
print <<EOF;
Usage: Do-compile-win [options] source-tarball
Unpacks a Windows source distribution on the local machine and
compiles it using VC++ 6.0.
This script is intended for Cygwin Perl. You must have a working
MSDEV.EXE in your path for compilation.
Options:
--help
Print this text.
--builddir=<dir>
Set the Cygwin path to build under; the tarball will actually
be moved to <builddir>/mysql-<version>/tarball and extracted under
<builddir>/mysql-<version>/build.
Default: /cygdrive/c/mysql-win-build
--tarball=<file>
Windows source tarball to use for this build. Must be of the form
mysql[com]-x.x.x-win-src.tar.gz (REQUIRED)
EOF
exit 1;
}
...@@ -682,14 +682,6 @@ row_ins_foreign_check_on_constraint( ...@@ -682,14 +682,6 @@ row_ins_foreign_check_on_constraint(
(DICT_FOREIGN_ON_DELETE_CASCADE (DICT_FOREIGN_ON_DELETE_CASCADE
| DICT_FOREIGN_ON_DELETE_SET_NULL))) { | DICT_FOREIGN_ON_DELETE_SET_NULL))) {
/* No action is defined: return a foreign key error if
NO ACTION is not specified */
if (foreign->type & DICT_FOREIGN_ON_DELETE_NO_ACTION) {
return(DB_SUCCESS);
}
row_ins_foreign_report_err((char*)"Trying to delete", row_ins_foreign_report_err((char*)"Trying to delete",
thr, foreign, thr, foreign,
btr_pcur_get_rec(pcur), entry); btr_pcur_get_rec(pcur), entry);
...@@ -703,14 +695,6 @@ row_ins_foreign_check_on_constraint( ...@@ -703,14 +695,6 @@ row_ins_foreign_check_on_constraint(
/* This is an UPDATE */ /* This is an UPDATE */
/* No action is defined: return a foreign key error if
NO ACTION is not specified */
if (foreign->type & DICT_FOREIGN_ON_UPDATE_NO_ACTION) {
return(DB_SUCCESS);
}
row_ins_foreign_report_err((char*)"Trying to update", row_ins_foreign_report_err((char*)"Trying to update",
thr, foreign, thr, foreign,
btr_pcur_get_rec(pcur), entry); btr_pcur_get_rec(pcur), entry);
......
...@@ -840,9 +840,11 @@ int _mi_key_cmp(register MI_KEYSEG *keyseg, register uchar *a, ...@@ -840,9 +840,11 @@ int _mi_key_cmp(register MI_KEYSEG *keyseg, register uchar *a,
break; break;
case HA_KEYTYPE_VARTEXT: case HA_KEYTYPE_VARTEXT:
{ {
int a_length,b_length,pack_length; int a_length,full_a_length,b_length,full_b_length,pack_length;
get_key_length(a_length,a); get_key_length(a_length,a);
get_key_pack_length(b_length,pack_length,b); get_key_pack_length(b_length,pack_length,b);
full_a_length=a_length;
full_b_length=b_length;
next_key_length=key_length-b_length-pack_length; next_key_length=key_length-b_length-pack_length;
if (!(nextflag & (SEARCH_PREFIX | SEARCH_UPDATE))) if (!(nextflag & (SEARCH_PREFIX | SEARCH_UPDATE)))
...@@ -857,8 +859,8 @@ int _mi_key_cmp(register MI_KEYSEG *keyseg, register uchar *a, ...@@ -857,8 +859,8 @@ int _mi_key_cmp(register MI_KEYSEG *keyseg, register uchar *a,
(my_bool) ((nextflag & SEARCH_PREFIX) && (my_bool) ((nextflag & SEARCH_PREFIX) &&
next_key_length <= 0)))) next_key_length <= 0))))
return ((keyseg->flag & HA_REVERSE_SORT) ? -flag : flag); return ((keyseg->flag & HA_REVERSE_SORT) ? -flag : flag);
a+=a_length; a+=full_a_length;
b+=b_length; b+=full_b_length;
break; break;
} }
break; break;
...@@ -963,7 +965,7 @@ int _mi_key_cmp(register MI_KEYSEG *keyseg, register uchar *a, ...@@ -963,7 +965,7 @@ int _mi_key_cmp(register MI_KEYSEG *keyseg, register uchar *a,
if (keyseg->flag & HA_REVERSE_SORT) if (keyseg->flag & HA_REVERSE_SORT)
{ {
swap(uchar*,a,b); swap(uchar*,a,b);
swap_flag=1; /* Remember swap of a & b */ swap_flag=1; /* Remember swap of a & b */
end= a+ (int) (end-b); end= a+ (int) (end-b);
} }
......
...@@ -173,3 +173,21 @@ Unknown column 'W' in 'field list' ...@@ -173,3 +173,21 @@ Unknown column 'W' in 'field list'
handler t1 read a=(a); handler t1 read a=(a);
Wrong arguments to HANDLER ... READ Wrong arguments to HANDLER ... READ
drop table t1; drop table t1;
create table t1 (a char(5));
insert into t1 values ("Ok");
handler t1 open as t;
handler t read first;
a
Ok
use mysql;
handler t read first;
a
Ok
handler t close;
handler test.t1 open as t;
handler t read first;
a
Ok
handler t close;
use test;
drop table t1;
...@@ -300,3 +300,11 @@ SELECT COUNT(*) FROM t1 WHERE (c=0 and b=1) or (c=0 and a=1); ...@@ -300,3 +300,11 @@ SELECT COUNT(*) FROM t1 WHERE (c=0 and b=1) or (c=0 and a=1);
COUNT(*) COUNT(*)
6 6
DROP TABLE t1; DROP TABLE t1;
create table t1(a text not null, b text not null, c text not null, index (a(10),b(10),c(10)));
insert into t1 values('807780', '477', '165');
insert into t1 values('807780', '477', '162');
insert into t1 values('807780', '472', '162');
select * from t1 where a='807780' and b='477' and c='165';
a b c
807780 477 165
drop table t1;
...@@ -107,3 +107,19 @@ handler t1 read a=(W); ...@@ -107,3 +107,19 @@ handler t1 read a=(W);
handler t1 read a=(a); handler t1 read a=(a);
drop table t1; drop table t1;
#
# BUG#2304
#
create table t1 (a char(5));
insert into t1 values ("Ok");
handler t1 open as t;
handler t read first;
use mysql;
handler t read first;
handler t close;
handler test.t1 open as t;
handler t read first;
handler t close;
use test;
drop table t1;
...@@ -248,3 +248,15 @@ INSERT INTO t1 VALUES (0,1,0),(0,1,0),(0,1,0); ...@@ -248,3 +248,15 @@ INSERT INTO t1 VALUES (0,1,0),(0,1,0),(0,1,0);
SELECT COUNT(*) FROM t1 WHERE (c=0 and a=1) or (c=0 and b=1); SELECT COUNT(*) FROM t1 WHERE (c=0 and a=1) or (c=0 and b=1);
SELECT COUNT(*) FROM t1 WHERE (c=0 and b=1) or (c=0 and a=1); SELECT COUNT(*) FROM t1 WHERE (c=0 and b=1) or (c=0 and a=1);
DROP TABLE t1; DROP TABLE t1;
#
# BUG#2295 - range on blob
#
create table t1(a text not null, b text not null, c text not null, index (a(10),b(10),c(10)));
insert into t1 values('807780', '477', '165');
insert into t1 values('807780', '477', '162');
insert into t1 values('807780', '472', '162');
select * from t1 where a='807780' and b='477' and c='165';
drop table t1;
#! /bin/sh #! /bin/sh
# debug # debug
#set -x #set -x
...@@ -46,6 +46,9 @@ make clean config.h ...@@ -46,6 +46,9 @@ make clean config.h
(cd sql; make gen_lex_hash) (cd sql; make gen_lex_hash)
(cd strings; make conf_to_src) (cd strings; make conf_to_src)
# so the file will be linked
(cd sql; make sql_yacc.cc)
# copying required linux tools # copying required linux tools
cp extra/comp_err extra/comp_err.linux cp extra/comp_err extra/comp_err.linux
cp libmysql/conf_to_src libmysql/conf_to_src.linux cp libmysql/conf_to_src libmysql/conf_to_src.linux
......
#! /bin/sh #! /bin/sh
# debug # debug
#set -x #set -x
...@@ -29,7 +29,7 @@ rm -rf Makefile.in.bk ...@@ -29,7 +29,7 @@ rm -rf Makefile.in.bk
make clean bin-dist make clean bin-dist
# mark the build # mark the build
for file in *.tar.gz for file in *.tar.gz *.zip
do do
if (expr "$file" : "mysql-[1-9].*" > /dev/null) if (expr "$file" : "mysql-[1-9].*" > /dev/null)
then then
......
...@@ -8,6 +8,7 @@ set -e ...@@ -8,6 +8,7 @@ set -e
path=`dirname $0` path=`dirname $0`
$path/compile-netware-src
$path/compile-netware-standard $path/compile-netware-standard
$path/compile-netware-debug $path/compile-netware-debug
#$path/compile-netware-max #$path/compile-netware-max
......
...@@ -13,7 +13,7 @@ path=`dirname $0` ...@@ -13,7 +13,7 @@ path=`dirname $0`
suffix="standard" suffix="standard"
extra_configs=" \ extra_configs=" \
--with-innodb --with-innodb \
" "
. $path/compile-netware-END . $path/compile-netware-END
......
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
# the default is "F:/mydev" # the default is "F:/mydev"
export MYDEV="WINE_BUILD_DIR" export MYDEV="WINE_BUILD_DIR"
export MWCNWx86Includes="$MYDEV/libc/include" export MWCNWx86Includes="$MYDEV/libc/include;$MYDEV"
export MWNWx86Libraries="$MYDEV/libc/imports;$MYDEV/mw/lib" export MWNWx86Libraries="$MYDEV/libc/imports;$MYDEV/mw/lib;$MYDEV/mysql-VERSION/netware/BUILD"
export MWNWx86LibraryFiles="libcpre.o;libc.imp;netware.imp;mwcrtl.lib;mwcpp.lib" export MWNWx86LibraryFiles="libcpre.o;libc.imp;netware.imp;mwcrtl.lib;mwcpp.lib;knetware.imp"
export WINEPATH="$MYDEV/mw/bin" export WINEPATH="$MYDEV/mw/bin"
...@@ -19,11 +19,11 @@ export AR='mwldnlm' ...@@ -19,11 +19,11 @@ export AR='mwldnlm'
export AR_FLAGS='-type library -o' export AR_FLAGS='-type library -o'
export AS='mwasmnlm' export AS='mwasmnlm'
export CC='mwccnlm -gccincludes' export CC='mwccnlm -gccincludes'
export CFLAGS='-dialect c -proc 686 -relax_pointers' export CFLAGS='-align 8 -proc 686 -relax_pointers -dialect c'
export CXX='mwccnlm -gccincludes' export CXX='mwccnlm -gccincludes'
export CXXFLAGS='-dialect c++ -proc 686 -bool on -wchar_t on -relax_pointers -D_WCHAR_T' export CXXFLAGS='-align 8 -proc 686 -relax_pointers -dialect c++ -bool on -wchar_t on -D_WCHAR_T'
export LD='mwldnlm' export LD='mwldnlm'
export LDFLAGS='-entry _LibCPrelude -exit _LibCPostlude -flags pseudopreemption' export LDFLAGS='-entry _LibCPrelude -exit _LibCPostlude -map -flags pseudopreemption'
export RANLIB=: export RANLIB=:
export STRIP=: export STRIP=:
...@@ -11,7 +11,7 @@ path=`dirname $0` ...@@ -11,7 +11,7 @@ path=`dirname $0`
# repository direcotry # repository direcotry
repo_dir=`pwd` repo_dir=`pwd`
# build direcotry # build directory
build_dir="$HOME/mydev" build_dir="$HOME/mydev"
wine_build_dir="F:/mydev" wine_build_dir="F:/mydev"
...@@ -147,10 +147,12 @@ then ...@@ -147,10 +147,12 @@ then
fi fi
# make files writeable # make files writeable
echo "making files writable..."
cd $target_dir cd $target_dir
chmod -R u+rw,g+rw . chmod -R u+rw,g+rw .
# edit the mvenv file # edit the mvenv file
echo "updating the mwenv environment file..."
mwenv="./netware/BUILD/mwenv" mwenv="./netware/BUILD/mwenv"
mv -f $mwenv $mwenv.org mv -f $mwenv $mwenv.org
sed -e "s;WINE_BUILD_DIR;$wine_build_dir;g" \ sed -e "s;WINE_BUILD_DIR;$wine_build_dir;g" \
...@@ -158,6 +160,17 @@ sed -e "s;WINE_BUILD_DIR;$wine_build_dir;g" \ ...@@ -158,6 +160,17 @@ sed -e "s;WINE_BUILD_DIR;$wine_build_dir;g" \
-e "s;VERSION;$version;g" $mwenv.org > $mwenv -e "s;VERSION;$version;g" $mwenv.org > $mwenv
chmod +rwx $mwenv chmod +rwx $mwenv
# edit the def file versions
echo "updating *.def file versions..."
nlm_version=`echo "$version" | sed -e "s;\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*;\1, \2, \3;"`
for file in ./netware/*.def
do
mv -f $file $file.org
sed -e "s;VERSION.*;VERSION $nlm_version;g" $file.org > $file
rm $file.org
done
# build linux tools # build linux tools
echo "compiling linux tools..." echo "compiling linux tools..."
./netware/BUILD/compile-linux-tools ./netware/BUILD/compile-linux-tools
......
# Copyright (c) 2002 Novell, Inc. All Rights Reserved. # Copyright (c) 2002 Novell, Inc. All Rights Reserved.
# #
# This program is free software; you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License as published by
...@@ -20,7 +20,7 @@ mysqld_safe_SOURCES= mysqld_safe.c my_manage.c ...@@ -20,7 +20,7 @@ mysqld_safe_SOURCES= mysqld_safe.c my_manage.c
mysql_install_db_SOURCES= mysql_install_db.c my_manage.c mysql_install_db_SOURCES= mysql_install_db.c my_manage.c
mysql_test_run_SOURCES= mysql_test_run.c my_manage.c mysql_test_run_SOURCES= mysql_test_run.c my_manage.c
libmysql_SOURCES= libmysqlmain.c libmysql_SOURCES= libmysqlmain.c
libmysql_LDADD = ../libmysql/.libs/libmysqlclient.a libmysql_LDADD = ../libmysql/.libs/libmysqlclient.a @openssl_libs@
netware_build_files = client/mysql.def client/mysqladmin.def \ netware_build_files = client/mysql.def client/mysqladmin.def \
client/mysqlbinlog.def client/mysqlcheck.def \ client/mysqlbinlog.def client/mysqlcheck.def \
...@@ -29,12 +29,12 @@ netware_build_files = client/mysql.def client/mysqladmin.def \ ...@@ -29,12 +29,12 @@ netware_build_files = client/mysql.def client/mysqladmin.def \
extra/mysql_install.def extra/my_print_defaults.def \ extra/mysql_install.def extra/my_print_defaults.def \
extra/perror.def extra/replace.def \ extra/perror.def extra/replace.def \
extra/resolveip.def extra/comp_err.def \ extra/resolveip.def extra/comp_err.def \
isam/isamchk.def \ isam/isamchk.def \
isam/isamlog.def isam/pack_isam.def \ isam/isamlog.def isam/pack_isam.def \
libmysqld/libmysqld.def myisam/myisamchk.def \ libmysqld/libmysqld.def myisam/myisamchk.def \
myisam/myisamlog.def myisam/myisampack.def \ myisam/myisamlog.def myisam/myisampack.def \
sql/mysqld.def sql/mysqld.def
link_sources: link_sources:
set -x; \ set -x; \
for f in $(netware_build_files); do \ for f in $(netware_build_files); do \
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# ISAM Check # ISAM Check
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
SCREENNAME "MySQL ISAM Table Check Tool"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL ISAM Table Check Tool" DESCRIPTION "MySQL ISAM Table Check Tool"
VERSION 4, 0 VERSION 4, 0
......
...@@ -157,7 +157,7 @@ int sleep_until_file_deleted(char *pid_file) ...@@ -157,7 +157,7 @@ int sleep_until_file_deleted(char *pid_file)
/****************************************************************************** /******************************************************************************
sleep_until_file_exists() sleep_until_file_exists()
Sleep until the given file exists. Sleep until the given file exists.
******************************************************************************/ ******************************************************************************/
...@@ -199,9 +199,13 @@ int wait_for_server_start(char *bin_dir, char *user, char *password, int port) ...@@ -199,9 +199,13 @@ int wait_for_server_start(char *bin_dir, char *user, char *password, int port)
add_arg(&al, "--user=%s", user); add_arg(&al, "--user=%s", user);
add_arg(&al, "--password=%s", password); add_arg(&al, "--password=%s", password);
add_arg(&al, "--silent"); add_arg(&al, "--silent");
/** Not supported on NetWare
add_arg(&al, "-O"); add_arg(&al, "-O");
add_arg(&al, "connect_timeout=10"); add_arg(&al, "connect_timeout=10");
add_arg(&al, "-w"); add_arg(&al, "-w");
**/
add_arg(&al, "--host=localhost"); add_arg(&al, "--host=localhost");
add_arg(&al, "ping"); add_arg(&al, "ping");
...@@ -210,7 +214,7 @@ int wait_for_server_start(char *bin_dir, char *user, char *password, int port) ...@@ -210,7 +214,7 @@ int wait_for_server_start(char *bin_dir, char *user, char *password, int port)
for(i = 0; (i < TRY_MAX) for(i = 0; (i < TRY_MAX)
&& (err = spawn(mysqladmin_file, &al, TRUE, NULL, && (err = spawn(mysqladmin_file, &al, TRUE, NULL,
trash, NULL)); i++) sleep(1); trash, NULL)); i++) sleep(1);
// free args // free args
free_args(&al); free_args(&al);
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# MyISAM Check # MyISAM Check
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
SCREENNAME "MySQL MyISAM Table Check Tool"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL MyISAM Table Check Tool" DESCRIPTION "MySQL MyISAM Table Check Tool"
VERSION 4, 0 VERSION 4, 0
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# MyISAM Log # MyISAM Log
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
SCREENNAME "MySQL MyISAM Table Log Tool"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL MyISAM Table Log Tool" DESCRIPTION "MySQL MyISAM Table Log Tool"
VERSION 4, 0 VERSION 4, 0
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# MyISAM Pack # MyISAM Pack
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
SCREENNAME "MySQL MyISAM Table Pack Tool"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL MyISAM Table Pack Tool" DESCRIPTION "MySQL MyISAM Table Pack Tool"
VERSION 4, 0 VERSION 4, 0
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/mode.h>
#include "my_config.h" #include "my_config.h"
#include "my_manage.h" #include "my_manage.h"
...@@ -94,6 +95,13 @@ char slave_master_info[PATH_MAX] = ""; ...@@ -94,6 +95,13 @@ char slave_master_info[PATH_MAX] = "";
char master_init_script[PATH_MAX] = ""; char master_init_script[PATH_MAX] = "";
char slave_init_script[PATH_MAX] = ""; char slave_init_script[PATH_MAX] = "";
// OpenSSL
char ca_cert[PATH_MAX];
char server_cert[PATH_MAX];
char server_key[PATH_MAX];
char client_cert[PATH_MAX];
char client_key[PATH_MAX];
int total_skip = 0; int total_skip = 0;
int total_pass = 0; int total_pass = 0;
int total_fail = 0; int total_fail = 0;
...@@ -101,6 +109,7 @@ int total_test = 0; ...@@ -101,6 +109,7 @@ int total_test = 0;
double total_time = 0; double total_time = 0;
int use_openssl = FALSE;
int master_running = FALSE; int master_running = FALSE;
int slave_running = FALSE; int slave_running = FALSE;
int skip_slave = TRUE; int skip_slave = TRUE;
...@@ -184,7 +193,7 @@ void install_db(char *datadir) ...@@ -184,7 +193,7 @@ void install_db(char *datadir)
char input[PATH_MAX]; char input[PATH_MAX];
char output[PATH_MAX]; char output[PATH_MAX];
char error[PATH_MAX]; char error[PATH_MAX];
// input file // input file
snprintf(input, PATH_MAX, "%s/bin/init_db.sql", base_dir); snprintf(input, PATH_MAX, "%s/bin/init_db.sql", base_dir);
snprintf(output, PATH_MAX, "%s/install.out", datadir); snprintf(output, PATH_MAX, "%s/install.out", datadir);
...@@ -193,13 +202,14 @@ void install_db(char *datadir) ...@@ -193,13 +202,14 @@ void install_db(char *datadir)
// args // args
init_args(&al); init_args(&al);
add_arg(&al, mysqld_file); add_arg(&al, mysqld_file);
add_arg(&al, "--no-defaults");
add_arg(&al, "--bootstrap"); add_arg(&al, "--bootstrap");
add_arg(&al, "--skip-grant-tables"); add_arg(&al, "--skip-grant-tables");
add_arg(&al, "--basedir=%s", base_dir); add_arg(&al, "--basedir=%s", base_dir);
add_arg(&al, "--datadir=%s", datadir); add_arg(&al, "--datadir=%s", datadir);
add_arg(&al, "--skip-innodb"); add_arg(&al, "--skip-innodb");
add_arg(&al, "--skip-bdb"); add_arg(&al, "--skip-bdb");
// spawn // spawn
if ((err = spawn(mysqld_file, &al, TRUE, input, output, error)) != 0) if ((err = spawn(mysqld_file, &al, TRUE, input, output, error)) != 0)
{ {
...@@ -266,15 +276,16 @@ void start_master() ...@@ -266,15 +276,16 @@ void start_master()
int err, i; int err, i;
char master_out[PATH_MAX]; char master_out[PATH_MAX];
char master_err[PATH_MAX]; char master_err[PATH_MAX];
char temp[PATH_MAX], temp2[PATH_MAX];
// remove old berkeley db log files that can confuse the server // remove old berkeley db log files that can confuse the server
removef("%s/log.*", master_dir); removef("%s/log.*", master_dir);
// remove stale binary logs // remove stale binary logs
removef("%s/*-bin.*", master_dir); removef("%s/var/log/*-bin.*", mysql_test_dir);
// remove stale binary logs // remove stale binary logs
removef("%s/*.index", master_dir); removef("%s/var/log/*.index", mysql_test_dir);
// remove master.info file // remove master.info file
removef("%s/master.info", master_dir); removef("%s/master.info", master_dir);
...@@ -284,11 +295,26 @@ void start_master() ...@@ -284,11 +295,26 @@ void start_master()
// remove relay-log.info file // remove relay-log.info file
removef("%s/relay-log.info", master_dir); removef("%s/relay-log.info", master_dir);
// init script // init script
if (master_init_script[0] != NULL) if (master_init_script[0] != NULL)
{ {
// run_init_script(master_init_script); // run_init_script(master_init_script);
// TODO: use the scripts
if (strindex(master_init_script, "repair_part2-master.sh") != NULL)
{
FILE *fp;
// create an empty index file
snprintf(temp, PATH_MAX, "%s/test/t1.MYI", master_dir);
fp = fopen(temp, "wb+");
fputs("1", fp);
fclose(fp);
}
} }
// redirection files // redirection files
...@@ -296,12 +322,17 @@ void start_master() ...@@ -296,12 +322,17 @@ void start_master()
mysql_test_dir, restarts); mysql_test_dir, restarts);
snprintf(master_err, PATH_MAX, "%s/var/run/master%u.err", snprintf(master_err, PATH_MAX, "%s/var/run/master%u.err",
mysql_test_dir, restarts); mysql_test_dir, restarts);
snprintf(temp2,PATH_MAX,"%s/var",mysql_test_dir);
mkdir(temp2,0);
snprintf(temp2,PATH_MAX,"%s/var/log",mysql_test_dir);
mkdir(temp2,0);
// args // args
init_args(&al); init_args(&al);
add_arg(&al, "%s", mysqld_file); add_arg(&al, "%s", mysqld_file);
add_arg(&al, "--no-defaults"); add_arg(&al, "--no-defaults");
add_arg(&al, "--log-bin=master-bin"); add_arg(&al, "--log-bin=%s/var/log/master-bin",mysql_test_dir);
add_arg(&al, "--server-id=1"); add_arg(&al, "--server-id=1");
add_arg(&al, "--basedir=%s", base_dir); add_arg(&al, "--basedir=%s", base_dir);
add_arg(&al, "--port=%u", master_port); add_arg(&al, "--port=%u", master_port);
...@@ -312,11 +343,18 @@ void start_master() ...@@ -312,11 +343,18 @@ void start_master()
add_arg(&al, "--character-sets-dir=%s", char_dir); add_arg(&al, "--character-sets-dir=%s", char_dir);
add_arg(&al, "--tmpdir=%s", mysql_tmp_dir); add_arg(&al, "--tmpdir=%s", mysql_tmp_dir);
add_arg(&al, "--language=%s", lang_dir); add_arg(&al, "--language=%s", lang_dir);
if (use_openssl)
{
add_arg(&al, "--ssl-ca=%s", ca_cert);
add_arg(&al, "--ssl-cert=%s", server_cert);
add_arg(&al, "--ssl-key=%s", server_key);
}
// $MASTER_40_ARGS // $MASTER_40_ARGS
add_arg(&al, "--rpl-recovery-rank=1"); add_arg(&al, "--rpl-recovery-rank=1");
add_arg(&al, "--init-rpl-role=master"); add_arg(&al, "--init-rpl-role=master");
// $SMALL_SERVER // $SMALL_SERVER
add_arg(&al, "-O"); add_arg(&al, "-O");
add_arg(&al, "key_buffer_size=1M"); add_arg(&al, "key_buffer_size=1M");
...@@ -329,17 +367,24 @@ void start_master() ...@@ -329,17 +367,24 @@ void start_master()
if (master_opt[0] != NULL) if (master_opt[0] != NULL)
{ {
char *p; char *p;
char *temp;
p = (char *)strtok(master_opt, " \t"); p = (char *)strtok(master_opt, " \t");
while(p) if ((temp = strstr(p, "timezone")) == NULL)
{ {
add_arg(&al, "%s", p); while(p)
{
p = (char *)strtok(NULL, " \t"); add_arg(&al, "%s", p);
p = (char *)strtok(NULL, " \t");
}
}
else
{
//do nothing
} }
} }
// remove the pid file if it exists // remove the pid file if it exists
remove(master_pid); remove(master_pid);
...@@ -347,7 +392,7 @@ void start_master() ...@@ -347,7 +392,7 @@ void start_master()
if ((err = spawn(mysqld_file, &al, FALSE, NULL, master_out, master_err)) == 0) if ((err = spawn(mysqld_file, &al, FALSE, NULL, master_out, master_err)) == 0)
{ {
sleep_until_file_exists(master_pid); sleep_until_file_exists(master_pid);
if ((err = wait_for_server_start(bin_dir, user, password, master_port)) == 0) if ((err = wait_for_server_start(bin_dir, user, password, master_port)) == 0)
{ {
master_running = TRUE; master_running = TRUE;
...@@ -361,7 +406,7 @@ void start_master() ...@@ -361,7 +406,7 @@ void start_master()
{ {
log_error("Unable to start master server."); log_error("Unable to start master server.");
} }
// free_args // free_args
free_args(&al); free_args(&al);
} }
...@@ -409,7 +454,7 @@ void start_slave() ...@@ -409,7 +454,7 @@ void start_slave()
{ {
// create empty master.info file // create empty master.info file
snprintf(temp, PATH_MAX, "%s/master.info", slave_dir); snprintf(temp, PATH_MAX, "%s/master.info", slave_dir);
close(open(temp, O_WRONLY | O_CREAT)); close(open(temp, O_WRONLY | O_CREAT,S_IRWXU|S_IRWXG|S_IRWXO));
} }
else if (strindex(slave_init_script, "rpl000017-slave.sh") != NULL) else if (strindex(slave_init_script, "rpl000017-slave.sh") != NULL)
{ {
...@@ -434,7 +479,7 @@ void start_slave() ...@@ -434,7 +479,7 @@ void start_slave()
{ {
// create empty master.info file // create empty master.info file
snprintf(temp, PATH_MAX, "%s/master.info", slave_dir); snprintf(temp, PATH_MAX, "%s/master.info", slave_dir);
close(open(temp, O_WRONLY | O_CREAT)); close(open(temp, O_WRONLY | O_CREAT,S_IRWXU|S_IRWXG|S_IRWXO));
} }
} }
...@@ -458,7 +503,7 @@ void start_slave() ...@@ -458,7 +503,7 @@ void start_slave()
add_arg(&al, "--core"); add_arg(&al, "--core");
add_arg(&al, "--tmpdir=%s", mysql_tmp_dir); add_arg(&al, "--tmpdir=%s", mysql_tmp_dir);
add_arg(&al, "--language=%s", lang_dir); add_arg(&al, "--language=%s", lang_dir);
add_arg(&al, "--exit-info=256"); add_arg(&al, "--exit-info=256");
add_arg(&al, "--log-slave-updates"); add_arg(&al, "--log-slave-updates");
add_arg(&al, "--init-rpl-role=slave"); add_arg(&al, "--init-rpl-role=slave");
...@@ -474,6 +519,13 @@ void start_slave() ...@@ -474,6 +519,13 @@ void start_slave()
add_arg(&al, "-O"); add_arg(&al, "-O");
add_arg(&al, "slave_net_timeout=10"); add_arg(&al, "slave_net_timeout=10");
if (use_openssl)
{
add_arg(&al, "--ssl-ca=%s", ca_cert);
add_arg(&al, "--ssl-cert=%s", server_cert);
add_arg(&al, "--ssl-key=%s", server_key);
}
// slave master info // slave master info
if (slave_master_info[0] != NULL) if (slave_master_info[0] != NULL)
{ {
...@@ -557,10 +609,11 @@ void start_slave() ...@@ -557,10 +609,11 @@ void start_slave()
******************************************************************************/ ******************************************************************************/
void mysql_start() void mysql_start()
{ {
log_info("Starting the MySQL server(s): %u", ++restarts);
start_master(); start_master();
start_slave(); start_slave();
// activate the test screen // activate the test screen
ActivateScreen(getscreenhandle()); ActivateScreen(getscreenhandle());
} }
...@@ -568,17 +621,17 @@ void mysql_start() ...@@ -568,17 +621,17 @@ void mysql_start()
/****************************************************************************** /******************************************************************************
stop_slave() stop_slave()
Stop the slave server. Stop the slave server.
******************************************************************************/ ******************************************************************************/
void stop_slave() void stop_slave()
{ {
int err; int err;
// running? // running?
if (!slave_running) return; if (!slave_running) return;
// stop // stop
if ((err = stop_server(bin_dir, user, password, slave_port, slave_pid)) == 0) if ((err = stop_server(bin_dir, user, password, slave_port, slave_pid)) == 0)
{ {
...@@ -593,17 +646,17 @@ void stop_slave() ...@@ -593,17 +646,17 @@ void stop_slave()
/****************************************************************************** /******************************************************************************
stop_master() stop_master()
Stop the master server. Stop the master server.
******************************************************************************/ ******************************************************************************/
void stop_master() void stop_master()
{ {
int err; int err;
// running? // running?
if (!master_running) return; if (!master_running) return;
if ((err = stop_server(bin_dir, user, password, master_port, master_pid)) == 0) if ((err = stop_server(bin_dir, user, password, master_port, master_pid)) == 0)
{ {
master_running = FALSE; master_running = FALSE;
...@@ -617,16 +670,17 @@ void stop_master() ...@@ -617,16 +670,17 @@ void stop_master()
/****************************************************************************** /******************************************************************************
mysql_stop() mysql_stop()
Stop the mysql servers. Stop the mysql servers.
******************************************************************************/ ******************************************************************************/
void mysql_stop() void mysql_stop()
{ {
log_info("Stopping the MySQL server(s)...");
stop_master(); stop_master();
stop_slave(); stop_slave();
// activate the test screen // activate the test screen
ActivateScreen(getscreenhandle()); ActivateScreen(getscreenhandle());
} }
...@@ -634,13 +688,12 @@ void mysql_stop() ...@@ -634,13 +688,12 @@ void mysql_stop()
/****************************************************************************** /******************************************************************************
mysql_restart() mysql_restart()
Restart the mysql servers. Restart the mysql servers.
******************************************************************************/ ******************************************************************************/
void mysql_restart() void mysql_restart()
{ {
log_info("Restarting the MySQL server(s): %u", ++restarts);
mysql_stop(); mysql_stop();
...@@ -650,7 +703,7 @@ void mysql_restart() ...@@ -650,7 +703,7 @@ void mysql_restart()
/****************************************************************************** /******************************************************************************
read_option() read_option()
Read the option file. Read the option file.
******************************************************************************/ ******************************************************************************/
...@@ -660,10 +713,10 @@ int read_option(char *opt_file, char *opt) ...@@ -660,10 +713,10 @@ int read_option(char *opt_file, char *opt)
int result; int result;
char *p; char *p;
char buf[PATH_MAX]; char buf[PATH_MAX];
// copy current option // copy current option
strncpy(buf, opt, PATH_MAX); strncpy(buf, opt, PATH_MAX);
// open options file // open options file
fd = open(opt_file, O_RDONLY); fd = open(opt_file, O_RDONLY);
...@@ -771,14 +824,19 @@ void run_test(char *test) ...@@ -771,14 +824,19 @@ void run_test(char *test)
if (stat(test_file, &info)) if (stat(test_file, &info))
{ {
snprintf(test_file, PATH_MAX, "%s/%s%s", test_dir, test, TEST_SUFFIX); snprintf(test_file, PATH_MAX, "%s/%s%s", test_dir, test, TEST_SUFFIX);
if(access(test_file,0))
{
printf("Invalid test name %s, %s file not found\n",test,test_file);
return;
}
} }
snprintf(result_file, PATH_MAX, "%s/%s%s", result_dir, test, NW_RESULT_SUFFIX); snprintf(result_file, PATH_MAX, "%s/%s%s", result_dir, test, NW_RESULT_SUFFIX);
if (stat(result_file, &info)) if (stat(result_file, &info))
{ {
snprintf(result_file, PATH_MAX, "%s/%s%s", result_dir, test, RESULT_SUFFIX); snprintf(result_file, PATH_MAX, "%s/%s%s", result_dir, test, RESULT_SUFFIX);
} }
// init scripts // init scripts
snprintf(master_init_script, PATH_MAX, "%s/%s-master.sh", test_dir, test); snprintf(master_init_script, PATH_MAX, "%s/%s-master.sh", test_dir, test);
if (stat(master_init_script, &info)) if (stat(master_init_script, &info))
...@@ -826,7 +884,14 @@ void run_test(char *test) ...@@ -826,7 +884,14 @@ void run_test(char *test)
add_arg(&al, "-v"); add_arg(&al, "-v");
add_arg(&al, "-R"); add_arg(&al, "-R");
add_arg(&al, "%s", result_file); add_arg(&al, "%s", result_file);
if (use_openssl)
{
add_arg(&al, "--ssl-ca=%s", ca_cert);
add_arg(&al, "--ssl-cert=%s", client_cert);
add_arg(&al, "--ssl-key=%s", client_key);
}
// start timer // start timer
NXGetTime(NX_SINCE_BOOT, NX_USECONDS, &start); NXGetTime(NX_SINCE_BOOT, NX_USECONDS, &start);
...@@ -915,7 +980,7 @@ void vlog(char *format, va_list ap) ...@@ -915,7 +980,7 @@ void vlog(char *format, va_list ap)
void log(char *format, ...) void log(char *format, ...)
{ {
va_list ap; va_list ap;
va_start(ap, format); va_start(ap, format);
vlog(format, ap); vlog(format, ap);
...@@ -1009,8 +1074,10 @@ void die(char *msg) ...@@ -1009,8 +1074,10 @@ void die(char *msg)
void setup(char *file) void setup(char *file)
{ {
char temp[PATH_MAX]; char temp[PATH_MAX];
char mysqldump_load[PATH_MAX*2],mysqlbinlog_load[PATH_MAX*2];
char *p; char *p;
// set the timezone for the timestamp test // set the timezone for the timestamp test
setenv("TZ", "GMT-3", TRUE); setenv("TZ", "GMT-3", TRUE);
...@@ -1023,7 +1090,7 @@ void setup(char *file) ...@@ -1023,7 +1090,7 @@ void setup(char *file)
*p = NULL; *p = NULL;
strcpy(base_dir, temp); strcpy(base_dir, temp);
} }
// setup paths // setup paths
snprintf(bin_dir, PATH_MAX, "%s/bin", base_dir); snprintf(bin_dir, PATH_MAX, "%s/bin", base_dir);
snprintf(mysql_test_dir, PATH_MAX, "%s/mysql-test", base_dir); snprintf(mysql_test_dir, PATH_MAX, "%s/mysql-test", base_dir);
...@@ -1034,7 +1101,18 @@ void setup(char *file) ...@@ -1034,7 +1101,18 @@ void setup(char *file)
snprintf(slave_dir, PATH_MAX, "%s/var/slave-data", mysql_test_dir); snprintf(slave_dir, PATH_MAX, "%s/var/slave-data", mysql_test_dir);
snprintf(lang_dir, PATH_MAX, "%s/share/english", base_dir); snprintf(lang_dir, PATH_MAX, "%s/share/english", base_dir);
snprintf(char_dir, PATH_MAX, "%s/share/charsets", base_dir); snprintf(char_dir, PATH_MAX, "%s/share/charsets", base_dir);
#ifdef HAVE_OPENSSL
use_openssl = TRUE;
#endif // HAVE_OPENSSL
// OpenSSL paths
snprintf(ca_cert, PATH_MAX, "%s/SSL/cacert.pem", base_dir);
snprintf(server_cert, PATH_MAX, "%s/SSL/server-cert.pem", base_dir);
snprintf(server_key, PATH_MAX, "%s/SSL/server-key.pem", base_dir);
snprintf(client_cert, PATH_MAX, "%s/SSL/client-cert.pem", base_dir);
snprintf(client_key, PATH_MAX, "%s/SSL/client-key.pem", base_dir);
// setup files // setup files
snprintf(mysqld_file, PATH_MAX, "%s/mysqld", bin_dir); snprintf(mysqld_file, PATH_MAX, "%s/mysqld", bin_dir);
snprintf(mysqltest_file, PATH_MAX, "%s/mysqltest", bin_dir); snprintf(mysqltest_file, PATH_MAX, "%s/mysqltest", bin_dir);
...@@ -1048,14 +1126,19 @@ void setup(char *file) ...@@ -1048,14 +1126,19 @@ void setup(char *file)
{ {
log_errno("Unable to create log file."); log_errno("Unable to create log file.");
} }
// prepare skip test list // prepare skip test list
while((p = strchr(skip_test, ',')) != NULL) *p = ' '; while((p = strchr(skip_test, ',')) != NULL) *p = ' ';
strcpy(temp, strlwr(skip_test)); strcpy(temp, strlwr(skip_test));
snprintf(skip_test, PATH_MAX, " %s ", temp); snprintf(skip_test, PATH_MAX, " %s ", temp);
// enviornment snprintf(mysqlbinlog_load,PATH_MAX*2,"%s/mysqlbinlog --no-defaults --local-load=%s",bin_dir,mysql_tmp_dir);
snprintf(mysqldump_load,PATH_MAX*2,"%s/mysqldump --no-defaults -uroot --port=%d",bin_dir,master_port);
// environment
setenv("MYSQL_TEST_DIR", mysql_test_dir, 1); setenv("MYSQL_TEST_DIR", mysql_test_dir, 1);
setenv("MYSQL_DUMP", mysqldump_load, 1);
setenv("MYSQL_BINLOG", mysqlbinlog_load, 1);
setenv("MASTER_MYPORT", "9306", 1);
} }
/****************************************************************************** /******************************************************************************
...@@ -1087,7 +1170,7 @@ int main(int argc, char **argv) ...@@ -1087,7 +1170,7 @@ int main(int argc, char **argv)
int i; int i;
// single test // single test
single_test = TRUE; single_test = TRUE;
for (i = 1; i < argc; i++) for (i = 1; i < argc; i++)
{ {
...@@ -1131,21 +1214,21 @@ int main(int argc, char **argv) ...@@ -1131,21 +1214,21 @@ int main(int argc, char **argv)
closedir(dir); closedir(dir);
} }
log(DASH);
log("\n");
log("Ending Tests...\n");
// stop server // stop server
mysql_stop(); mysql_stop();
log(DASH);
log("\n");
log("Ending Tests...\n");
// report stats // report stats
report_stats(); report_stats();
// close log // close log
if (log_fd) fclose(log_fd); if (log_fd) fclose(log_fd);
// keep results up // keep results up
pressanykey(); pressanykey();
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# MySQL Binary Log # MySQL Binary Log
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
SCREENNAME "MySQL Binary Log Dump Tool"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Binary Log Dump Tool" DESCRIPTION "MySQL Binary Log Dump Tool"
VERSION 4, 0 VERSION 4, 0
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# MySQL Client # MySQL Client
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
SCREENNAME "MySQL Check Tool"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Check Tool" DESCRIPTION "MySQL Check Tool"
VERSION 4, 0 VERSION 4, 0
......
...@@ -456,10 +456,10 @@ void check_data_vol() ...@@ -456,10 +456,10 @@ void check_data_vol()
// retrieve information // retrieve information
netware_vol_info_from_name(&vol, buff); netware_vol_info_from_name(&vol, buff);
if ((vol.flags & VOL_NSS_PRESENT) == 0) if ((vol.flags & VOL_NSS_PRESENT) == 0)
{ {
log("Error: The data directory is not on an NSS volume!\n\n"); log("Error: Either the data directory does not exist or is not on an NSS volume!\n\n");
exit(-1); exit(-1);
} }
} }
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# MySQL Admin # MySQL Admin
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
SCREENNAME "MySQL Dump Tool"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Dump Tool" DESCRIPTION "MySQL Dump Tool"
VERSION 4, 0 VERSION 4, 0
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# MySQL Client # MySQL Client
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
SCREENNAME "MySQL Import"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Import Tool" DESCRIPTION "MySQL Import Tool"
VERSION 4, 0 VERSION 4, 0
......
...@@ -340,7 +340,7 @@ then ...@@ -340,7 +340,7 @@ then
echo echo
fi fi
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 "This is done with:" 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'"
echo "$bindir/mysqladmin -u root -h $hostname password 'new-password'" echo "$bindir/mysqladmin -u root -h $hostname password 'new-password'"
echo "See the manual for more instructions." echo "See the manual for more instructions."
......
...@@ -115,7 +115,6 @@ else ...@@ -115,7 +115,6 @@ else
ledir=@libexecdir@ ledir=@libexecdir@
fi fi
safe_mysql_unix_port=${mysql_unix_port:-${MYSQL_UNIX_PORT:-@MYSQL_UNIX_ADDR@}}
user=@MYSQLD_USER@ user=@MYSQLD_USER@
niceness=0 niceness=0
...@@ -155,6 +154,7 @@ then ...@@ -155,6 +154,7 @@ then
fi fi
parse_arguments `$print_defaults --loose-verbose $defaults mysqld_safe safe_mysqld` parse_arguments `$print_defaults --loose-verbose $defaults mysqld_safe safe_mysqld`
parse_arguments PICK-ARGS-FROM-ARGV "$@" parse_arguments PICK-ARGS-FROM-ARGV "$@"
safe_mysql_unix_port=${mysql_unix_port:-${MYSQL_UNIX_PORT:-@MYSQL_UNIX_ADDR@}}
if test ! -x $ledir/$MYSQLD if test ! -x $ledir/$MYSQLD
then then
......
...@@ -276,14 +276,13 @@ static TABLE **find_table_ptr_by_name(THD *thd, const char *db, ...@@ -276,14 +276,13 @@ static TABLE **find_table_ptr_by_name(THD *thd, const char *db,
int dblen; int dblen;
TABLE **ptr; TABLE **ptr;
if (!db || ! *db) DBUG_ASSERT(db);
db= thd->db ? thd->db : ""; dblen=*db ? strlen(db)+1 : 0;
dblen=strlen(db)+1;
ptr=&(thd->handler_tables); ptr=&(thd->handler_tables);
for (TABLE *table=*ptr; table ; table=*ptr) for (TABLE *table=*ptr; table ; table=*ptr)
{ {
if (!memcmp(table->table_cache_key, db, dblen) && if ((!dblen || !memcmp(table->table_cache_key, db, dblen)) &&
!my_strcasecmp((is_alias ? table->table_name : table->real_name),table_name)) !my_strcasecmp((is_alias ? table->table_name : table->real_name),table_name))
{ {
if (table->version != refresh_version) if (table->version != refresh_version)
......
...@@ -501,7 +501,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); ...@@ -501,7 +501,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
opt_table_alias opt_table_alias
%type <table> %type <table>
table_ident table_ident table_ident_ref
%type <simple_string> %type <simple_string>
remember_name remember_end opt_len opt_ident opt_db text_or_password remember_name remember_end opt_len opt_ident opt_db text_or_password
...@@ -3243,8 +3243,13 @@ field_ident: ...@@ -3243,8 +3243,13 @@ field_ident:
table_ident: table_ident:
ident { $$=new Table_ident($1); } ident { $$=new Table_ident($1); }
| ident '.' ident { $$=new Table_ident($1,$3,0);} | ident '.' ident { $$=new Table_ident($1,$3,0);}
| '.' ident { $$=new Table_ident($2);} | '.' ident { $$=new Table_ident($2);} /* For Delphi */
/* For Delphi */; ;
table_ident_ref:
ident { LEX_STRING db={"",0}; $$=new Table_ident(db,$1,0); }
| ident '.' ident { $$=new Table_ident($1,$3,0);}
;
ident: ident:
IDENT { $$=$1; } IDENT { $$=$1; }
...@@ -3610,13 +3615,13 @@ handler: ...@@ -3610,13 +3615,13 @@ handler:
if (!add_table_to_list($2,$4,0)) if (!add_table_to_list($2,$4,0))
YYABORT; YYABORT;
} }
| HANDLER_SYM table_ident CLOSE_SYM | HANDLER_SYM table_ident_ref CLOSE_SYM
{ {
Lex->sql_command = SQLCOM_HA_CLOSE; Lex->sql_command = SQLCOM_HA_CLOSE;
if (!add_table_to_list($2,0,0)) if (!add_table_to_list($2,0,0))
YYABORT; YYABORT;
} }
| HANDLER_SYM table_ident READ_SYM | HANDLER_SYM table_ident_ref READ_SYM
{ {
LEX *lex=Lex; LEX *lex=Lex;
lex->sql_command = SQLCOM_HA_READ; lex->sql_command = SQLCOM_HA_READ;
......
...@@ -42,8 +42,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build ...@@ -42,8 +42,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
Obsoletes: MySQL-shared, mysql-shared Obsoletes: MySQL-shared, mysql-shared
Provides: MySQL-shared Provides: MySQL-shared
Summary: MySQL shared libraries for MySQL %{version4} and %{version3} Summary: MySQL shared libraries for MySQL %{version4} and %{version3}
Source0: MySQL-shared-%{version4}-0.i386.rpm Source0: MySQL-shared-%{version4}-0.%{_arch}.rpm
Source1: MySQL-shared-%{version3}-1.i386.rpm Source1: MySQL-shared-%{version3}-1.%{_arch}.rpm
# No need to include the RPMs once more - they can be downloaded seperately # No need to include the RPMs once more - they can be downloaded seperately
# if you want to rebuild this package # if you want to rebuild this package
NoSource: 0 NoSource: 0
......
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