Commit a768562a authored by unknown's avatar unknown

Merge


BitKeeper/etc/logging_ok:
  Auto converge
configure.in:
  Auto merged
mysql-test/misc/select.res:
  ***MISSING WEAVE***
BitKeeper/etc/ignore:
  Added BitKeeper/etc/config BitKeeper/tmp/CONTENTS BitKeeper/tmp/patch BitKeeper/tmp/pid to the ignore list
mysql-test/mysql-test-run:
  merge
parents d81d5295 a6185354
This diff is collapsed.
......@@ -3,3 +3,5 @@ mwagner@evoq.home.mwagner.org|mysql-test/var/log/README|20001009213643|16203|df5
mwagner@evoq.home.mwagner.org|mysql-test/var/run/README|20001009213643|17062|acb305e4c2ed5990
mwagner@evoq.home.mwagner.org|mysql-test/var/tmp/README|20001009213643|17904|b32d866bfd50e72e
mwagner@evoq.home.mwagner.org|mysql-test/share/README|20001009213643|10987|6cd25db633f30de5
mwagner@evoq.home.mwagner.org|mysql-test/r/3.23/README|20001009213643|10190|f9fd36f3c3711305
sasha@mysql.sashanet.com|mysql-test/t/include/master-slave.inc|20001118030458|01636|556fd038c3a3d54
jani@prima.mysql.com
sasha@mysql.sashanet.com
serg@serg.mysql.com
......@@ -24,7 +24,7 @@ EXTRA_DIST = INSTALL-SOURCE README \
SUBDIRS = include @docs_dirs@ @readline_dir@ \
@thread_dirs@ @sql_client_dirs@ \
@sql_server_dirs@ scripts tests man \
@bench_dirs@ support-files
@bench_dirs@ support-files mysql-test
# Relink after clean
CLEANFILES = linked_client_sources linked_server_sources linked_libmysql_sources linked_libmysql_r_sources linked_include_sources
......
......@@ -1887,6 +1887,7 @@ AC_OUTPUT(Makefile extra/Makefile mysys/Makefile isam/Makefile \
merge/Makefile dbug/Makefile scripts/Makefile \
include/Makefile sql-bench/Makefile \
tests/Makefile Docs/Makefile support-files/Makefile \
mysql-test/Makefile \
include/mysql_version.h
, , [test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h])
......
......@@ -65,7 +65,7 @@ nh = global.h config-win32.h dbug.h errmsg.h global.h \
m_ctype.h m_string.h \
my_alarm.h my_config.h my_dir.h my_list.h my_net.h my_sys.h \
mysql.h mysql_com.h mysql_version.h mysqld_error.h mysys_err.h \
my_pthread.h thr_alarm.h violite.h
my_pthread.h thr_alarm.h violite.h hash.h
# Get a list of the needed objects
lobjs = $(mysysobjects1) $(dbugobjects) $(mystringsobjects)
......
......@@ -55,7 +55,7 @@ mysysobjects1 = my_init.lo my_static.lo my_malloc.lo my_realloc.lo \
mf_loadpath.lo my_pthread.lo my_thr_init.lo \
thr_mutex.lo mulalloc.lo string.lo default.lo \
my_compress.lo array.lo my_once.lo list.lo my_net.lo \
charset.lo
charset.lo hash.lo
# Not needed in the minimum library
mysysobjects2 = getopt.lo getopt1.lo getvar.lo my_lib.lo
mysysobjects = $(mysysobjects1) $(mysysobjects2)
......
EXTRA_DIST=README README.gcov mysql-test-run t/*.test t/*.opt r/*.result \
mybin/mysql-test_install_db mybin/start-mysqld mybin/stop-mysqld \
mybin/translate-tests
connect (master,localhost,root,,test,0,var/tmp/mysql.sock);
connect (master1,localhost,root,,test,0,var/tmp/mysql.sock);
connect (slave,localhost,root,,test,0,var/tmp/mysql-slave.sock);
connect (slave1,localhost,root,,test,0,var/tmp/mysql-slave.sock);
connection slave;
!slave stop;
connection master;
reset master;
connection slave;
reset slave;
!slave start;
......@@ -5,26 +5,36 @@
# This scripts creates the privilege tables db, host, user, tables_priv,
# columns_priv in the mysql database, as well as the func table.
if [ x$1 = x"-bin" ]; then
shift 1
execdir=../bin
bindir=../bin
BINARY_DIST=1
fix_bin=mysql-test
else
execdir=../sql
bindir=../client
fix_bin=.
fi
if [ x$1 = x"-slave" ]
then
shift $#
ldata=var/slave-data
shift 1
data=var/slave-data
ldata=$fix_bin/var/slave-data
logdir=var/log
mdata=$ldata/mysql
execdir=../sql
bindir=../client
else
ldata=var/lib
data=var/lib
ldata=$fix_bin/var/lib
logdir=var/log
mdata=$ldata/mysql
execdir=../sql
bindir=../client
fi
mdata=$data/mysql
if test ! -x $execdir/mysqld
then
echo "I can't find no stinking mysqld!"
echo "mysqld is missing - looked in $execdir"
exit 1
fi
......@@ -36,25 +46,18 @@ resolved=127.0.0.1
# Create database directories mysql & test
if test ! -d $ldata; then (mkdir -p $ldata || exit 1) && \
(chmod 700 $ldata || exit 1) ; fi
if test ! -d $ldata/mysql;
then
mkdir -p $ldata/mysql || exit 1;
chmod 700 $ldata/mysql || exit 1 ; fi
if test ! -d $ldata/test;
then
mkdir -p $ldata/test || exit 1;
chmod 700 $ldata/test || exit 1 ;
fi
if test -w / -a ! -z "$user"; then
chown $user $ldata $ldata/mysql $ldata/test || exit 1;
fi
if [ -d $data ] ; then rm -rf $data ; fi
mkdir -p $data $data/mysql $data/test
#for error messages
if [ x$BINARY_DIST = x1 ] ; then
basedir=..
else
basedir=.
rm -rf share
mkdir share
ln -sf ../../sql/share share/mysql
fi
#create the directory for logs
mkdir -p $logdir
......@@ -192,7 +195,7 @@ then
fi
if $execdir/mysqld --no-defaults --bootstrap --skip-grant-tables \
--basedir=. --datadir=$ldata << END_OF_DATA
--basedir=$basedir --datadir=$ldata << END_OF_DATA
use mysql;
$c_d
$i_d
......
#! /bin/sh
# mysql-test-run - originally written by Matt Wagner <matt@mysql.com>
# modified by Sasha Pachev <sasha@mysql.com>
#++
# Access Definitions
......@@ -7,17 +9,42 @@ DB=test
DBUSER=test
DBPASSWD=
# Are we on source or binary distribution?
if [ $0 = scripts/mysql-test-run ] ;
then
BINARY_DIST=1
cd mysql-test
else
if [ -d mysql-test ] ; then
cd mysql-test
fi
if [ -f ./mysql-test-run ] && [ -d ../sql ] ; then
SOURCE_DIST=1
else
echo "If you are using binary distirubution, run me from install root as \
scripts/mysql-test-run. On source distribution run me from source root as \
mysql-test/mysql-test-run or from mysql-test as ./mysql-test-run"
exit 1
fi
fi
#++
# Misc. Definitions
#--
#BASEDIR is always one above mysql-test directory
CWD=`pwd`
cd ..
BASEDIR=`pwd`
cd $CWD
MYBIN="$CWD/mybin"
TESTVER=3.23
TESTDIR="$CWD/t/$TESTVER"
MYSQL_TEST_DIR=$BASEDIR/mysql-test
TESTDIR="$MYSQL_TEST_DIR/t/"
TESTSUFFIX=test
TOT_PASS=0
TOT_FAIL=0
......@@ -25,8 +52,8 @@ TOT_TEST=0
USERT=0
SYST=0
REALT=0
MY_TMP_DIR=$CWD/var/tmp
TIMEFILE="$CWD/var/tmp/mysqltest-time"
MY_TMP_DIR=$MYSQL_TEST_DIR/var/tmp
TIMEFILE="$MYSQL_TEST_DIR/var/tmp/mysqltest-time"
DASHBLANK="---- ---- -------"
MYSQLD_SRC_DIRS="strings mysys include extra regex isam merge myisam \
myisammrg heap sql"
......@@ -53,18 +80,25 @@ done
#--
MYRUN_DIR=var/run
MASTER_MYPORT=9306
MASTER_MYDDIR="$CWD/var/lib"
MASTER_MYSOCK="$CWD/var/tmp/mysql.sock"
MASTER_MYPID="$CWD/var/run/mysqld.pid"
MASTER_MYLOG="$CWD/var/log/mysqld.log"
MASTER_MYERR="$CWD/var/log/mysqld.err"
MASTER_MYDDIR="$MYSQL_TEST_DIR/var/lib"
MASTER_MYSOCK="$MYSQL_TEST_DIR/var/tmp/mysql.sock"
MASTER_MYPID="$MYSQL_TEST_DIR/var/run/mysqld.pid"
MASTER_MYLOG="$MYSQL_TEST_DIR/var/log/mysqld.log"
MASTER_MYERR="$MYSQL_TEST_DIR/var/log/mysqld.err"
SLAVE_MYPORT=9307
SLAVE_MYDDIR="$CWD/var/slave-data"
SLAVE_MYSOCK="$CWD/var/tmp/mysql-slave.sock"
SLAVE_MYPID="$CWD/var/run/mysqld-slave.pid"
SLAVE_MYLOG="$CWD/var/log/mysqld-slave.log"
SLAVE_MYERR="$CWD/var/log/mysqld-slave.err"
SLAVE_MYDDIR="$MYSQL_TEST_DIR/var/slave-data"
SLAVE_MYSOCK="$MYSQL_TEST_DIR/var/tmp/mysql-slave.sock"
SLAVE_MYPID="$MYSQL_TEST_DIR/var/run/mysqld-slave.pid"
SLAVE_MYLOG="$MYSQL_TEST_DIR/var/log/mysqld-slave.log"
SLAVE_MYERR="$MYSQL_TEST_DIR/var/log/mysqld-slave.err"
if [ x$SOURCE_DIST = x1 ] ; then
MY_BASEDIR=$MYSQL_TEST_DIR
else
MY_BASEDIR=$BASEDIR
fi
#++
# Program Definitions
......@@ -81,22 +115,50 @@ RM=/bin/rm
TIME=/usr/bin/time
TR=/usr/bin/tr
XARGS=`which xargs`
MYSQLD="$BASEDIR/sql/mysqld"
MYSQL_TEST="$BASEDIR/client/mysqltest"
MYSQLADMIN="$BASEDIR/client/mysqladmin"
# on source dist, we pick up freshly build executables
# on binary, use what is installed
if [ x$SOURCE_DIST = x1 ] ; then
MYSQLD="$BASEDIR/sql/mysqld"
MYSQL_TEST="$BASEDIR/client/mysqltest"
MYSQLADMIN="$BASEDIR/client/mysqladmin"
INSTALL_DB="./install_test_db"
else
MYSQLD="$BASEDIR/bin/mysqld"
MYSQL_TEST="$BASEDIR/bin/mysqltest"
MYSQLADMIN="$BASEDIR/bin/mysqladmin"
INSTALL_DB="../scripts/install_test_db -bin"
fi
MYSQL_TEST="$MYSQL_TEST --socket=$MASTER_MYSOCK --database=$DB --user=$DBUSER --password=$DBPASSWD --silent"
INSTALL_DB="$MYBIN/mysql-test_install_db"
GDB_MASTER_INIT=/tmp/gdbinit.master
GDB_SLAVE_INIT=/tmp/gdbinit.slave
if [ "$1" = "-force" ] ; then
FORCE=1
shift 1
fi
if [ "$1" = "-gcov" ];
then
if [ x$BINARY_DIST = x1 ] ; then
echo "Cannot do coverage test without the source - please us source dist"
exit 1
fi
DO_GCOV=1
shift 1
fi
if [ "$1" = "-gdb" ];
then
# if the user really wanted to run binary dist in a debugger, he can
# but we should warn him
if [ x$BINARY_DIST = x1 ] ; then
echo "Note: you will get more meaningful output on a source distribution \
compiled with debugging option when running tests with -gdb option"
fi
DO_GDB=1
shift 1
fi
......@@ -147,7 +209,7 @@ echo_pass () {
prompt_user ()
{
echo $1
read not_used
read unused
}
echo_fail () {
......@@ -224,7 +286,7 @@ gcov_prepare () {
for f in *.h *.cc *.c; do
cp $f $GCOV_SLAVE_SRC/$d
done
cd $CWD
cd $MYSQL_TEST_DIR
done
}
......@@ -239,12 +301,12 @@ gcov_collect () {
for f in *.h *.cc *.c; do
$GCOV $f 2>>$GCOV_MASTER_ERR >>$GCOV_MASTER_MSG
done
cd $CWD
cd $MYSQL_TEST_DIR
cd $GCOV_SLAVE_SRC/$d
for f in *.h *.cc *.c; do
$GCOV $f 2>>$GCOV_SLAVE_ERR >>$GCOV_SLAVE_MSG
done
cd $CWD
cd $MYSQL_TEST_DIR
done
$ECHO "gcov master info in $GCOV_MASTER_MSG, errors in $GCOV_MASTER_ERR"
......@@ -257,7 +319,7 @@ start_master()
#start master
master_args="--no-defaults --log-bin \
--server-id=1 \
--basedir=$CWD \
--basedir=$MY_BASEDIR \
--port=$MASTER_MYPORT \
--core-file \
--datadir=$MASTER_MYDDIR \
......@@ -285,8 +347,8 @@ start_slave()
--master-connect-retry=1 \
--master-host=127.0.0.1 \
--master-port=$MASTER_MYPORT \
--core-file --log-bin --log-slave-updates \
--basedir=$CWD \
--core-file \
--basedir=$MY_BASEDIR \
--datadir=$SLAVE_MYDDIR \
--pid-file=$SLAVE_MYPID \
--port=$SLAVE_MYPORT \
......@@ -307,7 +369,7 @@ start_slave()
mysql_start () {
start_master
start_slave
cd $CWD
cd $MYSQL_TEST_DIR
return 1
}
......@@ -394,7 +456,7 @@ run_testcase ()
fi
fi
cd $CWD
cd $MYSQL_TEST_DIR
if [ -f $tf ] ; then
mytime=`$TIME -p $MYSQL_TEST < $tf 2> $TIMEFILE`
......@@ -425,6 +487,13 @@ run_testcase ()
$CAT $TIMEFILE
$ECHO
$ECHO
if [ x$FORCE != x1 ] ; then
$SETCOLOR_NORMAL
echo "Aborting, if you want to continue, re-run with -force"
mysql_stop
exit 1
fi
$SETCOLOR_NORMAL && $ECHO -n "Restarting mysqld $DASHBLANK"
mysql_restart
$SETCOLOR_SUCCESS && echo_ok
......
......@@ -3,4 +3,4 @@ drop table if exists x;
create table x (n int);
insert into x values(9),(3),(12),(10);
alter table x order by n;
@r/3.23/alt000001.result select * from x;
@r/alt000001.result select * from x;
......@@ -8,4 +8,4 @@ insert into emails values ('sasha@mysql.com'),('monty@mysql.com'),
create table domain(id int not null auto_increment primary key,
domain varchar(50), unique(domain));
insert into domain (domain) select distinct substring(email, locate('@', email)+1) from emails;
@r/3.23/ins000001.result select * from domain;
@r/ins000001.result select * from domain;
source t/include/master-slave.inc;
source include/master-slave.inc;
connection master;
use test;
drop table if exists words;
create table words (word char(20) not null);
load data infile '../../std_data/words' into table words;
load data infile '../../std_data/words.dat' into table words;
drop table if exists foo;
create table foo(n int);
insert into foo values(1),(2);
connection slave;
sleep 2;
use test;
@r/3.23/rpl000001.a.result select * from foo;
@r/3.23/rpl000001.b.result select sum(length(word)) from words;
@r/rpl000001.a.result select * from foo;
@r/rpl000001.b.result select sum(length(word)) from words;
source t/include/master-slave.inc;
source include/master-slave.inc;
connection master;
use test;
drop table if exists x;
......@@ -8,4 +8,4 @@ insert into x values (NULL),(NULL),(NULL);
connection slave;
use test;
sleep 0.5;
@r/3.23/rpl000002.result select * from x;
@r/rpl000002.result select * from x;
source t/include/master-slave.inc;
source include/master-slave.inc;
connection master;
drop table if exists x;
create table x(n int primary key);
......@@ -6,4 +6,4 @@ create table x(n int primary key);
insert into x values (3);
connection slave;
sleep 0.5;
@r/3.23/rpl000003.result select * from x;
@r/rpl000003.result select * from x;
source t/include/master-slave.inc;
source include/master-slave.inc;
connection master;
use test;
set SQL_LOG_BIN=0;
drop table if exists words;
create table words (word char(20) not null, index(word));
load data infile '../../std_data/words' into table words;
load data infile '../../std_data/words.dat' into table words;
drop table if exists words1;
create table words1 (word char(20) not null);
load data infile '../../std_data/words' into table words1;
load data infile '../../std_data/words.dat' into table words1;
connection slave;
use test;
drop table if exists words;
load table words from master;
drop table if exists words1;
load table words1 from master;
@r/3.23/rpl000004.a.result check table words;
@r/3.23/rpl000004.b.result select count(*) from words1;
@r/rpl000004.a.result check table words;
@r/rpl000004.b.result select count(*) from words1;
source t/include/master-slave.inc;
source include/master-slave.inc;
connection master;
drop table if exists test;
CREATE TABLE test (name varchar(64), age smallint(3));
......@@ -6,7 +6,7 @@ INSERT INTO test SET name='Andy', age=31;
INSERT test SET name='Jacob', age=2;
INSERT into test SET name='Caleb', age=1;
ALTER TABLE test ADD id int(8) ZEROFILL AUTO_INCREMENT PRIMARY KEY;
@r/3.23/rpl000005.result select * from test;
@r/rpl000005.result select * from test;
connection slave;
sleep 0.5;
@r/3.23/rpl000005.result select * from test;
@r/rpl000005.result select * from test;
source t/include/master-slave.inc;
source include/master-slave.inc;
connection master;
set SQL_LOG_BIN=0;
set timestamp=200006;
drop table if exists foo;
create table foo(t timestamp not null,a char(1));
insert into foo ( a) values ('F');
@r/3.23/rpl000006.result select unix_timestamp(t) from foo;
@r/rpl000006.result select unix_timestamp(t) from foo;
connection slave;
drop table if exists foo;
load table foo from master;
@r/3.23/rpl000006.result select unix_timestamp(t) from foo;
@r/rpl000006.result select unix_timestamp(t) from foo;
#this one assumes we are ignoring updates on table foo, but doing
#the ones on bar
source t/include/master-slave.inc;
source include/master-slave.inc;
connection slave;
use test;
drop table if exists foo;
......@@ -16,4 +16,4 @@ create table bar (m int);
insert into bar values(15);
connection slave;
sleep 1;
@r/3.23/rpl000007.result select foo.n,bar.m from foo,bar;
@r/rpl000007.result select foo.n,bar.m from foo,bar;
#this one assumes we are ignoring updates on table foo, but doing
#the ones on all other tables
source t/include/master-slave.inc;
source include/master-slave.inc;
connection slave;
use test;
drop table if exists foo;
......@@ -19,4 +19,4 @@ create table choo (k int);
insert into choo values(55);
connection slave;
sleep 1;
@r/3.23/rpl000008.result select foo.n,bar.m,choo.k from foo,bar,choo;
@r/rpl000008.result select foo.n,bar.m,choo.k from foo,bar,choo;
#this one assumes we are ignoring updates on tables in database foo, but doing
#the ones in database bar
source t/include/master-slave.inc;
source include/master-slave.inc;
connection master;
drop database if exists foo;
create database foo;
......@@ -20,4 +20,4 @@ create table bar.bar (m int);
insert into bar.bar values(15);
connection slave;
sleep 1;
@r/3.23/rpl000009.result select foo.foo.n,bar.bar.m from foo.foo,bar.bar;
@r/rpl000009.result select foo.foo.n,bar.bar.m from foo.foo,bar.bar;
#this tests the offset off by 22 mystery bug
#must run slave with --disconnect-slave-event-count=1 --master-connect-retry=1
source t/include/master-slave.inc;
source include/master-slave.inc;
connection slave;
drop table if exists foo;
connection master;
......@@ -10,4 +10,4 @@ insert into foo values(NULL);
insert into foo values(2);
connection slave;
sleep 5;
@r/3.23/rpl000010.result select n from foo;
@r/rpl000010.result select n from foo;
source t/include/master-slave.inc;
source include/master-slave.inc;
connection master;
use test;
drop table if exists foo;
......@@ -14,5 +14,5 @@ insert into foo values(2);
connection slave;
#let slave catch up
sleep 1;
@r/3.23/rpl000011.result select * from foo;
@r/rpl000011.result select * from foo;
source t/include/master-slave.inc;
source include/master-slave.inc;
connection master;
drop table if exists x;
create table x(n int);
......@@ -15,5 +15,5 @@ insert into x values(6);
disconnect master1;
connection slave;
sleep 1;
@r/3.23/rpl000012.result select * from x;
@r/3.23/rpl000012.status.result show status like 'Slave_open_temp_tables';
@r/rpl000012.result select * from x;
@r/rpl000012.status.result show status like 'Slave_open_temp_tables';
source t/include/master-slave.inc;
source include/master-slave.inc;
connection master;
drop table if exists x;
create table x(n int);
......@@ -21,5 +21,5 @@ while ($1)
sleep 0.2;
dec $1;
}
@r/3.23/rpl000013.result select * from x;
@r/3.23/rpl000013.status.result show status like 'Slave_open_temp_tables';
@r/rpl000013.result select * from x;
@r/rpl000013.status.result show status like 'Slave_open_temp_tables';
......@@ -14,4 +14,4 @@
DROP TABLE IF EXISTS t;
CREATE TABLE t (s CHAR(20) PRIMARY KEY, id INT);
INSERT INTO t VALUES ('cat', 1), ('mouse', 3), ('dog', 2), ('snake', 77);
@r/3.23/sel000001.result SELECT s, id FROM t WHERE s = 'mouse';
@r/sel000001.result SELECT s, id FROM t WHERE s = 'mouse';
......@@ -13,4 +13,4 @@
DROP TABLE IF EXISTS t;
CREATE TABLE t (n INT);
INSERT INTO t VALUES (1), (2), (3);
@r/3.23/sel000002.result SELECT * FROM t;
@r/sel000002.result SELECT * FROM t;
......@@ -14,4 +14,4 @@
DROP TABLE IF EXISTS t;
CREATE TABLE t (name CHAR(20) NOT NULL PRIMARY KEY, score SMALLINT NOT NULL, KEY(score));
INSERT INTO t VALUES ('Sasha', 20), ('Matt', 20), ('Monty', 10), ('David', 10), ('Tim', 10), ('Jeremy', 10);
@r/3.23/sel000003.result SELECT COUNT(*) as n, score FROM t GROUP BY score;
@r/sel000003.result SELECT COUNT(*) as n, score FROM t GROUP BY score;
......@@ -16,6 +16,6 @@ val int(10) not null);
insert into elt_ck1 values (1),(2),(4);
insert into elt_ck2 values (1,1),(2,1),(3,1),(4,2);
@r/3.23/sel000004.result select one.id, elt(two.val,'one','two') from elt_ck1 one, elt_ck2 two
@r/sel000004.result select one.id, elt(two.val,'one','two') from elt_ck1 one, elt_ck2 two
where two.id=one.id order by one.id;
......@@ -16,6 +16,6 @@ val int(10) not null);
insert into elt_ck1 values (1),(2),(4);
insert into elt_ck2 values (1,1),(2,1),(3,1),(4,2);
@r/3.23/sel000005.result select one.id, elt(two.val,'one','two') from elt_ck1 one, elt_ck2 two
@r/sel000005.result select one.id, elt(two.val,'one','two') from elt_ck1 one, elt_ck2 two
where two.id=one.id ;
......@@ -21,7 +21,7 @@ CREATE TABLE test2 (
KEY NAME (NAME)
);
@r/3.23/sel000100.result SELECT DISTINCT
@r/sel000100.result SELECT DISTINCT
test2.id AS key_link_id,
test2.name AS link
FROM test1
......
......@@ -4,4 +4,4 @@ create table test (
test_set set( 'val1', 'val2', 'val3' ) not null default '',
name char(20) default 'O''Brien'
) comment = 'it\'s a table' ;
@r/3.23/shw000001.result show create table test ;
@r/shw000001.result show create table test ;
......@@ -12,20 +12,35 @@ SOURCE=`pwd`
# Save temporary distribution here (must be full path)
TMP=/tmp
if test $# -gt 0
if test $# -gt 0 -a x$1 != x"-debug"
then
TMP=$1
shift 1
fi
if test x$1 = x"-debug"
then
DEBUG=1
shift 1
fi
#make
# This should really be integrated with automake and not duplicate the
# installation list.
BASE=$TMP/my_dist
if [ -d $BASE ] ; then
rm -rf $BASE
fi
mkdir $BASE $BASE/bin $BASE/data $BASE/data/mysql $BASE/data/test \
$BASE/include $BASE/lib $BASE/support-files $BASE/share $BASE/share/mysql \
$BASE/tests $BASE/scripts $BASE/sql-bench
$BASE/tests $BASE/scripts $BASE/sql-bench $BASE/mysql-test \
$BASE/mysql-test/t $BASE/mysql-test/r \
$BASE/mysql-test/include $BASE/mysql-test/std_data
chmod o-rwx $BASE/data $BASE/data/*
......@@ -37,8 +52,9 @@ done
for i in extra/comp_err extra/replace extra/perror extra/resolveip \
extra/my_print_defaults isam/isamchk isam/pack_isam myisam/myisamchk myisam/myisampack sql/mysqld sql/mysqlbinlog \
client/mysql sql/mysqld client/mysqlshow client/mysqladmin client/mysqldump client/mysqlimport \
client/.libs/mysql client/.libs/mysqlshow client/.libs/mysqladmin client/.libs/mysqldump client/.libs/mysqlimport
client/mysql sql/mysqld client/mysqlshow client/mysqladmin client/mysqldump \
client/mysqlimport client/mysqltest \
client/.libs/mysql client/.libs/mysqlshow client/.libs/mysqladmin client/.libs/mysqldump client/.libs/mysqlimport client/.libs/mysqltest
do
cp -p $i $BASE/bin
done
......@@ -49,7 +65,16 @@ rm $BASE/include/Makefile*; rm $BASE/include/*.in
cp -p tests/*.res tests/*.tst tests/*.pl $BASE/tests
cp -p support-files/* $BASE/support-files
cp -p libmysql/.libs/libmysqlclient.a libmysql/.libs/libmysqlclient.so* libmysql/libmysqlclient.* libmysql_r/.libs/libmysqlclient_r.a libmysql_r/.libs/libmysqlclient_r.so* libmysql_r/libmysqlclient_r.* mysys/libmysys.a strings/libmystrings.a dbug/libdbug.a $BASE/lib
cp -r -p sql/share/* $BASE/share/mysql; rm -f $BASE/share/mysql/Makefile* $BASE/share/mysql/*/*.OLD $BASE/share/CVS $BASE/share/*/CVS
cp -r -p sql/share/* $BASE/share/mysql
rm -f $BASE/share/mysql/Makefile* $BASE/share/mysql/*/*.OLD
rm -rf $BASE/share/SCCS $BASE/share/*/SCCS
cp -p mysql-test/mysql-test-run mysql-test/install_test_db $BASE/scripts
cp -p mysql-test/README $BASE/README
cp -p mysql-test/include/*.inc $BASE/mysql-test/include
cp -p mysql-test/std_data/*.dat $BASE/mysql-test/std_data
cp -p mysql-test/t/*.test mysql-test/t/*.opt $BASE/mysql-test/t
cp -p mysql-test/r/*.result $BASE/mysql-test/r
cp -p scripts/* $BASE/bin
rm -f $BASE/bin/Makefile* $BASE/bin/*.in $BASE/bin/*.sh $BASE/bin/mysql_install_db $BASE/bin/make_binary_distribution $BASE/bin/setsomevars $BASE/support-files/Makefile* $BASE/support-files/*.sh
......@@ -62,6 +87,8 @@ mv $BASE/support-files/binary-configure $BASE/configure
chmod a+x $BASE/bin/* $BASE/scripts/* $BASE/support-files/mysql-* $BASE/configure
cp -r -p sql-bench/* $BASE/sql-bench
rm -f $BASE/sql-bench/*.sh $BASE/sql-bench/Makefile* $BASE/lib/*.la
rm -rf `find $BASE/sql-bench -name SCCS`
rm -rf `find $BASE/share -name SCCS`
# Change the distribution to a long descreptive name
NEW_NAME=mysql-$version-$system-$machine
......@@ -86,6 +113,11 @@ then
cd $SOURCE
fi
#if we are debugging, do not do tar/gz
if [ x$DEBUG = x1 ] ; then
exit
fi
# This is needed to prefere gnu tar instead of tar because tar can't
# always handle long filenames
......
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