Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
60677ffd
Commit
60677ffd
authored
Dec 28, 2000
by
monty@donna.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup of tests
Fixed bug with ALTER TABLE on HEAP tables
parent
767e2ef6
Changes
24
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
283 additions
and
225 deletions
+283
-225
Docs/manual.texi
Docs/manual.texi
+7
-5
client/my_readline.h
client/my_readline.h
+1
-0
client/mysql.cc
client/mysql.cc
+0
-1
client/mysqladmin.c
client/mysqladmin.c
+0
-1
client/mysqldump.c
client/mysqldump.c
+9
-4
client/mysqlimport.c
client/mysqlimport.c
+1
-1
client/mysqltest.c
client/mysqltest.c
+1
-4
client/readline.cc
client/readline.cc
+5
-4
heap/hp_open.c
heap/hp_open.c
+1
-0
merge/rrnd.c
merge/rrnd.c
+1
-1
mysql-test/install_test_db.sh
mysql-test/install_test_db.sh
+7
-6
mysql-test/mysql-test-run.sh
mysql-test/mysql-test-run.sh
+64
-28
scripts/mysqld_multi.sh
scripts/mysqld_multi.sh
+1
-1
sql-bench/Results/ATIS-mysql-Linux_2.2.13_SMP_alpha
sql-bench/Results/ATIS-mysql-Linux_2.2.13_SMP_alpha
+8
-7
sql-bench/Results/RUN-mysql-Linux_2.2.13_SMP_alpha
sql-bench/Results/RUN-mysql-Linux_2.2.13_SMP_alpha
+78
-75
sql-bench/Results/alter-table-mysql-Linux_2.2.13_SMP_alpha
sql-bench/Results/alter-table-mysql-Linux_2.2.13_SMP_alpha
+4
-4
sql-bench/Results/big-tables-mysql-Linux_2.2.13_SMP_alpha
sql-bench/Results/big-tables-mysql-Linux_2.2.13_SMP_alpha
+6
-6
sql-bench/Results/connect-mysql-Linux_2.2.13_SMP_alpha
sql-bench/Results/connect-mysql-Linux_2.2.13_SMP_alpha
+10
-10
sql-bench/Results/create-mysql-Linux_2.2.13_SMP_alpha
sql-bench/Results/create-mysql-Linux_2.2.13_SMP_alpha
+7
-7
sql-bench/Results/insert-mysql-Linux_2.2.13_SMP_alpha
sql-bench/Results/insert-mysql-Linux_2.2.13_SMP_alpha
+44
-42
sql-bench/Results/select-mysql-Linux_2.2.13_SMP_alpha
sql-bench/Results/select-mysql-Linux_2.2.13_SMP_alpha
+12
-12
sql-bench/Results/wisconsin-mysql-Linux_2.2.13_SMP_alpha
sql-bench/Results/wisconsin-mysql-Linux_2.2.13_SMP_alpha
+4
-4
sql/mysqld.cc
sql/mysqld.cc
+11
-1
sql/sql_table.cc
sql/sql_table.cc
+1
-1
No files found.
Docs/manual.texi
View file @
60677ffd
...
...
@@ -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
client/my_readline.h
View file @
60677ffd
...
...
@@ -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
);
...
...
client/mysql.cc
View file @
60677ffd
...
...
@@ -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
--
)
...
...
client/mysqladmin.c
View file @
60677ffd
...
...
@@ -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
...
...
client/mysqldump.c
View file @
60677ffd
...
...
@@ -37,7 +37,7 @@
** Tnu Samuel <tonu@please.do.not.remove.this.spam.ee>
**/
#define DUMP_VERSION "8.1
1
"
#define DUMP_VERSION "8.1
2
"
#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 */
...
...
client/mysqlimport.c
View file @
60677ffd
...
...
@@ -25,7 +25,7 @@
** * *
** *************************
*/
#define IMPORT_VERSION "2.
6
"
#define IMPORT_VERSION "2.
7
"
#include <global.h>
#include <my_sys.h>
...
...
client/mysqltest.c
View file @
60677ffd
...
...
@@ -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
);
}
...
...
client/readline.cc
View file @
60677ffd
...
...
@@ -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
,
u
int
*
out_length
);
static
char
*
intern_read_line
(
LINE_BUFFER
*
buffer
,
u
long
*
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
;
u
int
out_length
;
u
long
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
,
u
int
*
out_length
)
char
*
intern_read_line
(
LINE_BUFFER
*
buffer
,
u
long
*
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
=
(
u
int
)
(
pos
+
1
-
buffer
->
eof
-
buffer
->
start_of_line
);
*
out_length
=
(
u
long
)
(
pos
+
1
-
buffer
->
eof
-
buffer
->
start_of_line
);
DBUG_RETURN
(
buffer
->
start_of_line
);
}
}
heap/hp_open.c
View file @
60677ffd
...
...
@@ -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
;
...
...
merge/rrnd.c
View file @
60677ffd
...
...
@@ -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
,
...
...
mysql-test/install_test_db.sh
View file @
60677ffd
...
...
@@ -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
=
""
...
...
mysql-test/mysql-test-run.sh
View file @
60677ffd
...
...
@@ -54,35 +54,32 @@ TOT_TEST=0
USERT
=
0
SYST
=
0
REALT
=
0
MY_TMP_DIR
=
$MYSQL_TEST_DIR
/var/tmp
TIMEFILE
=
"
$MYSQL_T
EST_DIR
/var/tmp
/mysqltest-time"
MY
SQL
_TMP_DIR
=
$MYSQL_TEST_DIR
/var/tmp
TIMEFILE
=
"
$MYSQL_T
MP_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_T
EST_DIR
/var/tmp
/mysql.sock"
MASTER_MYPID
=
"
$MY
SQL_TEST_DIR
/var/run
/mysqld.pid"
MASTER_MYSOCK
=
"
$MYSQL_T
MP_DIR
/mysql.sock"
MASTER_MYPID
=
"
$MY
RUN_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_T
EST_DIR
/var/tmp
/mysql-slave.sock"
SLAVE_MYPID
=
"
$MY
SQL_TEST_DIR
/var/run
/mysqld-slave.pid"
SLAVE_MYSOCK
=
"
$MYSQL_T
MP_DIR
/mysql-slave.sock"
SLAVE_MYPID
=
"
$MY
RUN_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
...
...
scripts/mysqld_multi.sh
View file @
60677ffd
...
...
@@ -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
()
;
...
...
sql-bench/Results/ATIS-mysql-Linux_2.2.13_SMP_alpha
View file @
60677ffd
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)
sql-bench/Results/RUN-mysql-Linux_2.2.13_SMP_alpha
View file @
60677ffd
This diff is collapsed.
Click to expand it.
sql-bench/Results/alter-table-mysql-Linux_2.2.13_SMP_alpha
View file @
60677ffd
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.0
7
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for alter_table_add (992): 213 wallclock secs ( 0.17 usr 0.0
6
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): 17
0 wallclock secs ( 0.07 usr 0.03
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for alter_table_drop (496): 17
5 wallclock secs ( 0.06 usr 0.04
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 39
1 wallclock secs ( 0.31
usr 0.17 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 39
6 wallclock secs ( 0.30
usr 0.17 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
sql-bench/Results/big-tables-mysql-Linux_2.2.13_SMP_alpha
View file @
60677ffd
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.0
6 usr 5.04
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to select_many_fields(1000): 16 wallclock secs ( 4.0
5 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.3
3
usr 0.07 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to insert_many_fields(1000): 5 wallclock secs ( 0.3
2
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.0
2
usr 0.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to insert_many_fields(1000): 9 wallclock secs ( 0.0
3
usr 0.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 41 wallclock secs ( 8.3
5 usr 10.24
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 41 wallclock secs ( 8.3
0 usr 10.73
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
sql-bench/Results/connect-mysql-Linux_2.2.13_SMP_alpha
View file @
60677ffd
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): 1
4 wallclock secs ( 7.49
usr 2.43 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to connect (10000): 1
3 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): 1
5 wallclock secs ( 7.61 usr 3.24
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for connect+select_simple (10000): 1
6 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.3
4
usr 1.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to select_2_rows (10000): 3 wallclock secs ( 0.3
6
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.2
6 usr 0.67
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_column+column (10000): 3 wallclock secs ( 0.2
8 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: 7
6 wallclock secs (31.66 usr 19.05
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 7
4 wallclock secs (32.31 usr 18.97
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
sql-bench/Results/create-mysql-Linux_2.2.13_SMP_alpha
View file @
60677ffd
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.6
2 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.6
8 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.1
8 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.1
4 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)
sql-bench/Results/insert-mysql-Linux_2.2.13_SMP_alpha
View file @
60677ffd
This diff is collapsed.
Click to expand it.
sql-bench/Results/select-mysql-Linux_2.2.13_SMP_alpha
View file @
60677ffd
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): 22
9 wallclock secs ( 8.56 usr 5.62
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for min_max_on_key (70000): 1
66 wallclock secs (21.04 usr 6.26
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_on_key (50000): 3
89 wallclock secs (15.72 usr 4.52
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range (410:1057904): 22
7 wallclock secs ( 9.67 usr 5.91
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for min_max_on_key (70000): 1
53 wallclock secs (21.55 usr 6.38
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_on_key (50000): 3
55 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.4
3 usr 0.14
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group_on_key_parts (1000:100000): 6
3 wallclock secs ( 1.10 usr 0.62
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group (1000:100000): 6
4 wallclock secs ( 1.06 usr 0.66
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_big (100:1000000): 8
0 wallclock secs ( 7.23 usr 8.53
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 11
70 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.4
5 usr 0.16
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group_on_key_parts (1000:100000): 6
2 wallclock secs ( 1.20 usr 0.66
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group (1000:100000): 6
3 wallclock secs ( 1.16 usr 0.69
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_big (100:1000000): 8
1 wallclock secs ( 8.00 usr 9.24
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 11
27 wallclock secs (61.16 usr 29.24
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
sql-bench/Results/wisconsin-mysql-Linux_2.2.13_SMP_alpha
View file @
60677ffd
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.8
2 usr 1.89
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to insert (31000): 14 wallclock secs ( 1.8
7 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)
sql/mysqld.cc
View file @
60677ffd
...
...
@@ -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
;
...
...
sql/sql_table.cc
View file @
60677ffd
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment