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>
......@@ -863,9 +863,14 @@ static char *add_load_option(char *ptr,const char *object,
{
if (object)
{
ptr= strxmov(ptr," ",statement," '",NullS);
ptr= field_escape(ptr,object,(uint) strlen(object));
*ptr++= '\'';
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
......@@ -249,13 +264,15 @@ gcov_collect () {
cd $MYSQL_TEST_DIR
done
$ECHO "gcov info in $GCOV_MSG, errors in $GCOV_ERR"
$ECHO "gcov info in $GCOV_MSG, errors in $GCOV_ERR"
}
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)
Benchmark DBD suite: 2.10
Date of test: 2000-11-28 17:24:55
Benchmark DBD suite: 2.11
Date of test: 2000-12-28 17:09:41
Running tests on: Linux 2.2.13-SMP alpha
Arguments:
Comments: Alpha DS20 2x500 MHz, 2G memory, key_buffer=16M; gcc 2.95.2 + ccc
Comments: Alpha DS20 2x500 MHz, 2G memory, key_buffer=16M; cxx 6.3 + ccc 6.2.9
Limits from:
Server version: MySQL 3.23.29 gamma
Server version: MySQL 3.23.30 gamma
ATIS: Total time: 38 wallclock secs ( 9.13 usr 5.79 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
alter-table: Total time: 391 wallclock secs ( 0.31 usr 0.17 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
big-tables: Total time: 41 wallclock secs ( 8.35 usr 10.24 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
connect: Total time: 76 wallclock secs (31.66 usr 19.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
create: Total time: 133 wallclock secs (10.24 usr 4.48 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
insert: Total time: 1821 wallclock secs (430.65 usr 226.65 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
select: Total time: 1170 wallclock secs (57.76 usr 27.85 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
wisconsin: Total time: 18 wallclock secs ( 3.70 usr 2.82 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
ATIS: Total time: 38 wallclock secs ( 8.65 usr 5.80 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
alter-table: Total time: 396 wallclock secs ( 0.30 usr 0.17 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
big-tables: Total time: 41 wallclock secs ( 8.30 usr 10.73 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
connect: Total time: 74 wallclock secs (32.31 usr 18.97 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
create: Total time: 207 wallclock secs (10.36 usr 4.42 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
insert: Total time: 1932 wallclock secs (465.91 usr 251.37 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
select: Total time: 1127 wallclock secs (61.16 usr 29.24 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
wisconsin: Total time: 18 wallclock secs ( 3.58 usr 2.86 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
All 8 test executed successfully
Totals per operation:
Operation seconds usr sys cpu tests
alter_table_add 213.00 0.17 0.07 0.00 992
alter_table_drop 170.00 0.07 0.03 0.00 496
connect 14.00 7.49 2.43 0.00 10000
connect+select_1_row 17.00 7.59 3.33 0.00 10000
connect+select_simple 15.00 7.61 3.24 0.00 10000
count 48.00 0.03 0.01 0.00 100
count_distinct 92.00 0.69 0.21 0.00 2000
count_distinct_big 135.00 7.24 8.53 0.00 120
count_distinct_group 64.00 1.06 0.66 0.00 1000
count_distinct_group_on_key 42.00 0.43 0.14 0.00 1000
count_distinct_group_on_key_parts 63.00 1.10 0.62 0.00 1000
count_group_on_key_parts 40.00 1.00 0.61 0.00 1000
count_on_key 428.00 15.76 4.53 0.00 50100
create+drop 13.00 2.68 1.04 0.00 10000
create_MANY_tables 90.00 1.79 0.64 0.00 10000
alter_table_add 213.00 0.17 0.06 0.00 992
alter_table_drop 175.00 0.06 0.04 0.00 496
connect 13.00 7.51 2.43 0.00 10000
connect+select_1_row 17.00 7.95 3.44 0.00 10000
connect+select_simple 16.00 7.69 3.23 0.00 10000
count 50.00 0.04 0.01 0.00 100
count_distinct 102.00 0.71 0.21 0.00 2000
count_distinct_big 133.00 8.01 9.25 0.00 120
count_distinct_group 63.00 1.16 0.69 0.00 1000
count_distinct_group_on_key 42.00 0.45 0.16 0.00 1000
count_distinct_group_on_key_parts 62.00 1.20 0.66 0.00 1000
count_group_on_key_parts 38.00 1.16 0.66 0.00 1000
count_on_key 395.00 16.46 4.54 0.00 50100
create+drop 13.00 2.77 1.02 0.00 10000
create_MANY_tables 164.00 1.93 0.57 0.00 10000
create_index 4.00 0.00 0.00 0.00 8
create_key+drop 17.00 4.18 1.32 0.00 10000
create_key+drop 17.00 4.14 1.36 0.00 10000
create_table 0.00 0.00 0.00 0.00 31
delete_all 11.00 0.00 0.00 0.00 12
delete_all_many_keys 49.00 0.02 0.01 0.00 1
delete_all_many_keys 50.00 0.01 0.01 0.00 1
delete_big 0.00 0.00 0.00 0.00 1
delete_big_many_keys 49.00 0.02 0.01 0.00 128
delete_key 4.00 0.66 0.53 0.00 10000
delete_big_many_keys 50.00 0.01 0.01 0.00 128
delete_key 5.00 0.60 0.53 0.00 10000
drop_index 4.00 0.00 0.00 0.00 8
drop_table 0.00 0.00 0.00 0.00 28
drop_table_when_MANY_tables 7.00 0.62 0.61 0.00 10000
insert 137.00 24.96 21.11 0.00 350768
insert_duplicates 38.00 5.63 6.17 0.00 100000
insert_key 94.00 7.67 5.66 0.00 100000
drop_table_when_MANY_tables 7.00 0.68 0.64 0.00 10000
insert 133.00 23.24 21.08 0.00 350768
insert_duplicates 38.00 5.55 6.19 0.00 100000
insert_key 96.00 8.23 5.98 0.00 100000
insert_many_fields 14.00 0.35 0.12 0.00 2000
insert_select_1_key 5.00 0.00 0.00 0.00 1
insert_select_1_key 6.00 0.00 0.00 0.00 1
insert_select_2_keys 6.00 0.00 0.00 0.00 1
min_max 20.00 0.02 0.00 0.00 60
min_max_on_key 175.00 25.68 7.59 0.00 85000
multiple_value_insert 7.00 2.15 0.05 0.00 100000
order_by_big 54.00 22.33 21.66 0.00 10
order_by_big_key 36.00 21.23 14.75 0.00 10
order_by_big_key2 37.00 21.94 15.04 0.00 10
order_by_big_key_desc 37.00 21.53 14.74 0.00 10
order_by_big_key_diff 51.00 22.21 21.67 0.00 10
order_by_key 2.00 1.14 0.63 0.00 500
order_by_key2_diff 5.00 1.99 1.23 0.00 500
order_by_range 5.00 1.14 0.64 0.00 500
outer_join 57.00 0.00 0.00 0.00 10
outer_join_found 52.00 0.00 0.00 0.00 10
outer_join_not_found 34.00 0.00 0.00 0.00 500
outer_join_on_key 38.00 0.01 0.00 0.00 10
select_1_row 2.00 0.35 0.95 0.00 10000
select_2_rows 3.00 0.34 1.00 0.00 10000
select_big 56.00 28.86 21.57 0.00 10080
select_column+column 3.00 0.26 0.67 0.00 10000
select_diff_key 148.00 0.21 0.05 0.00 500
select_distinct 11.00 1.77 0.97 0.00 800
select_group 49.00 1.63 0.66 0.00 2911
select_group_when_MANY_tables 6.00 0.96 0.87 0.00 10000
select_join 12.00 4.45 3.14 0.00 200
select_key 137.00 73.10 21.05 0.00 200000
select_key2 142.00 72.16 21.15 0.00 200000
select_key_prefix 143.00 72.60 21.07 0.00 200000
select_many_fields 26.00 7.99 10.11 0.00 2000
select_range 229.00 8.56 5.62 0.00 410
select_range_key2 19.00 6.47 2.33 0.00 25010
select_range_prefix 20.00 6.51 2.25 0.00 25010
select_simple 2.00 0.28 0.77 0.00 10000
select_simple_join 1.00 0.66 0.38 0.00 500
update_big 27.00 0.00 0.00 0.00 10
update_of_key 48.00 3.45 3.04 0.00 50256
update_of_key_big 18.00 0.04 0.03 0.00 501
update_with_key 134.00 18.92 18.69 0.00 300000
wisc_benchmark 4.00 1.88 0.93 0.00 114
TOTALS 3733.00 551.64 296.93 0.00 1946237
min_max 22.00 0.02 0.01 0.00 60
min_max_on_key 162.00 26.32 7.66 0.00 85000
multiple_value_insert 7.00 2.08 0.05 0.00 100000
order_by_big 53.00 20.57 21.79 0.00 10
order_by_big_key 38.00 22.77 15.36 0.00 10
order_by_big_key2 35.00 19.87 14.91 0.00 10
order_by_big_key_desc 38.00 22.72 15.24 0.00 10
order_by_big_key_diff 49.00 20.43 21.94 0.00 10
order_by_big_key_prefix 35.00 19.98 14.81 0.00 10
order_by_key2_diff 5.00 1.81 1.27 0.00 500
order_by_key_prefix 3.00 1.07 0.64 0.00 500
order_by_range 4.00 1.09 0.62 0.00 500
outer_join 60.00 0.00 0.00 0.00 10
outer_join_found 56.00 0.00 0.00 0.00 10
outer_join_not_found 37.00 0.00 0.00 0.00 500
outer_join_on_key 44.00 0.00 0.00 0.00 10
select_1_row 2.00 0.46 1.12 0.00 10000
select_2_rows 3.00 0.36 1.00 0.00 10000
select_big 56.00 28.42 21.18 0.00 10080
select_column+column 3.00 0.28 0.76 0.00 10000
select_diff_key 151.00 0.25 0.04 0.00 500
select_distinct 11.00 1.63 1.04 0.00 800
select_group 50.00 1.52 0.68 0.00 2911
select_group_when_MANY_tables 6.00 0.84 0.83 0.00 10000
select_join 2.00 0.47 0.35 0.00 100
select_key 141.00 75.34 22.71 0.00 200000
select_key2 146.00 75.75 22.08 0.00 200000
select_key_prefix 147.00 76.05 21.66 0.00 200000
select_key_prefix_join 10.00 3.80 2.75 0.00 100
select_many_fields 26.00 7.94 10.60 0.00 2000
select_range 227.00 9.67 5.91 0.00 410
select_range_key2 19.00 6.72 2.30 0.00 25010
select_range_prefix 19.00 6.65 2.24 0.00 25010
select_simple 1.00 0.31 0.80 0.00 10000
select_simple_join 2.00 0.62 0.39 0.00 500
update_big 26.00 0.00 0.00 0.00 10
update_of_key 48.00 3.60 3.12 0.00 50256
update_of_key_big 19.00 0.04 0.03 0.00 501
update_with_key 135.00 21.98 17.77 0.00 300000
update_with_key_prefix 42.00 7.22 5.96 0.00 100000
wisc_benchmark 4.00 1.71 0.98 0.00 114
TOTALS 3881.00 590.44 323.49 0.00 2046247
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 17:36:15
Testing server 'MySQL 3.23.30 gamma' at 2000-12-28 15:42:07
Testing the speed of inserting data into 1 table and do some selects on it.
The tests are done with a table that has 100000 rows.
......@@ -8,78 +8,80 @@ Creating tables
Inserting 100000 rows in order
Inserting 100000 rows in reverse order
Inserting 100000 rows in random order
Time for insert (300000): 115 wallclock secs (21.74 usr 18.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for insert (300000): 113 wallclock secs (20.01 usr 17.88 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing insert of duplicates
Time for insert_duplicates (100000): 38 wallclock secs ( 5.63 usr 6.17 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for insert_duplicates (100000): 38 wallclock secs ( 5.55 usr 6.19 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Retrieving data from the table
Time for select_big (10:3000000): 35 wallclock secs (20.98 usr 14.81 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for order_by_big_key (10:3000000): 36 wallclock secs (21.23 usr 14.75 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for order_by_big_key_desc (10:3000000): 37 wallclock secs (21.53 usr 14.74 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for order_by_big_key2 (10:3000000): 37 wallclock secs (21.94 usr 15.04 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for order_by_big_key_diff (10:3000000): 51 wallclock secs (22.21 usr 21.67 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for order_by_big (10:3000000): 54 wallclock secs (22.33 usr 21.66 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for order_by_range (500:125750): 5 wallclock secs ( 1.14 usr 0.64 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for order_by_key (500:125750): 2 wallclock secs ( 1.14 usr 0.63 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for order_by_key2_diff (500:250500): 5 wallclock secs ( 1.99 usr 1.23 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_diff_key (500:1000): 148 wallclock secs ( 0.21 usr 0.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range_prefix (5010:42084): 11 wallclock secs ( 2.83 usr 0.97 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range_key2 (5010:42084): 10 wallclock secs ( 2.80 usr 1.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_key_prefix (200000): 143 wallclock secs (72.60 usr 21.07 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_key (200000): 137 wallclock secs (73.10 usr 21.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_key2 (200000): 142 wallclock secs (72.16 usr 21.15 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_big (10:3000000): 36 wallclock secs (20.53 usr 14.90 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for order_by_big_key (10:3000000): 38 wallclock secs (22.77 usr 15.36 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for order_by_big_key_desc (10:3000000): 38 wallclock secs (22.72 usr 15.24 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for order_by_big_key_prefix (10:3000000): 35 wallclock secs (19.98 usr 14.81 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for order_by_big_key2 (10:3000000): 35 wallclock secs (19.87 usr 14.91 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for order_by_big_key_diff (10:3000000): 49 wallclock secs (20.43 usr 21.94 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for order_by_big (10:3000000): 53 wallclock secs (20.57 usr 21.79 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for order_by_range (500:125750): 4 wallclock secs ( 1.09 usr 0.62 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for order_by_key_prefix (500:125750): 3 wallclock secs ( 1.07 usr 0.64 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for order_by_key2_diff (500:250500): 5 wallclock secs ( 1.81 usr 1.27 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_diff_key (500:1000): 151 wallclock secs ( 0.25 usr 0.04 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range_prefix (5010:42084): 10 wallclock secs ( 2.87 usr 0.92 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range_key2 (5010:42084): 11 wallclock secs ( 2.92 usr 1.02 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_key_prefix (200000): 147 wallclock secs (76.05 usr 21.66 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_key (200000): 141 wallclock secs (75.34 usr 22.71 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_key2 (200000): 146 wallclock secs (75.75 usr 22.08 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Test of compares with simple ranges
Time for select_range_prefix (20000:43500): 9 wallclock secs ( 3.68 usr 1.28 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range_key2 (20000:43500): 9 wallclock secs ( 3.67 usr 1.33 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_group (111): 39 wallclock secs ( 0.04 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for min_max_on_key (15000): 9 wallclock secs ( 4.64 usr 1.33 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for min_max (60): 20 wallclock secs ( 0.02 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_on_key (100): 39 wallclock secs ( 0.04 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count (100): 48 wallclock secs ( 0.03 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_big (20): 55 wallclock secs ( 0.01 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range_prefix (20000:43500): 9 wallclock secs ( 3.78 usr 1.32 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range_key2 (20000:43500): 8 wallclock secs ( 3.80 usr 1.28 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_group (111): 40 wallclock secs ( 0.04 usr 0.02 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for min_max_on_key (15000): 9 wallclock secs ( 4.77 usr 1.28 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for min_max (60): 22 wallclock secs ( 0.02 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_on_key (100): 40 wallclock secs ( 0.04 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count (100): 50 wallclock secs ( 0.04 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_big (20): 52 wallclock secs ( 0.01 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing update of keys with functions
Time for update_of_key (50000): 27 wallclock secs ( 3.43 usr 3.03 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for update_of_key_big (501): 18 wallclock secs ( 0.04 usr 0.03 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for update_of_key (50000): 27 wallclock secs ( 3.58 usr 3.11 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for update_of_key_big (501): 19 wallclock secs ( 0.04 usr 0.03 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing update with key
Time for update_with_key (300000): 134 wallclock secs (18.92 usr 18.69 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for update_with_key (300000): 135 wallclock secs (21.98 usr 17.77 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for update_with_key_prefix (100000): 42 wallclock secs ( 7.22 usr 5.96 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing update of all rows
Time for update_big (10): 27 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for update_big (10): 26 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing left outer join
Time for outer_join_on_key (10:10): 38 wallclock secs ( 0.01 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for outer_join (10:10): 57 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for outer_join_found (10:10): 52 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for outer_join_not_found (500:10): 34 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for outer_join_on_key (10:10): 44 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for outer_join (10:10): 60 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for outer_join_found (10:10): 56 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for outer_join_not_found (500:10): 37 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing INSERT INTO ... SELECT
Time for insert_select_1_key (1): 5 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for insert_select_1_key (1): 6 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for insert_select_2_keys (1): 6 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for drop table(2): 1 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for drop table(2): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing delete
Time for delete_key (10000): 4 wallclock secs ( 0.66 usr 0.53 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for delete_key (10000): 5 wallclock secs ( 0.60 usr 0.53 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for delete_all (12): 11 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Insert into table with 16 keys and with a primary key with 16 parts
Time for insert_key (100000): 94 wallclock secs ( 7.67 usr 5.66 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for insert_key (100000): 96 wallclock secs ( 8.23 usr 5.98 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing update of keys
Time for update_of_key (256): 21 wallclock secs ( 0.02 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Deleting rows from the table
Time for delete_big_many_keys (128): 49 wallclock secs ( 0.02 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for delete_big_many_keys (128): 50 wallclock secs ( 0.01 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Deleting everything from table
Time for delete_all_many_keys (1): 49 wallclock secs ( 0.02 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for delete_all_many_keys (1): 50 wallclock secs ( 0.01 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Inserting 100000 rows with multiple values
Time for multiple_value_insert (100000): 7 wallclock secs ( 2.15 usr 0.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for multiple_value_insert (100000): 7 wallclock secs ( 2.08 usr 0.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for drop table(1): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 1821 wallclock secs (430.65 usr 226.65 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 1932 wallclock secs (465.91 usr 251.37 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