Commit c677838d authored by unknown's avatar unknown

Cleanup of tests

Fixed bug with ALTER TABLE on HEAP tables


mysql-test/r/alter_table.result:
  Turn off SCCS flag
mysql-test/r/analyse.result:
  Turn off SCCS flag
mysql-test/r/auto_increment.result:
  Turn off SCCS flag
mysql-test/r/bdb.result:
  Turn off SCCS flag
mysql-test/r/bigint.result:
  Turn off SCCS flag
mysql-test/r/binary.result:
  Turn off SCCS flag
mysql-test/r/case.result:
  Turn off SCCS flag
mysql-test/r/comments.result:
  Turn off SCCS flag
mysql-test/r/compare.result:
  Turn off SCCS flag
mysql-test/r/count_distinct.result:
  Turn off SCCS flag
mysql-test/r/create.result:
  Turn off SCCS flag
mysql-test/r/delayed.result:
  Turn off SCCS flag
mysql-test/r/distinct.result:
  Turn off SCCS flag
mysql-test/r/empty_table.result:
  Turn off SCCS flag
mysql-test/r/explain.result:
  Turn off SCCS flag
mysql-test/r/ft0000001.a.result:
  Turn off SCCS flag
mysql-test/r/ft0000001.b.result:
  Turn off SCCS flag
mysql-test/r/ft0000001.c.result:
  Turn off SCCS flag
mysql-test/r/ft0000001.d.result:
  Turn off SCCS flag
mysql-test/r/ft0000001.e.result:
  Turn off SCCS flag
mysql-test/r/ft0000002.a.result:
  Turn off SCCS flag
mysql-test/r/ft0000002.b.result:
  Turn off SCCS flag
mysql-test/r/ft0000002.c.result:
  Turn off SCCS flag
mysql-test/r/fulltext.result:
  Turn off SCCS flag
mysql-test/r/func_crypt.result:
  Turn off SCCS flag
mysql-test/r/func_date_add.result:
  Turn off SCCS flag
mysql-test/r/func_equal.result:
  Turn off SCCS flag
mysql-test/r/func_group.result:
  Turn off SCCS flag
mysql-test/r/func_in.result:
  Turn off SCCS flag
mysql-test/r/func_like.result:
  Turn off SCCS flag
mysql-test/r/func_math.result:
  Turn off SCCS flag
mysql-test/r/func_misc.result:
  Turn off SCCS flag
mysql-test/r/func_op.result:
  Turn off SCCS flag
mysql-test/r/func_regexp.result:
  Turn off SCCS flag
mysql-test/r/func_set.result:
  Turn off SCCS flag
mysql-test/r/func_str.result:
  Turn off SCCS flag
mysql-test/r/func_system.result:
  Turn off SCCS flag
mysql-test/r/func_test.result:
  Turn off SCCS flag
mysql-test/r/func_time.result:
  Turn off SCCS flag
mysql-test/r/group_by.result:
  Turn off SCCS flag
mysql-test/r/heap.result:
  Turn off SCCS flag
mysql-test/r/ins000001.result:
  Turn off SCCS flag
mysql-test/r/insert.result:
  Turn off SCCS flag
mysql-test/r/insert_select.result:
  Turn off SCCS flag
mysql-test/r/join.result:
  Turn off SCCS flag
mysql-test/r/join_outer.result:
  Turn off SCCS flag
mysql-test/r/key.result:
  Turn off SCCS flag
mysql-test/r/key_diff.result:
  Turn off SCCS flag
mysql-test/r/key_primary.result:
  Turn off SCCS flag
mysql-test/r/keywords.result:
  Turn off SCCS flag
mysql-test/r/limit.result:
  Turn off SCCS flag
mysql-test/r/merge.result:
  Turn off SCCS flag
mysql-test/r/null.result:
  Turn off SCCS flag
mysql-test/r/null_key.result:
  Turn off SCCS flag
mysql-test/r/odbc.result:
  Turn off SCCS flag
mysql-test/r/order_by.result:
  Turn off SCCS flag
mysql-test/r/raid.result:
  Turn off SCCS flag
mysql-test/r/range.result:
  Turn off SCCS flag
mysql-test/r/rename.result:
  Turn off SCCS flag
mysql-test/r/replace.result:
  Turn off SCCS flag
mysql-test/r/rollback.result:
  Turn off SCCS flag
mysql-test/r/rpl000001.a.result:
  Turn off SCCS flag
mysql-test/r/rpl000001.b.result:
  Turn off SCCS flag
mysql-test/r/rpl000002.result:
  Turn off SCCS flag
mysql-test/r/rpl000003.result:
  Turn off SCCS flag
mysql-test/r/rpl000004.a.result:
  Turn off SCCS flag
mysql-test/r/rpl000004.b.result:
  Turn off SCCS flag
mysql-test/r/rpl000005.result:
  Turn off SCCS flag
mysql-test/r/rpl000006.result:
  Turn off SCCS flag
mysql-test/r/rpl000007.result:
  Turn off SCCS flag
mysql-test/r/rpl000008.result:
  Turn off SCCS flag
mysql-test/r/rpl000009.result:
  Turn off SCCS flag
mysql-test/r/rpl000010.result:
  Turn off SCCS flag
mysql-test/r/rpl000011.result:
  Turn off SCCS flag
mysql-test/r/rpl000012.result:
  Turn off SCCS flag
mysql-test/r/rpl000012.status.result:
  Turn off SCCS flag
mysql-test/r/rpl000013.result:
  Turn off SCCS flag
mysql-test/r/rpl000013.status.result:
  Turn off SCCS flag
mysql-test/r/rpl000014.result:
  Turn off SCCS flag
mysql-test/r/rpl000015.result:
  Turn off SCCS flag
mysql-test/r/rpl000016.result:
  Turn off SCCS flag
mysql-test/r/sel000001.result:
  Turn off SCCS flag
mysql-test/r/sel000002.result:
  Turn off SCCS flag
mysql-test/r/sel000003.result:
  Turn off SCCS flag
mysql-test/r/sel000031.result:
  Turn off SCCS flag
mysql-test/r/sel000032.result:
  Turn off SCCS flag
mysql-test/r/sel000033.result:
  Turn off SCCS flag
mysql-test/r/sel000100.result:
  Turn off SCCS flag
mysql-test/r/select_safe.result:
  Turn off SCCS flag
mysql-test/r/show_check.result:
  Turn off SCCS flag
mysql-test/r/shw000001.result:
  Turn off SCCS flag
mysql-test/r/slave-running.result:
  Turn off SCCS flag
mysql-test/r/slave-stopped.result:
  Turn off SCCS flag
mysql-test/r/tablelock.result:
  Turn off SCCS flag
mysql-test/r/temp_table.result:
  Turn off SCCS flag
mysql-test/r/truncate.result:
  Turn off SCCS flag
mysql-test/r/type_blob.result:
  Turn off SCCS flag
mysql-test/r/type_date.result:
  Turn off SCCS flag
mysql-test/r/type_datetime.result:
  Turn off SCCS flag
mysql-test/r/type_enum.result:
  Turn off SCCS flag
mysql-test/r/type_float.result:
  Turn off SCCS flag
mysql-test/r/type_ranges.result:
  Turn off SCCS flag
mysql-test/r/type_time.result:
  Turn off SCCS flag
mysql-test/r/type_timestamp.result:
  Turn off SCCS flag
mysql-test/r/type_uint.result:
  Turn off SCCS flag
mysql-test/r/type_year.result:
  Turn off SCCS flag
mysql-test/r/update.result:
  Turn off SCCS flag
mysql-test/r/varbinary.result:
  Turn off SCCS flag
mysql-test/r/variables.result:
  Turn off SCCS flag
Docs/manual.texi:
  Changelog
client/my_readline.h:
  Added read length to readline()
client/mysql.cc:
  cleanup
client/mysqladmin.c:
  cleanup
client/mysqldump.c:
  Added handling of hexadecimal constants
client/mysqlimport.c:
  Version change
client/mysqltest.c:
  Don't append the .reject extension, instead replace the old extension
client/readline.cc:
  Added read length to readline()
heap/hp_open.c:
  extra debug
merge/rrnd.c:
  Fix bug in merge tables
mysql-test/install_test_db.sh:
  Portability fixes
mysql-test/mysql-test-run.sh:
  Portability fixes
  Added --ddd and --debug options
scripts/mysqld_multi.sh:
  Add pathname to mysqladmin
sql-bench/Results/ATIS-mysql-Linux_2.2.13_SMP_alpha:
  New benchmark results
sql-bench/Results/RUN-mysql-Linux_2.2.13_SMP_alpha:
  New benchmark results
sql-bench/Results/alter-table-mysql-Linux_2.2.13_SMP_alpha:
  New benchmark results
sql-bench/Results/big-tables-mysql-Linux_2.2.13_SMP_alpha:
  New benchmark results
sql-bench/Results/connect-mysql-Linux_2.2.13_SMP_alpha:
  New benchmark results
sql-bench/Results/create-mysql-Linux_2.2.13_SMP_alpha:
  New benchmark results
sql-bench/Results/insert-mysql-Linux_2.2.13_SMP_alpha:
  New benchmark results
sql-bench/Results/select-mysql-Linux_2.2.13_SMP_alpha:
  New benchmark results
sql-bench/Results/wisconsin-mysql-Linux_2.2.13_SMP_alpha:
  New benchmark results
sql/mysqld.cc:
  Some fixes for gemini
sql/sql_table.cc:
  Fixed bug with ALTER TABLE on HEAP tables
parent 687128d1
......@@ -38289,10 +38289,11 @@ To be consistent with our setup, you should put your result files in
test produces more than one result, you should use @code{test_name.a.result},
@code{test_name.b.result}, etc
@item
Failed test results are put in a file with the same name as the result file
followed by @code{.reject} extenstion. If your test case is failing, you
should do a diff on the two files. If you cannot see how they are different,
examine both with @code{od -c} and also check their lengths.
Failed test results are put in a file with the same base name as the
result file with the @code{.reject} extenstion. If your test case is
failing, you should do a diff on the two files. If you cannot see how
they are different, examine both with @code{od -c} and also check their
lengths.
@item
You can prefix a query with @code{!} if the test can continue after that query
returns an error.
......@@ -40057,7 +40058,8 @@ though, so Version 3.23 is not released as a stable version yet.
@itemize @bullet
@item
Allow hex constants in the @code{--fields-*-by} and
@code{--lines-terminated-by} options to @code{mysqldump}. By Paul DuBois.
@code{--lines-terminated-by} options to @code{mysqldump} and
@code{mysqlimport}. By Paul DuBois.
@item
Added option @code{--safe-show-databases}.
@item
......@@ -26,6 +26,7 @@ typedef struct st_line_buffer
uint bufread; /* Number of bytes to get with each read(). */
uint eof;
ulong max_size;
ulong read_length; /* Length of last read string */
} LINE_BUFFER;
extern LINE_BUFFER *batch_readline_init(ulong max_size,FILE *file);
......
......@@ -903,7 +903,6 @@ static bool add_line(String &buffer,char *line,char *in_string)
continue;
#ifdef USE_MB
int l;
/* if ((l = ismbchar(pos, pos+MBMAXLEN))) { Wei He: I think it's wrong! */
if (use_mb(default_charset_info) &&
(l = my_ismbchar(default_charset_info, pos, strend))) {
while (l--)
......
......@@ -122,7 +122,6 @@ static struct option long_options[] = {
{"socket", required_argument, 0, 'S'},
{"sleep", required_argument, 0, 'i'},
#include "sslopt-longopts.h"
{"connect-timeout", required_argument, 0, 't'},
#ifndef DONT_ALLOW_USER_CHANGE
{"user", required_argument, 0, 'u'},
#endif
......
......@@ -37,7 +37,7 @@
** Tnu Samuel <tonu@please.do.not.remove.this.spam.ee>
**/
#define DUMP_VERSION "8.11"
#define DUMP_VERSION "8.12"
#include <global.h>
#include <my_sys.h>
......@@ -862,11 +862,16 @@ static char *add_load_option(char *ptr,const char *object,
const char *statement)
{
if (object)
{
if (!strncasecmp(object,"0x",2)) /* hex constant; don't escape */
ptr= strxmov(ptr," ",statement," ",object,NullS);
else /* char constant; escape */
{
ptr= strxmov(ptr," ",statement," '",NullS);
ptr= field_escape(ptr,object,(uint) strlen(object));
*ptr++= '\'';
}
}
return ptr;
} /* add_load_option */
......
......@@ -25,7 +25,7 @@
** * *
** *************************
*/
#define IMPORT_VERSION "2.6"
#define IMPORT_VERSION "2.7"
#include <global.h>
#include <my_sys.h>
......
......@@ -1096,10 +1096,7 @@ void str_to_file(const char* fname, char* str, int size)
void reject_dump(const char* record_file, char* buf, int size)
{
char reject_file[FN_REFLEN];
if (strlen(record_file) >= FN_REFLEN-8)
die("too long path name for reject");
strmov(strmov(reject_file, record_file),".reject");
str_to_file(reject_file, buf, size);
str_to_file(fn_format(reject_file, record_file,"",".reject",2), buf, size);
}
......
......@@ -26,7 +26,7 @@ static bool init_line_buffer(LINE_BUFFER *buffer,File file,ulong size,
ulong max_size);
static bool init_line_buffer_from_string(LINE_BUFFER *buffer,my_string str);
static uint fill_buffer(LINE_BUFFER *buffer);
static char *intern_read_line(LINE_BUFFER *buffer,uint *out_length);
static char *intern_read_line(LINE_BUFFER *buffer,ulong *out_length);
LINE_BUFFER *batch_readline_init(ulong max_size,FILE *file)
......@@ -46,12 +46,13 @@ LINE_BUFFER *batch_readline_init(ulong max_size,FILE *file)
char *batch_readline(LINE_BUFFER *line_buff)
{
char *pos;
uint out_length;
ulong out_length;
if (!(pos=intern_read_line(line_buff,&out_length)))
return 0;
if (out_length && pos[out_length-1] == '\n')
out_length--; /* Remove '\n' */
line_buff->read_length=out_length;
pos[out_length]=0;
return pos;
}
......@@ -187,7 +188,7 @@ static uint fill_buffer(LINE_BUFFER *buffer)
char *intern_read_line(LINE_BUFFER *buffer,uint *out_length)
char *intern_read_line(LINE_BUFFER *buffer,ulong *out_length)
{
char *pos;
uint length;
......@@ -210,7 +211,7 @@ char *intern_read_line(LINE_BUFFER *buffer,uint *out_length)
pos--; /* break line here */
}
buffer->end_of_line=pos+1;
*out_length=(uint) (pos + 1 - buffer->eof - buffer->start_of_line);
*out_length=(ulong) (pos + 1 - buffer->eof - buffer->start_of_line);
DBUG_RETURN(buffer->start_of_line);
}
}
......@@ -38,6 +38,7 @@ HP_INFO *heap_open(const char *name, int mode, uint keys, HP_KEYDEF *keydef,
pthread_mutex_lock(&THR_LOCK_heap);
if (!(share=_hp_find_named_heap(name)))
{
DBUG_PRINT("info",("Initializing new table"));
for (i=key_segs=max_length=0 ; i < keys ; i++)
{
key_segs+= keydef[i].keysegs;
......
......@@ -82,7 +82,7 @@ int mrg_rrnd(MRG_INFO *info,byte *buf,mrg_off_t filepos)
}
}
info->current_table=find_table(info->open_tables,
info->end_table,filepos);
info->end_table-1,filepos);
isam_info=info->current_table->table;
isam_info->update&= HA_STATE_CHANGED;
return ((*isam_info->s->read_rnd)(isam_info,(byte*) buf,
......
......@@ -17,16 +17,16 @@ else
fix_bin=.
fi
vardir=var
logdir=$vardir/log
if [ x$1 = x"-slave" ]
then
shift 1
data=var/slave-data
ldata=$fix_bin/var/slave-data
logdir=var/log
else
data=var/lib
ldata=$fix_bin/var/lib
logdir=var/log
fi
mdata=$data/mysql
......@@ -45,9 +45,13 @@ hostname=`hostname` # Install this too in the user table
resolved=127.0.0.1
#create the directories
[ -d $vardir ] || mkdir $vardir
[ -d $logdir ] || mkdir $logdir
# Create database directories mysql & test
if [ -d $data ] ; then rm -rf $data ; fi
mkdir -p $data $data/mysql $data/test
mkdir $data $data/mysql $data/test
#for error messages
if [ x$BINARY_DIST = x1 ] ; then
......@@ -59,9 +63,6 @@ mkdir share
ln -sf ../../sql/share share/mysql
fi
#create the directory for logs
mkdir -p $logdir
# Initialize variables
c_d="" i_d=""
c_h="" i_h=""
......
......@@ -54,35 +54,32 @@ TOT_TEST=0
USERT=0
SYST=0
REALT=0
MY_TMP_DIR=$MYSQL_TEST_DIR/var/tmp
TIMEFILE="$MYSQL_TEST_DIR/var/tmp/mysqltest-time"
MYSQL_TMP_DIR=$MYSQL_TEST_DIR/var/tmp
TIMEFILE="$MYSQL_TMP_DIR/mysqltest-time"
RES_SPACE=" "
MYSQLD_SRC_DIRS="strings mysys include extra regex isam merge myisam \
myisammrg heap sql"
GCOV_MSG=/tmp/mysqld-gcov.out
GCOV_ERR=/tmp/mysqld-gcov.err
GCOV_MSG=$MYSQL_TMP_DIR/mysqld-gcov.out
GCOV_ERR=$MYSQL_TMP_DIR/mysqld-gcov.err
MASTER_RUNNING=0
SLAVE_RUNNING=0
[ -d $MY_TMP_DIR ] || mkdir -p $MY_TMP_DIR
#++
# mysqld Environment Parameters
#--
MYRUN_DIR=var/run
MYRUN_DIR=$MYSQL_TEST_DIR/var/run
MASTER_MYPORT=9306
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_MYSOCK="$MYSQL_TMP_DIR/mysql.sock"
MASTER_MYPID="$MYRUN_DIR/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="$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_MYSOCK="$MYSQL_TMP_DIR/mysql-slave.sock"
SLAVE_MYPID="$MYRUN_DIR/mysqld-slave.pid"
SLAVE_MYLOG="$MYSQL_TEST_DIR/var/log/mysqld-slave.log"
SLAVE_MYERR="$MYSQL_TEST_DIR/var/log/mysqld-slave.err"
......@@ -92,6 +89,15 @@ else
MY_BASEDIR=$BASEDIR
fi
# Create the directories
# This should be fixed to be not be dependent on the contence of MYSQL_TMP_DIR
# or MYRUN_DIR
# (mkdir -p is not portable)
[ -d $MYSQL_TEST_DIR/var ] || mkdir $MYSQL_TEST_DIR/var
[ -d $MYSQL_TEST_DIR/var/tmp ] || mkdir $MYSQL_TEST_DIR/var/tmp
[ -d $MYSQL_TEST_DIR/var/run ] || mkdir $MYSQL_TEST_DIR/var/run
#++
# Program Definitions
#--
......@@ -124,15 +130,15 @@ else
MYSQLD="$BASEDIR/bin/mysqld"
MYSQL_TEST="$BASEDIR/bin/mysqltest"
MYSQLADMIN="$BASEDIR/bin/mysqladmin"
INSTALL_DB="../scripts/install_test_db -bin"
INSTALL_DB="./install_test_db -bin"
fi
SLAVE_MYSQLD=$MYSQLD #this will be changed later if we are doing gcov
MYSQL_TEST="$MYSQL_TEST --no-defaults --socket=$MASTER_MYSOCK --database=$DB --user=$DBUSER --password=$DBPASSWD --silent -v"
GDB_MASTER_INIT=/tmp/gdbinit.master
GDB_SLAVE_INIT=/tmp/gdbinit.slave
GDB_MASTER_INIT=$MYSQL_TMP_DIR/gdbinit.master
GDB_SLAVE_INIT=$MYSQL_TMP_DIR/gdbinit.slave
while test $# -gt 0; do
case "$1" in
......@@ -151,6 +157,16 @@ while test $# -gt 0; do
fi
DO_GDB=1
;;
--ddd )
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_DDD=1
;;
--debug)
EXTRA_MASTER_MYSQLD_OPT=--debug=d:t:O,$MYSQL_TMP_DIR/master.trace
EXTRA_SLAVE_MYSQLD_OPT=--debug=d:t:O,$MYSQL_TMP_DIR/slave.trace
;;
-- ) shift; break ;;
--* ) $ECHO "Unrecognized option: $1"; exit 1 ;;
* ) break ;;
......@@ -200,7 +216,7 @@ total_inc () {
report_stats () {
if [ $TOT_FAIL = 0 ]; then
$ECHO "All tests successful."
$ECHO "All $TOT_TEST tests were successful."
else
xten=`$EXPR $TOT_PASS \* 10000`
raw=`$EXPR $xten / $TOT_TEST`
......@@ -216,7 +232,6 @@ mysql_install_db () {
$ECHO "Removing Stale Files"
$RM -rf $MASTER_MYDDIR $SLAVE_MYDDIR $SLAVE_MYLOG $MASTER_MYLOG \
$SLAVE_MYERR $MASTER_MYERR
[ -d $MYRUN_DIR ] || mkdir -p $MYRUN_DIR
$ECHO "Installing Master Databases"
$INSTALL_DB
if [ $? != 0 ]; then
......@@ -256,6 +271,8 @@ start_master()
{
[ x$MASTER_RUNNING = 1 ] && return
cd $BASEDIR # for gcov
# Remove old berkeley db log files that can confuse the server
$RM -f $MASTER_MYDDIR/log.*
#start master
master_args="--no-defaults --log-bin=master-bin \
--server-id=1 \
......@@ -266,8 +283,13 @@ start_master()
--pid-file=$MASTER_MYPID \
--socket=$MASTER_MYSOCK \
--log=$MASTER_MYLOG \
--language=english $EXTRA_MASTER_OPT"
if [ x$DO_GDB = x1 ]
--language=english $EXTRA_MASTER_OPT $EXTRA_MASTER_MYSQLD_OPT"
if [ x$DO_DDD = x1 ]
then
$ECHO "set args $master_args" > $GDB_MASTER_INIT
ddd --debugger "gdb -x $GDB_MASTER_INIT" $MYSQLD &
prompt_user "Hit enter to continue after you've started the master"
elif [ x$DO_GDB = x1 ]
then
$ECHO "set args $master_args" > $GDB_MASTER_INIT
xterm -title "Master" -e gdb -x $GDB_MASTER_INIT $MYSQLD &
......@@ -292,6 +314,7 @@ start_slave()
master_info=$SLAVE_MASTER_INFO
fi
$RM -f $SLAVE_MYDDIR/log.*
slave_args="--no-defaults $master_info \
--exit-info=256 \
--log-bin=slave-bin --log-slave-updates \
......@@ -301,8 +324,13 @@ start_slave()
--port=$SLAVE_MYPORT \
--socket=$SLAVE_MYSOCK \
--log=$SLAVE_MYLOG \
--language=english $EXTRA_SLAVE_OPT"
if [ x$DO_GDB = x1 ]
--language=english $EXTRA_SLAVE_OPT $EXTRA_SLAVE_MYSQLD_OPT"
if [ x$DO_DDD = x1 ]
then
$ECHO "set args $master_args" > $GDB_SLAVE_INIT
ddd --debugger "gdb -x $GDB_SLAVE_INIT" $MYSQLD &
prompt_user "Hit enter to continue after you've started the master"
elif [ x$DO_GDB = x1 ]
then
$ECHO "set args $slave_args" > $GDB_SLAVE_INIT
xterm -title "Slave" -e gdb -x $GDB_SLAVE_INIT $SLAVE_MYSQLD &
......@@ -447,12 +475,12 @@ run_testcase ()
cd $MYSQL_TEST_DIR
if [ -f $tf ] ; then
$RM -f r/$tname.*.reject
$RM -f r/$tname.*reject
mytime=`$TIME -p $MYSQL_TEST -R r/$tname.result $extra_flags \
< $tf 2> $TIMEFILE`
res=$?
if [ $res == 0 ]; then
if [ $res = 0 ]; then
mytime=`$CAT $TIMEFILE | $TR '\n' '-'`
USERT=`$ECHO $mytime | $CUT -d - -f 2 | $CUT -d ' ' -f 2`
......@@ -473,12 +501,12 @@ run_testcase ()
if [ $res == 0 ]; then
if [ $res = 0 ]; then
total_inc
pass_inc
$ECHO "$RES_SPACE [ pass ]"
else
if [ $res == 1 ]; then
if [ $res = 1 ]; then
total_inc
fail_inc
$ECHO "$RES_SPACE [ fail ]"
......@@ -505,16 +533,24 @@ run_testcase ()
}
######################################################################
# Main script starts here
######################################################################
[ "$DO_GCOV" -a ! -x "$GCOV" ] && error "No gcov found"
[ "$DO_GCOV" ] && gcov_prepare
# Ensure that no old mysqld test servers are running
$MYSQLADMIN --no-defaults --socket=$MASTER_MYSOCK -u root -O connect_timeout=5 shutdown > /dev/null 2>&1
$MYSQLADMIN --no-defaults --socket=$SLAVE_MYSOCK -u root -O connect_timeout=5 shutdown > /dev/null 2>&1
$ECHO "Installing Test Databases"
mysql_install_db
#do not automagically start deamons if we are in gdb or running only one test
#case
if [ -z "$DO_GDB" ] && [ -z "$1" ]
if [ -z "$DO_GDB" ] && [ -z "$1" ] && [ -z "$DO_DDD" ]
then
mysql_start
fi
......@@ -553,7 +589,7 @@ $ECHO
$RM -f $TIMEFILE
if [ -z "$DO_GDB" ] ;
if [ -z "$DO_GDB" ] && [ -z "$DO_DDD" ]
then
mysql_stop
fi
......
......@@ -10,7 +10,7 @@ $opt_config_file = undef();
$opt_example = 0;
$opt_help = 0;
$opt_log = "/tmp/mysqld_multi.log";
$opt_mysqladmin = "mysqladmin";
$opt_mysqladmin = "@bindir@/mysqladmin";
$opt_mysqld = "@libexecdir@/mysqld";
$opt_no_log = 0;
$opt_password = undef();
......
Testing server 'MySQL 3.23.29 gamma' at 2000-11-28 17:24:55
Testing server 'MySQL 3.23.30 gamma' at 2000-12-28 15:29:27
ATIS table test
......@@ -6,14 +6,15 @@ Creating tables
Time for create_table (28): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Inserting data
Time to insert (9768): 4 wallclock secs ( 0.64 usr 0.64 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to insert (9768): 3 wallclock secs ( 0.64 usr 0.61 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Retrieving data
Time for select_simple_join (500): 1 wallclock secs ( 0.66 usr 0.38 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_join (200): 12 wallclock secs ( 4.45 usr 3.14 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_distinct (800): 11 wallclock secs ( 1.77 usr 0.97 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_group (2800): 10 wallclock secs ( 1.59 usr 0.65 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_simple_join (500): 2 wallclock secs ( 0.62 usr 0.39 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_join (100): 2 wallclock secs ( 0.47 usr 0.35 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_key_prefix_join (100): 10 wallclock secs ( 3.80 usr 2.75 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_distinct (800): 11 wallclock secs ( 1.63 usr 1.04 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_group (2800): 10 wallclock secs ( 1.48 usr 0.66 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Removing tables
Time to drop_table (28): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 38 wallclock secs ( 9.13 usr 5.79 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 38 wallclock secs ( 8.65 usr 5.80 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.29 gamma' at 2000-11-28 17:25:34
Testing server 'MySQL 3.23.30 gamma' at 2000-12-28 15:30:07
Testing of ALTER TABLE
Testing with 1000 columns and 1000 rows in 20 steps
Insert data into the table
Time for insert (1000) 0 wallclock secs ( 0.06 usr 0.06 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for alter_table_add (992): 213 wallclock secs ( 0.17 usr 0.07 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for alter_table_add (992): 213 wallclock secs ( 0.17 usr 0.06 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for create_index (8): 4 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for drop_index (8): 4 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for alter_table_drop (496): 170 wallclock secs ( 0.07 usr 0.03 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for alter_table_drop (496): 175 wallclock secs ( 0.06 usr 0.04 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 391 wallclock secs ( 0.31 usr 0.17 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 396 wallclock secs ( 0.30 usr 0.17 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.29 gamma' at 2000-11-28 17:32:05
Testing server 'MySQL 3.23.30 gamma' at 2000-12-28 15:36:43
Testing of some unusual tables
All tests are done 1000 times with 1000 fields
Testing table with 1000 fields
Testing select * from table with 1 record
Time to select_many_fields(1000): 10 wallclock secs ( 3.93 usr 5.07 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to select_many_fields(1000): 10 wallclock secs ( 3.89 usr 5.32 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing select all_fields from table with 1 record
Time to select_many_fields(1000): 16 wallclock secs ( 4.06 usr 5.04 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to select_many_fields(1000): 16 wallclock secs ( 4.05 usr 5.28 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing insert VALUES()
Time to insert_many_fields(1000): 5 wallclock secs ( 0.33 usr 0.07 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to insert_many_fields(1000): 5 wallclock secs ( 0.32 usr 0.07 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing insert (all_fields) VALUES()
Time to insert_many_fields(1000): 9 wallclock secs ( 0.02 usr 0.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to insert_many_fields(1000): 9 wallclock secs ( 0.03 usr 0.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 41 wallclock secs ( 8.35 usr 10.24 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 41 wallclock secs ( 8.30 usr 10.73 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.29 gamma' at 2000-11-28 17:32:46
Testing server 'MySQL 3.23.30 gamma' at 2000-12-28 15:37:25
Testing the speed of connecting to the server and sending of data
All tests are done 10000 times
Testing connection/disconnect
Time to connect (10000): 14 wallclock secs ( 7.49 usr 2.43 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to connect (10000): 13 wallclock secs ( 7.51 usr 2.43 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Test connect/simple select/disconnect
Time for connect+select_simple (10000): 15 wallclock secs ( 7.61 usr 3.24 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for connect+select_simple (10000): 16 wallclock secs ( 7.69 usr 3.23 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Test simple select
Time for select_simple (10000): 2 wallclock secs ( 0.28 usr 0.77 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_simple (10000): 1 wallclock secs ( 0.31 usr 0.80 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing connect/select 1 row from table/disconnect
Time to connect+select_1_row (10000): 17 wallclock secs ( 7.59 usr 3.33 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to connect+select_1_row (10000): 17 wallclock secs ( 7.95 usr 3.44 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing select 1 row from table
Time to select_1_row (10000): 2 wallclock secs ( 0.35 usr 0.95 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to select_1_row (10000): 2 wallclock secs ( 0.46 usr 1.12 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing select 2 rows from table
Time to select_2_rows (10000): 3 wallclock secs ( 0.34 usr 1.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to select_2_rows (10000): 3 wallclock secs ( 0.36 usr 1.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Test select with aritmetic (+)
Time for select_column+column (10000): 3 wallclock secs ( 0.26 usr 0.67 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_column+column (10000): 3 wallclock secs ( 0.28 usr 0.76 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing retrieval of big records (65000 bytes)
Time to select_big (10000): 20 wallclock secs ( 7.74 usr 6.67 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to select_big (10000): 19 wallclock secs ( 7.75 usr 6.19 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 76 wallclock secs (31.66 usr 19.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 74 wallclock secs (32.31 usr 18.97 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.29 gamma' at 2000-11-28 17:34:02
Testing server 'MySQL 3.23.30 gamma' at 2000-12-28 15:38:39
Testing the speed of creating and droping tables
Testing with 10000 tables and 10000 loop count
Testing create of tables
Time for create_MANY_tables (10000): 90 wallclock secs ( 1.79 usr 0.64 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for create_MANY_tables (10000): 164 wallclock secs ( 1.93 usr 0.57 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Accessing tables
Time to select_group_when_MANY_tables (10000): 6 wallclock secs ( 0.96 usr 0.87 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to select_group_when_MANY_tables (10000): 6 wallclock secs ( 0.84 usr 0.83 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing drop
Time for drop_table_when_MANY_tables (10000): 7 wallclock secs ( 0.62 usr 0.61 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for drop_table_when_MANY_tables (10000): 7 wallclock secs ( 0.68 usr 0.64 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing create+drop
Time for create+drop (10000): 13 wallclock secs ( 2.68 usr 1.04 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for create_key+drop (10000): 17 wallclock secs ( 4.18 usr 1.32 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 133 wallclock secs (10.24 usr 4.48 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for create+drop (10000): 13 wallclock secs ( 2.77 usr 1.02 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for create_key+drop (10000): 17 wallclock secs ( 4.14 usr 1.36 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 207 wallclock secs (10.36 usr 4.42 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.29 gamma' at 2000-11-28 18:06:37
Testing server 'MySQL 3.23.30 gamma' at 2000-12-28 16:14:21
Testing the speed of selecting on keys that consist of many parts
The test-table has 10000 rows and the test is done with 500 ranges.
Creating table
Inserting 10000 rows
Time to insert (10000): 4 wallclock secs ( 0.76 usr 0.58 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to insert (10000): 3 wallclock secs ( 0.72 usr 0.71 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing big selects on the table
Time for select_big (70:17207): 1 wallclock secs ( 0.14 usr 0.09 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range (410:1057904): 229 wallclock secs ( 8.56 usr 5.62 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for min_max_on_key (70000): 166 wallclock secs (21.04 usr 6.26 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_on_key (50000): 389 wallclock secs (15.72 usr 4.52 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range (410:1057904): 227 wallclock secs ( 9.67 usr 5.91 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for min_max_on_key (70000): 153 wallclock secs (21.55 usr 6.38 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_on_key (50000): 355 wallclock secs (16.42 usr 4.53 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_group_on_key_parts (1000:100000): 40 wallclock secs ( 1.00 usr 0.61 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_group_on_key_parts (1000:100000): 38 wallclock secs ( 1.16 usr 0.66 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing count(distinct) on the table
Time for count_distinct (2000:2000): 92 wallclock secs ( 0.69 usr 0.21 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group_on_key (1000:6000): 42 wallclock secs ( 0.43 usr 0.14 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group_on_key_parts (1000:100000): 63 wallclock secs ( 1.10 usr 0.62 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group (1000:100000): 64 wallclock secs ( 1.06 usr 0.66 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_big (100:1000000): 80 wallclock secs ( 7.23 usr 8.53 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 1170 wallclock secs (57.76 usr 27.85 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct (2000:2000): 102 wallclock secs ( 0.71 usr 0.21 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group_on_key (1000:6000): 42 wallclock secs ( 0.45 usr 0.16 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group_on_key_parts (1000:100000): 62 wallclock secs ( 1.20 usr 0.66 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group (1000:100000): 63 wallclock secs ( 1.16 usr 0.69 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_big (100:1000000): 81 wallclock secs ( 8.00 usr 9.24 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 1127 wallclock secs (61.16 usr 29.24 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.29 gamma' at 2000-11-28 18:26:07
Testing server 'MySQL 3.23.30 gamma' at 2000-12-28 16:33:09
Wisconsin benchmark test
Time for create_table (3): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Inserting data
Time to insert (31000): 14 wallclock secs ( 1.82 usr 1.89 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to insert (31000): 14 wallclock secs ( 1.87 usr 1.88 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to delete_big (1): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Running actual benchmark
Time for wisc_benchmark (114): 4 wallclock secs ( 1.88 usr 0.93 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for wisc_benchmark (114): 4 wallclock secs ( 1.71 usr 0.98 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 18 wallclock secs ( 3.70 usr 2.82 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 18 wallclock secs ( 3.58 usr 2.86 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
......@@ -2351,7 +2351,8 @@ enum options {
OPT_INNOBASE_DATA_HOME_DIR,OPT_INNOBASE_DATA_FILE_PATH,
OPT_INNOBASE_LOG_GROUP_HOME_DIR,
OPT_INNOBASE_LOG_ARCH_DIR, OPT_INNOBASE_LOG_ARCHIVE,
OPT_INNOBASE_FLUSH_LOG_AT_TRX_COMMIT, OPT_SAFE_SHOW_DB
OPT_INNOBASE_FLUSH_LOG_AT_TRX_COMMIT, OPT_SAFE_SHOW_DB,
OPT_GEMINI_SKIP,
};
static struct option long_options[] = {
......@@ -2462,6 +2463,9 @@ static struct option long_options[] = {
#endif
#ifdef HAVE_INNOBASE_DB
{"skip-innobase", no_argument, 0, (int) OPT_INNOBASE_SKIP},
#endif
#ifdef HAVE_GEMINI_DB
{"skip-gemini", no_argument, 0, (int) OPT_GEMINI_SKIP},
#endif
{"skip-concurrent-insert", no_argument, 0, (int) OPT_SKIP_CONCURRENT_INSERT},
{"skip-delay-key-write", no_argument, 0, (int) OPT_SKIP_DELAY_KEY_WRITE},
......@@ -3387,6 +3391,12 @@ static void get_options(int argc,char **argv)
have_berkeley_db=SHOW_OPTION_DISABLED;
break;
#endif
#ifdef HAVE_GEMINI_DB
case OPT_GEMINI_SKIP:
gemini_skip=1;
have_gemini_db=SHOW_OPTION_DISABLED;
break;
#endif
#ifdef HAVE_INNOBASE_DB
case OPT_INNOBASE_SKIP:
innobase_skip=1;
......
......@@ -1426,7 +1426,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
{
char path[FN_REFLEN];
(void) sprintf(path,"%s/%s/%s",mysql_data_home,new_db,tmp_name);
fn_format(path,path,"","",4+16+32);
fn_format(path,path,"","",4);
new_table=open_temporary_table(thd, path, new_db, tmp_name,0);
}
if (!new_table)
......
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