Commit a7c65d89 authored by unknown's avatar unknown

Fixed bug when having many binary log files

Fixed bug when deleting keys with possible NULL values
many changes to mysqltest


Docs/Makefile.am:
  Don't print warnings when making ..dvi
Docs/manual.texi:
  Documented changes
acinclude.m4:
  Fixed bug in detecting BDB version 3.2.3g
client/mysqltest.c:
  Added TODO
  Cleanups
  Free all memory and close all files on exit
configure.in:
  New release
include/my_sys.h:
  Added new function needed for mysqltest.c
myisam/mi_create.c:
  Cleanup
myisam/mi_delete.c:
  Fixed bug when deleting keys with NULL
myisam/mi_search.c:
  cleanup
myisam/myisamchk.c:
  Added info about fulltext to -D
mysql-test/mysql-test-run.sh:
  Use less memory for mysqld
  Don't remove timefile if only testing one test
  Send option --debug to mysqltest
mysql-test/r/fulltext.result:
  New tests
mysql-test/r/func_math.result:
  Make test portable
mysql-test/t/fulltext.test:
  New tests
mysql-test/t/func_math.test:
  Make test portable
mysys/mf_iocache2.c:
  Fixed bug when reading over buffers
mysys/string.c:
  Added new function needed for mysqltest.c
mysys/typelib.c:
  cleanup
scripts/make_binary_distribution.sh:
  Added option suffix
  Removed some warnings for missing files
scripts/mysql_install_db.sh:
  Fixed type
scripts/safe_mysqld.sh:
  Also read options from 'server' group
sql-bench/Results/ATIS-mysql-Linux_2.2.13_SMP_alpha:
  New benchmark run
sql-bench/Results/RUN-mysql-Linux_2.2.13_SMP_alpha:
  New benchmark run
sql-bench/Results/alter-table-mysql-Linux_2.2.13_SMP_alpha:
  New benchmark run
sql-bench/Results/big-tables-mysql-Linux_2.2.13_SMP_alpha:
  New benchmark run
sql-bench/Results/connect-mysql-Linux_2.2.13_SMP_alpha:
  New benchmark run
sql-bench/Results/create-mysql-Linux_2.2.13_SMP_alpha:
  New benchmark run
sql-bench/Results/insert-mysql-Linux_2.2.13_SMP_alpha:
  New benchmark run
sql-bench/Results/select-mysql-Linux_2.2.13_SMP_alpha:
  New benchmark run
sql-bench/Results/wisconsin-mysql-Linux_2.2.13_SMP_alpha:
  New benchmark run
sql-bench/bench-init.pl.sh:
  Added missing option '--silent'
sql/mysqld.cc:
  Added warnings
  Print backtraces even if 'current_thd' is not active
support-files/mysql.spec.sh:
  Removed duplicate entry
parent e724a847
......@@ -99,7 +99,7 @@ nusphere.pdf: manual.texi
manual_a4.ps: manual.texi include.texi
TEXINPUTS=$(srcdir):$$TEXINPUTS \
MAKEINFO='$(MAKEINFO) -I $(srcdir)' \
$(TEXI2DVI) --batch --texinfo '@afourpaper' $<
$(TEXI2DVI) --batch --texinfo --quiet '@afourpaper' $<
$(DVIPS) -t a4 manual.dvi -o $@
touch $@
......
......@@ -713,7 +713,7 @@ Some Common Errors When Using MySQL
Solving Some Common Problems with MySQL
* Log Replication:: Database replication with update log
* Log Replication:: Database replication with update log
* Backup:: Database backups
* Update log:: The update log
* Binary log:: The binary log
......@@ -846,6 +846,7 @@ Changes in release 4.0.x (Development; Alpha)
Changes in release 3.23.x (Recommended; Gamma)
* News-3.23.31::
* News-3.23.30:: Changes in release 3.23.30
* News-3.23.29:: Changes in release 3.23.29
* News-3.23.28:: Changes in release 3.23.28
......@@ -9284,6 +9285,15 @@ The @code{mysql.server} script uses the following variables:
@code{user}, @code{datadir}, @code{basedir}, @code{bindir}, and
@code{pid-file}.
The following table shows which option sections each of the startup script
uses:
@multitable @columnfractions .20 .80
@item @code{mysqld} @tab @code{mysqld} and @code{server}
@item @code{mysql.server} @tab @code{mysql.server}, @code{mysqld} and @code{server}
@item @code{safe_mysqld} @tab @code{mysql.server}, @code{mysqld} and @code{server}
@end multitable
@xref{Option files}.
@findex command-line options
......@@ -20146,6 +20156,7 @@ below, though the format and numbers probably differ:
| Sort_scan | 5298 |
| Threads_cached | 0 |
| Threads_connected | 1 |
| Threads_created | 30022 |
| Threads_running | 1 |
| Uptime | 39613 |
+--------------------------+------------+
......@@ -20213,6 +20224,7 @@ open by the slave thread
@item @code{Sort_scan} @tab Number of sorts that where done by scanning the table.
@item @code{Threads_cached} @tab Number of threads in the thread cache.
@item @code{Threads_connected} @tab Number of currently open connections.
@item @code{Threads_created} @tab Number of threads created to handle connections.
@item @code{Threads_running} @tab Number of threads that are not sleeping.
@item @code{Uptime} @tab How many seconds the server has been up.
@end multitable
......@@ -20237,6 +20249,9 @@ your @code{mysqld} @code{sort_buffer} variables is probably too small.
@item
@code{Created_tmp_files} doesn't count the files needed to handle temporary
tables.
@item
If @code{Threads_created} is big, you may want to increase the
@code{thread_cache_size} variable.
@end itemize
@node SHOW VARIABLES, SHOW LOGS, SHOW STATUS, SHOW
......@@ -20706,7 +20721,9 @@ threads are first taken from the cache, and only when the cache is empty
is a new thread created. This variable can be increased to improve
performance if you have a lot of new connections. (Normally this doesn't
give a notable performance improvement if you have a good
thread implementation.)
thread implementation.) By examing the difference between
the @code{Connections} and @code{Threads_created} you can see how efficient
the current thread cache is for you.
@item @code{thread_concurrency}
On Solaris, @code{mysqld} will call @code{thr_setconcurrency()} with
......@@ -28438,8 +28455,8 @@ information to a log file.
Normally one should never edit the @code{safe_mysqld} script, but
instead put the options to @code{safe_mysqld} in the
@code{[safe_mysqld]} section in the @code{my.cnf}
file. @code{safe_mysqld} will read all options from the @code{[mysqld]}
and @code{[safe_mysqld]} sections from the option files.
file. @code{safe_mysqld} will read all options from the @code{[mysqld]},
@code{[server]} and @code{[safe_mysqld]} sections from the option files.
@xref{Option files}.
Note that all options on the command line to @code{safe_mysqld} are passed
......@@ -30801,10 +30818,13 @@ print some informational statistics, too.
@node Repair, Optimization, Check, Crash recovery
@subsection How to Repair Tables
In the following section we only talk about using @code{myisamchk} on @code{MyISAM}
tables (extensions @code{.MYI} and @code{.MYD}). If you are using
@code{ISAM} tables (extensions @code{.ISM} and @code{.ISD}), you should use
@code{isamchk} instead.
In the following section we only talk about using @code{myisamchk} on
@code{MyISAM} tables (extensions @code{.MYI} and @code{.MYD}). If you
are using @code{ISAM} tables (extensions @code{.ISM} and @code{.ISD}),
you should use @code{isamchk} instead.
Starting with @strong{MySQL} Version 3.23.14, you can repair MyISAM
tables with the @code{REPAIR TABLE} command. @xref{REPAIR TABLE}.
The symptoms of a corrupted table include queries that abort unexpectedly
and observable errors such as these:
......@@ -30815,11 +30835,45 @@ and observable errors such as these:
@item
Can't find file @file{tbl_name.MYI} (Errcode: ###)
@item
Got error ### from table handler (Error 135 is an exception in this case)
@item
Unexpected end of file
@item
Record file is crashed
@item
Got error ### from table handler
To get more information about the error you can do @code{perror
###}. Here is the most common errors that indicates a problem with the
table:
@example
shell> perror 126 127 132 134 135 136 141 144 145
126 = Index file is crashed / Wrong file format
127 = Record-file is crashed
132 = Old database file
134 = Record was already deleted (or record file crashed)
135 = No more room in record file
136 = No more room in index file
141 = Duplicate unique key or constraint on write or update
144 = Table is crashed and last repair failed
145 = Table was marked as crashed and should be repaired
@end example
Note that error 135, no more room in record file, is not a error that
can be fixed by a simple repair. In this case you have to do:
@itemize @bullet
@item
@code{CREATE TABLE ...} for the table with proper @code{MAX_ROWS} and
@code{AVG_ROW_LENGTH} values. @xref{CREATE TABLE}.
@item
Copy the data over from the old table with @code{INSERT INTO new_table
SELECT * from old_table}.
@item
Rename the old table to the new table:
@code{RENAME old_table to tmp_table, new_table to old_table}
@item
Delete the old table: @code{DROP TABLE tmp_table}.
@end itemize
@end itemize
In these cases, you must repair your tables. @code{myisamchk}
......@@ -40035,6 +40089,7 @@ version. The replication and BerkeleyDB code is still under development,
though, so Version 3.23 is not released as a stable version yet.
@menu
* News-3.23.31:: Changes in release 3.23.31
* News-3.23.30:: Changes in release 3.23.30
* News-3.23.29:: Changes in release 3.23.29
* News-3.23.28:: Changes in release 3.23.28
......@@ -40068,7 +40123,23 @@ though, so Version 3.23 is not released as a stable version yet.
* News-3.23.0:: Changes in release 3.23.0
@end menu
@node News-3.23.30, News-3.23.29, News-3.23.x, News-3.23.x
@node News-3.23.31, News-3.23.30, News-3.23.x, News-3.23.x
@appendixsubsec Changes in release 3.23.31
@itemize @bullet
@item
Fixed bug in @@code{MyISAM} when deleting keys with possible @code{NULL}
values, but the first key-column was not a prefix-compressed text column.
@item
Fixed that @code{mysql.server} reads the @code{mysql.server} option section
instead of @code{mysql_server}.
@item
Fixed that @code{safe_mysqld} and @code{mysql.server} also reads the
@code{server} option section.
@item
Added @code{Threads_created} status variable to @code{mysqld}.
@end itemize
@node News-3.23.30, News-3.23.29, News-3.23.31, News-3.23.x
@appendixsubsec Changes in release 3.23.30
@itemize @bullet
@item
......@@ -823,7 +823,7 @@ AC_DEFUN([MYSQL_CHECK_BDB_VERSION], [
bdb_version_ok=yes
# This is ugly, but about as good as it can get
elif test $db_major -eq 3 && test $db_minor -eq 2 && test $db_patch -eq 3 &&\
grep 'DB_VERSION_STRING\>.*g: (' [$1] > /dev/null
grep 'DB_VERSION_STRING.*g: ' [$1] > /dev/null
then
bdb_version_ok=yes
else
......
This diff is collapsed.
......@@ -4,7 +4,7 @@ dnl Process this file with autoconf to produce a configure script.
AC_INIT(sql/mysqld.cc)
AC_CANONICAL_SYSTEM
# The Docs Makefile.am parses this line!
AM_INIT_AUTOMAKE(mysql, 3.23.30-gamma)
AM_INIT_AUTOMAKE(mysql, 3.23.31)
AM_CONFIG_HEADER(config.h)
PROTOCOL_VERSION=10
......
......@@ -551,6 +551,8 @@ extern const char *get_type(TYPELIB *typelib,uint nr);
extern my_bool init_dynamic_string(DYNAMIC_STRING *str, const char *init_str,
uint init_alloc,uint alloc_increment);
extern my_bool dynstr_append(DYNAMIC_STRING *str, const char *append);
my_bool dynstr_append_mem(DYNAMIC_STRING *str, const char *append,
uint length);
extern my_bool dynstr_set(DYNAMIC_STRING *str, const char *init_str);
extern my_bool dynstr_realloc(DYNAMIC_STRING *str, ulong additional_size);
extern void dynstr_free(DYNAMIC_STRING *str);
......
......@@ -274,86 +274,86 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
}
else
{
/* Test if prefix compression */
if (keydef->flag & HA_PACK_KEY)
{
/* Can't use space_compression on number keys */
if ((keydef->seg[0].flag & HA_SPACE_PACK) &&
keydef->seg[0].type == (int) HA_KEYTYPE_NUM)
keydef->seg[0].flag&= ~HA_SPACE_PACK;
/* Only use HA_PACK_KEY if the first segment is a variable length key */
if (!(keydef->seg[0].flag & (HA_SPACE_PACK | HA_BLOB_PART |
HA_VAR_LENGTH)))
/* Test if prefix compression */
if (keydef->flag & HA_PACK_KEY)
{
/* pack relative to previous key */
keydef->flag&= ~HA_PACK_KEY;
keydef->flag|= HA_BINARY_PACK_KEY | HA_VAR_LENGTH_KEY;
/* Can't use space_compression on number keys */
if ((keydef->seg[0].flag & HA_SPACE_PACK) &&
keydef->seg[0].type == (int) HA_KEYTYPE_NUM)
keydef->seg[0].flag&= ~HA_SPACE_PACK;
/* Only use HA_PACK_KEY if the first segment is a variable length key */
if (!(keydef->seg[0].flag & (HA_SPACE_PACK | HA_BLOB_PART |
HA_VAR_LENGTH)))
{
/* pack relative to previous key */
keydef->flag&= ~HA_PACK_KEY;
keydef->flag|= HA_BINARY_PACK_KEY | HA_VAR_LENGTH_KEY;
}
else
{
keydef->seg[0].flag|=HA_PACK_KEY; /* for easyer intern test */
keydef->flag|=HA_VAR_LENGTH_KEY;
options|=HA_OPTION_PACK_KEYS; /* Using packed keys */
}
}
else
{
keydef->seg[0].flag|=HA_PACK_KEY; /* for easyer intern test */
keydef->flag|=HA_VAR_LENGTH_KEY;
if (keydef->flag & HA_BINARY_PACK_KEY)
options|=HA_OPTION_PACK_KEYS; /* Using packed keys */
}
}
if (keydef->flag & HA_BINARY_PACK_KEY)
options|=HA_OPTION_PACK_KEYS; /* Using packed keys */
if (keydef->flag & HA_AUTO_KEY)
share.base.auto_key=i+1;
for (j=0, keyseg=keydef->seg ; j < keydef->keysegs ; j++, keyseg++)
{
/* numbers are stored with high by first to make compression easier */
switch (keyseg->type) {
case HA_KEYTYPE_SHORT_INT:
case HA_KEYTYPE_LONG_INT:
case HA_KEYTYPE_FLOAT:
case HA_KEYTYPE_DOUBLE:
case HA_KEYTYPE_USHORT_INT:
case HA_KEYTYPE_ULONG_INT:
case HA_KEYTYPE_LONGLONG:
case HA_KEYTYPE_ULONGLONG:
case HA_KEYTYPE_INT24:
case HA_KEYTYPE_UINT24:
case HA_KEYTYPE_INT8:
keyseg->flag|= HA_SWAP_KEY;
/* fall through */
default:
break;
}
if (keyseg->flag & HA_SPACE_PACK)
if (keydef->flag & HA_AUTO_KEY)
share.base.auto_key=i+1;
for (j=0, keyseg=keydef->seg ; j < keydef->keysegs ; j++, keyseg++)
{
keydef->flag |= HA_SPACE_PACK_USED | HA_VAR_LENGTH_KEY;
options|=HA_OPTION_PACK_KEYS; /* Using packed keys */
length++; /* At least one length byte */
min_key_length_skipp+=keyseg->length;
if (keyseg->length >= 255)
{ /* prefix may be 3 bytes */
min_key_length_skipp+=2;
length+=2;
/* numbers are stored with high by first to make compression easier */
switch (keyseg->type) {
case HA_KEYTYPE_SHORT_INT:
case HA_KEYTYPE_LONG_INT:
case HA_KEYTYPE_FLOAT:
case HA_KEYTYPE_DOUBLE:
case HA_KEYTYPE_USHORT_INT:
case HA_KEYTYPE_ULONG_INT:
case HA_KEYTYPE_LONGLONG:
case HA_KEYTYPE_ULONGLONG:
case HA_KEYTYPE_INT24:
case HA_KEYTYPE_UINT24:
case HA_KEYTYPE_INT8:
keyseg->flag|= HA_SWAP_KEY;
/* fall through */
default:
break;
}
}
if (keyseg->flag & (HA_VAR_LENGTH | HA_BLOB_PART))
{
keydef->flag|=HA_VAR_LENGTH_KEY;
length++; /* At least one length byte */
options|=HA_OPTION_PACK_KEYS; /* Using packed keys */
min_key_length_skipp+=keyseg->length;
if (keyseg->length >= 255)
{ /* prefix may be 3 bytes */
min_key_length_skipp+=2;
length+=2;
if (keyseg->flag & HA_SPACE_PACK)
{
keydef->flag |= HA_SPACE_PACK_USED | HA_VAR_LENGTH_KEY;
options|=HA_OPTION_PACK_KEYS; /* Using packed keys */
length++; /* At least one length byte */
min_key_length_skipp+=keyseg->length;
if (keyseg->length >= 255)
{ /* prefix may be 3 bytes */
min_key_length_skipp+=2;
length+=2;
}
}
if (keyseg->flag & (HA_VAR_LENGTH | HA_BLOB_PART))
{
keydef->flag|=HA_VAR_LENGTH_KEY;
length++; /* At least one length byte */
options|=HA_OPTION_PACK_KEYS; /* Using packed keys */
min_key_length_skipp+=keyseg->length;
if (keyseg->length >= 255)
{ /* prefix may be 3 bytes */
min_key_length_skipp+=2;
length+=2;
}
}
key_length+= keyseg->length;
if (keyseg->null_bit)
{
key_length++;
options|=HA_OPTION_PACK_KEYS;
keyseg->flag|=HA_NULL_PART;
keydef->flag|=HA_VAR_LENGTH_KEY | HA_NULL_PART_KEY;
}
}
key_length+= keyseg->length;
if (keyseg->null_bit)
{
key_length++;
options|=HA_OPTION_PACK_KEYS;
keyseg->flag|=HA_NULL_PART;
keydef->flag|=HA_VAR_LENGTH_KEY | HA_NULL_PART_KEY;
}
}
} /* if HA_FULLTEXT */
key_segs+=keydef->keysegs;
......
......@@ -707,9 +707,10 @@ static uint remove_key(MI_KEYDEF *keyinfo, uint nod_flag,
}
else
{
/* A variable length first key part */
if (*keypos & 128) /* Next key is packed */
/* Check if a variable length first key part */
if ((keyinfo->seg->flag & HA_PACK_KEY) && *keypos & 128)
{
/* Next key is packed against the current one */
uint next_length,prev_length,prev_pack_length,lastkey_length,
rest_length;
if (keyinfo->seg[0].length >= 127)
......
......@@ -830,6 +830,7 @@ uint _mi_get_static_key(register MI_KEYDEF *keyinfo, uint nod_flag,
} /* _mi_get_static_key */
/* Key with is packed against previous key or key with a NULL column */
uint _mi_get_pack_key(register MI_KEYDEF *keyinfo, uint nod_flag,
register uchar **page_pos, register uchar *key)
......@@ -841,7 +842,6 @@ uint _mi_get_pack_key(register MI_KEYDEF *keyinfo, uint nod_flag,
start_key=key;
for (keyseg=keyinfo->seg ; keyseg->type ;keyseg++)
{
/* First key part is always packed !*/
if (keyseg->flag & HA_PACK_KEY)
{
/* key with length, packed to previous key */
......
......@@ -200,7 +200,7 @@ static struct option long_options[] =
static void print_version(void)
{
printf("%s Ver 1.39 for %s at %s\n",my_progname,SYSTEM_TYPE,
printf("%s Ver 1.40 for %s at %s\n",my_progname,SYSTEM_TYPE,
MACHINE_TYPE);
}
......@@ -995,6 +995,7 @@ static void descript(MI_CHECK *param, register MI_INFO *info, my_string name)
{
keyseg=keyinfo->seg;
if (keyinfo->flag & HA_NOSAME) text="unique ";
else if (keyinfo->flag & HA_FULLTEXT) text="fulltext ";
else text="multip.";
pos=buff;
......
......@@ -136,6 +136,7 @@ while test $# -gt 0; do
--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
EXTRA_MYSQL_TEST_OPT="$EXTRA_MYSQL_TEST_OPT --debug"
;;
-- ) shift; break ;;
--* ) $ECHO "Unrecognized option: $1"; exit 1 ;;
......@@ -161,6 +162,8 @@ 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"
SMALL_SERVER="-O key_buffer_size=1M -O sort_buffer=256K -O max_heap_table_size=1M"
if [ x$SOURCE_DIST = x1 ] ; then
MY_BASEDIR=$MYSQL_TEST_DIR
else
......@@ -333,7 +336,9 @@ start_master()
--log=$MASTER_MYLOG --default-character-set=latin1 \
--core \
--tmpdir=$MYSQL_TMP_DIR \
--language=english $EXTRA_MASTER_OPT $EXTRA_MASTER_MYSQLD_OPT"
--language=english \
$SMALL_SERVER \
$EXTRA_MASTER_OPT $EXTRA_MASTER_MYSQLD_OPT"
if [ x$DO_DDD = x1 ]
then
$ECHO "set args $master_args" > $GDB_MASTER_INIT
......@@ -376,7 +381,9 @@ start_slave()
--log=$SLAVE_MYLOG --default-character-set=latin1 \
--core \
--tmpdir=$MYSQL_TMP_DIR \
--language=english $EXTRA_SLAVE_OPT $EXTRA_SLAVE_MYSQLD_OPT"
--language=english \
$SMALL_SERVER \
$EXTRA_SLAVE_OPT $EXTRA_SLAVE_MYSQLD_OPT"
if [ x$DO_DDD = x1 ]
then
$ECHO "set args $master_args" > $GDB_SLAVE_INIT
......@@ -591,21 +598,23 @@ run_testcase ()
[ "$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
if [ -z "$USE_RUNNING_SERVER" ]
then
$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 "$USE_RUNNING_SERVER" ] && [ -z "$DO_DDD" ]
then
mysql_start
if [ -z "$DO_GDB" ] && [ -z "$DO_DDD" ]
then
mysql_start
fi
$ECHO "Loading Standard Test Databases"
mysql_loadstd
fi
$ECHO "Loading Standard Test Databases"
mysql_loadstd
$ECHO "Starting Tests"
......@@ -622,6 +631,7 @@ then
do
run_testcase $tf
done
$RM -f $TIMEFILE # Remove for full test
fi
else
tname=`$BASENAME $1 .test`
......@@ -636,8 +646,6 @@ fi
$ECHO $DASH72
$ECHO
$RM -f $TIMEFILE
if [ -z "$DO_GDB" ] && [ -z "$USE_RUNNING_SERVER" ] && [ -z "$DO_DDD" ]
then
mysql_stop
......
......@@ -6,3 +6,17 @@ Full-text indexes are called collections
a b
Full-text indexes are called collections
Only MyISAM tables support collections
id
id
id
3
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment
t2 1 tig 1 ticket A NULL NULL NULL
t2 1 tix 1 inhalt A NULL 1 NULL FULLTEXT
Table Create Table
t2 CREATE TABLE `t2` (
`ticket` int(11) default NULL,
`inhalt` text,
KEY `tig`(`ticket`),
FULLTEXT KEY `tix`(`inhalt`)
) TYPE=MyISAM
......@@ -16,7 +16,7 @@ pow(10,log10(10)) power(2,4)
10.000000 16.000000
rand(999999) rand()
0.18435012473199 0.76373626176616
PI() sin(pi()/2) cos(pi()/2) tan(pi()) cot(1) asin(1) acos(0) atan(1)
3.141593 1.000000 0.000000 -0.000000 0.64209262 1.570796 1.570796 0.785398
PI() sin(pi()/2) cos(pi()/2) abs(tan(pi())) cot(1) asin(1) acos(0) atan(1)
3.141593 1.000000 0.000000 0.000000 0.64209262 1.570796 1.570796 0.785398
degrees(pi()) radians(360)
180 6.2831853071796
......@@ -2,6 +2,8 @@
# Test of fulltext index
#
drop table if exists t1,t2;
CREATE TABLE t1 (a VARCHAR(200), b TEXT, FULLTEXT (a,b));
INSERT INTO t1 VALUES('MySQL has now support', 'for full-text search'),('Full-text indexes', 'are called collections'),('Only MyISAM tables','support collections'),('Function MATCH ... AGAINST()','is used to do a search'),('Full-text search in MySQL', 'implements vector space model');
select * from t1 where MATCH(a,b) AGAINST ("collections");
......@@ -9,3 +11,37 @@ select * from t1 where MATCH(a,b) AGAINST ("indexes");
select * from t1 where MATCH(a,b) AGAINST ("indexes collections");
delete from t1 where a like "MySQL%";
drop table t1;
#
# Check bug reported by Matthias Urlichs
#
CREATE TABLE t1 (
id int(11),
ticket int(11),
KEY ti (id),
KEY tit (ticket)
)/*! type=MyISAM */;
INSERT INTO t1 VALUES (2,3),(1,2);
CREATE TABLE t2 (
ticket int(11),
inhalt text,
KEY tig (ticket),
fulltext index tix (inhalt(1)) /* this line modified by hand */
)/*! type=MyISAM */;
INSERT INTO t2 VALUES (1,'foo'),(2,'bar'),(3,'foobar');
select t1.id FROM t2 as ttxt,t1,t1 as ticket2 WHERE ticket2.id = ttxt.ticket AND t1.id = ticket2.ticket and match(ttxt.inhalt) against ('foobar');
# In the following query MySQL didn't use the fulltext index
select t1.id FROM t2 as ttxt,t1 INNER JOIN t1 as ticket2 ON ticket2.id = ttxt.ticket WHERE t1.id = ticket2.ticket and match(ttxt.inhalt) against ('foobar');
INSERT INTO t1 VALUES (3,3);
select t1.id FROM t2 as ttxt,t1 INNER JOIN t1 as ticket2 ON ticket2.id = ttxt.ticket WHERE t1.id = ticket2.ticket and match(ttxt.inhalt) against ('foobar');
# Check that we get 'fulltext' index in SHOW CREATE
show keys from t2;
show create table t2;
drop table t1,t2;
......@@ -11,5 +11,5 @@ select abs(-10), sign(-5), sign(5), sign(0);
select log(exp(10)),exp(log(sqrt(10))*2);
select pow(10,log10(10)),power(2,4);
select rand(999999),rand();
select pi(),sin(pi()/2),cos(pi()/2),tan(pi()),cot(1),asin(1),acos(0),atan(1);
select pi(),sin(pi()/2),cos(pi()/2),abs(tan(pi())),cot(1),asin(1),acos(0),atan(1);
select degrees(pi()),radians(360);
......@@ -100,6 +100,7 @@ uint my_b_fill(IO_CACHE *info)
uint my_b_gets(IO_CACHE *info, char *to, uint max_length)
{
char *start = to;
uint length;
max_length--; /* Save place for end \0 */
/* Calculate number of characters in buffer */
......@@ -115,10 +116,9 @@ uint my_b_gets(IO_CACHE *info, char *to, uint max_length)
{
if ((*to++ = *pos++) == '\n')
{
length= (uint) (pos-info->rc_pos);
info->rc_pos=pos;
*to='\0';
return length;
return (uint) (to-start);
}
}
if (!(max_length-=length))
......@@ -126,7 +126,7 @@ uint my_b_gets(IO_CACHE *info, char *to, uint max_length)
/* Found enough charcters; Return found string */
info->rc_pos=pos;
*to='\0';
return length;
return (uint) (to-start);
}
if (!(length=my_b_fill(info)))
return 0;
......
......@@ -48,6 +48,7 @@ my_bool init_dynamic_string(DYNAMIC_STRING *str, const char *init_str,
DBUG_RETURN(FALSE);
}
my_bool dynstr_set(DYNAMIC_STRING *str, const char *init_str)
{
uint length;
......@@ -72,6 +73,7 @@ my_bool dynstr_set(DYNAMIC_STRING *str, const char *init_str)
DBUG_RETURN(FALSE);
}
my_bool dynstr_realloc(DYNAMIC_STRING *str, ulong additional_size)
{
DBUG_ENTER("dynstr_realloc");
......@@ -89,12 +91,18 @@ my_bool dynstr_realloc(DYNAMIC_STRING *str, ulong additional_size)
my_bool dynstr_append(DYNAMIC_STRING *str, const char *append)
{
return dynstr_append_mem(str,append,strlen(append));
}
my_bool dynstr_append_mem(DYNAMIC_STRING *str, const char *append,
uint length)
{
char *new_ptr;
uint length=(uint) strlen(append)+1;
if (str->length+length > str->max_length)
if (str->length+length >= str->max_length)
{
uint new_length=(str->length+length+str->alloc_increment-1)/
uint new_length=(str->length+length+str->alloc_increment)/
str->alloc_increment;
new_length*=str->alloc_increment;
if (!(new_ptr=(char*) my_realloc(str->str,new_length,MYF(MY_WME))))
......@@ -103,10 +111,12 @@ my_bool dynstr_append(DYNAMIC_STRING *str, const char *append)
str->max_length=new_length;
}
memcpy(str->str + str->length,append,length);
str->length+=length-1;
str->length+=length;
str->str[str->length]=0; /* Safety for C programs */
return FALSE;
}
void dynstr_free(DYNAMIC_STRING *str)
{
if (str->str)
......
......@@ -26,7 +26,7 @@
** If part, uniq field is found and full_name == 0 then x is expanded
** to full field.
** full_name has the following bit values:
** If & 1 accept only hole names
** If & 1 accept only whole names
** If & 2 don't expand if half field
** If & 4 allow #number# as type
****************************************************************************/
......
......@@ -18,6 +18,14 @@ then
shift 1
fi
# Get optional suffix for distribution
SUFFIX=""
if test $# -gt 0 -a x$1 != x"-debug"
then
SUFFIX=$1
shift 1
fi
if test x$1 = x"-debug"
then
DEBUG=1
......@@ -33,7 +41,7 @@ fi
BASE=$TMP/my_dist
if [ -d $BASE ] ; then
rm -rf $BASE
rm -r -f $BASE
fi
mkdir $BASE $BASE/bin $BASE/data $BASE/data/mysql $BASE/data/test \
......@@ -56,7 +64,10 @@ for i in extra/comp_err extra/replace extra/perror extra/resolveip \
client/mysqladmin client/mysqldump client/mysqlimport client/mysqltest \
client/.libs/mysql client/.libs/mysqlshow client/.libs/mysqladmin client/.libs/mysqldump client/.libs/mysqlimport client/.libs/mysqltest
do
cp -p $i $BASE/bin
if [ -f $i ]
then
cp -p $i $BASE/bin
fi
done
cp -p config.h include/* $BASE/include
......@@ -67,10 +78,8 @@ cp -p support-files/* $BASE/support-files
cp -p libmysql/.libs/libmysqlclient.a libmysql/.libs/libmysqlclient.so* libmysql/libmysqlclient.* libmysql_r/.libs/libmysqlclient_r.a libmysql_r/.libs/libmysqlclient_r.so* libmysql_r/libmysqlclient_r.* mysys/libmysys.a strings/libmystrings.a dbug/libdbug.a $BASE/lib
cp -r -p sql/share/* $BASE/share/mysql
rm -f $BASE/share/mysql/Makefile* $BASE/share/mysql/*/*.OLD
rm -rf $BASE/share/SCCS $BASE/share/*/SCCS
cp -p mysql-test/mysql-test-run mysql-test/install_test_db $BASE/mysql-test/
cp -p mysql-test/create-test-result $BASE/mysql-test
cp -p mysql-test/README $BASE/mysql-test/README
cp -p mysql-test/include/*.inc $BASE/mysql-test/include
cp -p mysql-test/std_data/*.dat mysql-test/std_data/*.frm \
......@@ -89,13 +98,17 @@ mv $BASE/support-files/binary-configure $BASE/configure
chmod a+x $BASE/bin/* $BASE/scripts/* $BASE/support-files/mysql-* $BASE/configure
cp -r -p sql-bench/* $BASE/sql-bench
rm -f $BASE/sql-bench/*.sh $BASE/sql-bench/Makefile* $BASE/lib/*.la
rm -rf `find $BASE/sql-bench -name SCCS`
rm -rf `find $BASE/share -name SCCS`
# Change the distribution to a long descreptive name
NEW_NAME=mysql-$version-$system-$machine
# Clean up if we did this from a bk tree
if [ -d $BASE/sql-bench/SCCS ] ; then
find $BASE/share -name SCCS -print | xargs rm -r -f
find $BASE/sql-bench -name SCCS -print | xargs rm -r -f
fi
# Change the distribution to a long descriptive name
NEW_NAME=mysql-$version-$system-$machine$SUFFIX
BASE2=$TMP/$NEW_NAME
rm -rf $BASE2
rm -r -f $BASE2
mv $BASE $BASE2
BASE=$BASE2
#
......@@ -160,6 +173,6 @@ cd $SOURCE
echo "Compressing archive"
gzip -9 $NEW_NAME.tar
echo "Removing temporary directory"
rm -rf $BASE
rm -r -f $BASE
echo "$NEW_NAME.tar.gz created"
......@@ -10,7 +10,7 @@
IN_RPM=0
case "$1" in
-IN-RPM)
IN_RPM="$1"; shift
IN_RPM="1"; shift
;;
esac
defaults=
......
......@@ -110,7 +110,7 @@ else
fi
args=
parse_arguments `$print_defaults $defaults mysqld safe_mysqld`
parse_arguments `$print_defaults $defaults mysqld server safe_mysqld`
parse_arguments PICK-ARGS-FROM-ARGV "$@"
if test ! -x $ledir/$MYSQLD
......
Testing server 'MySQL 3.23.30 gamma' at 2000-12-28 15:29:27
Testing server 'MySQL 3.23.30 gamma' at 2001-01-03 18:34:25
ATIS table test
......@@ -6,15 +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): 3 wallclock secs ( 0.64 usr 0.61 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to insert (9768): 3 wallclock secs ( 0.63 usr 0.59 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Retrieving data
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)
Time for select_simple_join (500): 2 wallclock secs ( 0.61 usr 0.39 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_join (100): 1 wallclock secs ( 0.48 usr 0.34 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_key_prefix_join (100): 11 wallclock secs ( 3.75 usr 2.76 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_distinct (800): 11 wallclock secs ( 1.72 usr 0.97 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_group (2800): 10 wallclock secs ( 1.55 usr 0.68 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 ( 8.65 usr 5.80 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 38 wallclock secs ( 8.76 usr 5.73 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.30 gamma' at 2000-12-28 15:30:07
Testing server 'MySQL 3.23.30 gamma' at 2001-01-03 18:35:03
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 insert (1000) 1 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.06 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for alter_table_add (992): 213 wallclock secs ( 0.18 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): 175 wallclock secs ( 0.06 usr 0.04 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for alter_table_drop (496): 170 wallclock secs ( 0.05 usr 0.04 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)
Total time: 392 wallclock secs ( 0.29 usr 0.17 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.30 gamma' at 2000-12-28 15:36:43
Testing server 'MySQL 3.23.30 gamma' at 2001-01-03 18:41:35
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.89 usr 5.32 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to select_many_fields(1000): 10 wallclock secs ( 4.03 usr 5.13 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.05 usr 5.28 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to select_many_fields(1000): 16 wallclock secs ( 4.14 usr 5.10 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing insert VALUES()
Time to insert_many_fields(1000): 5 wallclock secs ( 0.32 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.06 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.03 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.06 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)
Total time: 41 wallclock secs ( 8.53 usr 10.35 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.30 gamma' at 2000-12-28 15:37:25
Testing server 'MySQL 3.23.30 gamma' at 2001-01-03 18:42:16
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): 13 wallclock secs ( 7.51 usr 2.43 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to connect (10000): 14 wallclock secs ( 7.52 usr 2.57 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Test connect/simple select/disconnect
Time for connect+select_simple (10000): 16 wallclock secs ( 7.69 usr 3.23 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for connect+select_simple (10000): 16 wallclock secs ( 7.76 usr 3.27 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Test simple select
Time for select_simple (10000): 1 wallclock secs ( 0.31 usr 0.80 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_simple (10000): 1 wallclock secs ( 0.29 usr 0.79 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.95 usr 3.44 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to connect+select_1_row (10000): 17 wallclock secs ( 7.74 usr 3.33 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.46 usr 1.12 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to select_1_row (10000): 2 wallclock secs ( 0.39 usr 0.97 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.36 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 0.97 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Test select with aritmetic (+)
Time for select_column+column (10000): 3 wallclock secs ( 0.28 usr 0.76 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_column+column (10000): 3 wallclock secs ( 0.31 usr 0.72 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing retrieval of big records (65000 bytes)
Time to select_big (10000): 19 wallclock secs ( 7.75 usr 6.19 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to select_big (10000): 19 wallclock secs ( 7.50 usr 5.90 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)
Total time: 75 wallclock secs (31.88 usr 18.52 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.30 gamma' at 2000-12-28 15:38:39
Testing server 'MySQL 3.23.30 gamma' at 2001-01-03 18:43:31
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): 164 wallclock secs ( 1.93 usr 0.57 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for create_MANY_tables (10000): 92 wallclock secs ( 1.81 usr 0.60 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Accessing tables
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)
Time to select_group_when_MANY_tables (10000): 6 wallclock secs ( 0.88 usr 0.86 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing drop
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)
Time for drop_table_when_MANY_tables (10000): 7 wallclock secs ( 0.71 usr 0.58 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing create+drop
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)
Time for create+drop (10000): 12 wallclock secs ( 2.63 usr 0.97 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for create_key+drop (10000): 17 wallclock secs ( 4.27 usr 1.28 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 134 wallclock secs (10.30 usr 4.28 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.30 gamma' at 2000-12-28 16:14:21
Testing server 'MySQL 3.23.30 gamma' at 2001-01-03 19:17:40
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): 3 wallclock secs ( 0.72 usr 0.71 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to insert (10000): 4 wallclock secs ( 0.75 usr 0.65 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): 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 select_big (70:17207): 1 wallclock secs ( 0.14 usr 0.10 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range (410:1057904): 227 wallclock secs ( 8.60 usr 5.58 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for min_max_on_key (70000): 157 wallclock secs (21.60 usr 6.12 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_on_key (50000): 369 wallclock secs (16.33 usr 4.35 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)
Time for count_group_on_key_parts (1000:100000): 39 wallclock secs ( 1.03 usr 0.61 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing count(distinct) on the table
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)
Time for count_distinct (2000:2000): 99 wallclock secs ( 0.70 usr 0.22 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group_on_key (1000:6000): 43 wallclock secs ( 0.46 usr 0.15 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group_on_key_parts (1000:100000): 63 wallclock secs ( 1.12 usr 0.57 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group (1000:100000): 63 wallclock secs ( 1.11 usr 0.59 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_big (100:1000000): 79 wallclock secs ( 7.31 usr 8.59 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 1144 wallclock secs (59.15 usr 27.51 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.30 gamma' at 2000-12-28 16:33:09
Testing server 'MySQL 3.23.30 gamma' at 2001-01-03 19:36:45
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.87 usr 1.88 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to insert (31000): 14 wallclock secs ( 1.82 usr 1.87 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.71 usr 0.98 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for wisc_benchmark (114): 4 wallclock secs ( 1.77 usr 0.99 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)
Total time: 18 wallclock secs ( 3.58 usr 2.87 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
......@@ -31,7 +31,7 @@
# $server Object for current server
# $limits Hash reference to limits for benchmark
$benchmark_version="2.11";
$benchmark_version="2.11a";
use Getopt::Long;
require "$pwd/server-cfg" || die "Can't read Configuration file: $!\n";
......@@ -51,7 +51,7 @@ $log_prog_args=join(" ", skip_arguments(\@ARGV,"comments","cmp","server",
"user", "host", "database", "password",
"use-old-results","skip-test",
"machine", "dir", "suffix", "log"));
GetOptions("skip-test=s","comments=s","cmp=s","server=s","user=s","host=s","database=s","password=s","loop-count=i","row-count=i","skip-create","skip-delete","verbose","fast-insert","lock-tables","debug","fast","force","field-count=i","regions=i","groups=i","time-limit=i","log","use-old-results","machine=s","dir=s","suffix=s","help","odbc","small-test","small-tables","small-key-tables","stage=i","old-headers","die-on-errors","create-options=s","hires","tcpip") || usage();
GetOptions("skip-test=s","comments=s","cmp=s","server=s","user=s","host=s","database=s","password=s","loop-count=i","row-count=i","skip-create","skip-delete","verbose","fast-insert","lock-tables","debug","fast","force","field-count=i","regions=i","groups=i","time-limit=i","log","use-old-results","machine=s","dir=s","suffix=s","help","odbc","small-test","small-tables","small-key-tables","stage=i","old-headers","die-on-errors","create-options=s","hires","tcpip","silent") || usage();
usage() if ($opt_help);
$server=get_server($opt_server,$opt_host,$opt_database,$opt_odbc,
......@@ -495,12 +495,15 @@ All benchmarks takes the following options:
Known servers names are: Access, Adabas, AdabasD, Empress, Oracle,
Informix, DB2, mSQL, MS-SQL, MySQL, Pg, Solid and Sybase
--silent
Don't print info about the server when starting test.
--skip-delete
This is a test specific option that is only used when debugging a test.
This will keep the test tables after the test is run.
--skip-test=test1[,test2,...]
For run-all-programs; Don\'t execute the named tests
For run-all-programs; Don\'t execute the named tests.
--small-test
This runs some tests with smaller limits to get a faster test.
......
......@@ -258,7 +258,7 @@ ulong refresh_version=1L,flush_version=1L; /* Increments on each reload */
ulong query_id=1L,long_query_count,long_query_time,aborted_threads,
aborted_connects,delayed_insert_timeout,delayed_insert_limit,
delayed_queue_size,delayed_insert_threads,delayed_insert_writes,
delayed_rows_in_use,delayed_insert_errors,flush_time;
delayed_rows_in_use,delayed_insert_errors,flush_time, thread_created;
ulong filesort_rows, filesort_range_count, filesort_scan_count;
ulong filesort_merge_passes;
ulong select_range_check_count, select_range_count, select_scan_count;
......@@ -801,7 +801,9 @@ static void server_init(void)
sql_print_error("Do you already have another mysqld server running on port: %d ?",mysql_port);
unireg_abort(1);
}
(void) listen(ip_sock,(int) back_log);
if (listen(ip_sock,(int) back_log) < 0)
sql_print_error("Warning: listen() on TCP/IP failed with error %d",
errno);
}
if (mysqld_chroot)
......@@ -886,7 +888,9 @@ static void server_init(void)
#if defined(S_IFSOCK) && defined(SECURE_SOCKETS)
(void) chmod(mysql_unix_port,S_IFSOCK); /* Fix solaris 2.6 bug */
#endif
(void) listen(unix_sock,(int) back_log);
if (listen(unix_sock,(int) back_log) < 0)
sql_print_error("Warning: listen() on Unix socket failed with error %d",
errno);
}
#endif
DBUG_PRINT("info",("server started"));
......@@ -1082,6 +1086,8 @@ inline static __volatile__ void trace_stack()
uchar **stack_bottom;
uchar** ebp;
LINT_INIT(ebp);
LINT_INIT(stack_bottom);
fprintf(stderr,
"Attemping backtrace. You can use the following information to find out\n\
where mysqld died. If you see no messages after this, something went\n\
......@@ -1099,12 +1105,15 @@ terribly wrong\n");
}
if (!thd)
{
fprintf(stderr, "Cannot determine thread, ebp=%p, aborting backtrace\n",
ebp);
return;
fprintf(stderr, "Cannot determine thread, ebp=%p, backtrace may not be correct\n", ebp);
/* Assume that the stack starts at the previous even 65K */
ulong tmp= min(0x10000,thread_stack);
stack_bottom= (uchar**) (((ulong) &stack_bottom + tmp) &
~(ulong) 0xFFFF);
}
stack_bottom = (uchar**)thd->thread_stack;
if(ebp > stack_bottom || ebp < stack_bottom - thread_stack)
else
stack_bottom = (uchar**) thd->thread_stack;
if (ebp > stack_bottom || ebp < stack_bottom - thread_stack)
{
fprintf(stderr,
"Bogus stack limit or frame pointer, aborting backtrace\n");
......@@ -2010,6 +2019,7 @@ static void create_new_thread(THD *thd)
{
int error;
thread_count++;
thread_created++;
threads.append(thd);
DBUG_PRINT("info",(("creating thread %d"), thd->thread_id));
thd->connect_time = time(NULL);
......@@ -2595,7 +2605,7 @@ CHANGEABLE_VAR changeable_vars[] = {
{ "thread_concurrency", (long*) &concurrency,
DEFAULT_CONCURRENCY, 1, 512, 0, 1 },
{ "thread_cache_size", (long*) &thread_cache_size,
0, 1, 16384, 0, 1 },
0, 0, 16384, 0, 1 },
{ "tmp_table_size", (long*) &tmp_table_size,
1024*1024L, 1024, ~0L, MALLOC_OVERHEAD, 1 },
{ "thread_stack", (long*) &thread_stack,
......@@ -2748,6 +2758,7 @@ struct show_var_st status_vars[]= {
{"Sort_rows", (char*) &filesort_rows, SHOW_LONG},
{"Sort_scan", (char*) &filesort_scan_count, SHOW_LONG},
{"Threads_cached", (char*) &cached_thread_count, SHOW_LONG_CONST},
{"Threads_created", (char*) &thread_created, SHOW_LONG_CONST},
{"Threads_connected", (char*) &thread_count, SHOW_INT_CONST},
{"Threads_running", (char*) &thread_running, SHOW_INT_CONST},
{"Uptime", (char*) 0, SHOW_STARTTIME},
......
......@@ -302,7 +302,6 @@ fi
%attr(755, root, root) /usr/bin/mysql_fix_privilege_tables
%attr(755, root, root) /usr/bin/mysql_convert_table_format
%attr(755, root, root) /usr/bin/mysql_install_db
%attr(755, root, root) /usr/bin/mysql_config
%attr(755, root, root) /usr/bin/mysql_setpermission
%attr(755, root, root) /usr/bin/mysql_zap
%attr(755, root, root) /usr/bin/mysqlbug
......
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