summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BUILD/SETUP.sh2
-rw-r--r--BitKeeper/etc/logging_ok7
-rw-r--r--Docs/manual.texi211
-rw-r--r--acinclude.m42
-rw-r--r--client/mysql.cc6
-rw-r--r--include/Makefile.am7
-rw-r--r--include/mysql_com.h1
-rw-r--r--include/mysql_version.h.in4
-rw-r--r--merge/open.c22
-rw-r--r--mysql-test/Makefile.am3
-rw-r--r--mysql-test/r/func_str.result2
-rw-r--r--mysql-test/r/merge.result2
-rw-r--r--mysql-test/std_data/m.MRG0
-rw-r--r--mysql-test/std_data/m.frmbin8548 -> 0 bytes
-rw-r--r--mysql-test/t/func_str.test1
-rw-r--r--mysql-test/t/merge.test5
-rw-r--r--mysys/charset.c2
-rw-r--r--mysys/mf_format.c6
-rw-r--r--mysys/mf_tempfile.c6
-rw-r--r--scripts/make_binary_distribution.sh32
-rw-r--r--sql-bench/Results/ATIS-mysql-NT_4.017
-rw-r--r--sql-bench/Results/RUN-mysql-NT_4.0156
-rw-r--r--sql-bench/Results/alter-table-mysql-NT_4.014
-rw-r--r--sql-bench/Results/big-tables-mysql-NT_4.012
-rw-r--r--sql-bench/Results/connect-mysql-NT_4.020
-rw-r--r--sql-bench/Results/create-mysql-NT_4.014
-rw-r--r--sql-bench/Results/insert-mysql-NT_4.084
-rw-r--r--sql-bench/Results/select-mysql-NT_4.026
-rw-r--r--sql-bench/Results/wisconsin-mysql-NT_4.08
-rw-r--r--sql/handler.cc4
-rw-r--r--sql/item_strfunc.cc4
-rw-r--r--sql/log.cc36
-rw-r--r--sql/log_event.h3
-rw-r--r--sql/mysql_priv.h8
-rw-r--r--sql/mysqlbinlog.cc4
-rw-r--r--sql/mysqld.cc23
-rw-r--r--sql/net_pkg.cc21
37 files changed, 496 insertions, 279 deletions
diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh
index e778fc34ceb..53082b7bd79 100644
--- a/BUILD/SETUP.sh
+++ b/BUILD/SETUP.sh
@@ -26,7 +26,7 @@ debug_cflags="-DEXTRA_DEBUG -DFORCE_INIT_OF_VARS -DSAFEMALLOC -DSAFE_MUTEX -O2"
base_cxxflags="-felide-constructors -fno-exceptions -fno-rtti"
-base_configs="--prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-mysqld-ldflags=-all-static --disable-shared"
+base_configs="--prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-mysqld-ldflags=-all-static"
alpha_configs="" # not used yet
pentium_configs=""
sparc_configs=""
diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok
index 4c2320fbc15..5cbdd9a0da8 100644
--- a/BitKeeper/etc/logging_ok
+++ b/BitKeeper/etc/logging_ok
@@ -1,7 +1,8 @@
+jcole@tetra.spaceapes.com
+monty@donna.mysql.com
mwagner@work.mysql.com
+paul@central.snake.net
sasha@mysql.sashanet.com
sasha@work.mysql.com
-tim@cane.mysql.fi
serg@donna.mysql.com
-jcole@tetra.spaceapes.com
-paul@central.snake.net
+tim@cane.mysql.fi
diff --git a/Docs/manual.texi b/Docs/manual.texi
index e2e9611db39..ceeeb9ee0e4 100644
--- a/Docs/manual.texi
+++ b/Docs/manual.texi
@@ -223,6 +223,7 @@ Installing MySQL
* OS/2:: OS/2 notes
* MySQL binaries:: MySQL binaries
* Post-installation:: Post-installation setup and testing
+* Installing many servers:: Installing many servers on the same machine
* Upgrade:: Upgrading/Downgrading MySQL
Installing a MySQL Binary Distribution
@@ -565,6 +566,7 @@ Replication in MySQL
* Replication Options:: Replication Options in my.cnf
* Replication SQL:: SQL Commands related to replication
* Replication FAQ:: Frequently Asked Questions about replication
+* Troubleshooting Replication:: Troubleshooting Replication. Troubleshooting Replication
Getting Maximum Performance from MySQL
@@ -591,6 +593,7 @@ System/Compile Time and Startup Parameter Tuning
* Memory use:: How MySQL uses memory
* Internal locking:: How MySQL locks tables
* Table locking:: Table locking issues
+* DNS::
Disk Issues
@@ -854,6 +857,7 @@ Changes in release 4.0.x (Development; Alpha)
Changes in release 3.23.x (Stable)
+* News-3.23.32:: Changes in release 3.23.32
* 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
@@ -2343,6 +2347,8 @@ Mascon is a powerful Win32 GUI for the administering MySQL server databases.
SuSE Linux (6.1 and above)
@item @uref{http://www.redhat.com/}@*
RedHat Linux (7.0 and above)
+@item @uref{http://distro.conectiva.com.br}
+Conectiva Linux (4.0 and above)
@end itemize
@subheading Web Development Tools that Support @strong{MySQL}
@@ -3836,7 +3842,10 @@ We will provide hints on optimizing your system and your queries.
You are allowed to call a @strong{MySQL} developer (in moderation) and
discuss your @strong{MySQL}-related problems. This option is however
only to be used as a last result during an emergency after we have
-failed to grasp the total problem with email.
+failed to grasp the total problem with email. To make efficient
+use of our time we need to first get all facts about the problem,
+before talking on phone, to be able to work as efficiently as possible on
+solving the problem.
@end itemize
@node Extended login support, , Login support, Support
@@ -3897,6 +3906,7 @@ rate that is at least 20 % less than our standard rates.
* OS/2:: OS/2 notes
* MySQL binaries:: MySQL binaries
* Post-installation:: Post-installation setup and testing
+* Installing many servers:: Installing many servers on the same machine
* Upgrade:: Upgrading/Downgrading MySQL
@end menu
@@ -8719,7 +8729,7 @@ and remove any @code{-fomit-frame-pointer} options.
@cindex post-installation, setup and testing
@cindex testing, post-installation
@cindex setup, post-installation
-@node Post-installation, Upgrade, MySQL binaries, Installing
+@node Post-installation, Installing many servers, MySQL binaries, Installing
@section Post-installation Setup and Testing
@menu
@@ -9042,28 +9052,7 @@ the same time). Generally the problem that occurs when you try to run the
second server is that it tries to use the same socket and port as the old one.
In this case you will get the error message: @code{Can't start server: Bind on
TCP/IP port: Address already in use} or @code{Can't start server : Bind on
-unix socket...} You can start the new server with a different socket and
-port as follows:
-
-@tindex MYSQL_UNIX_PORT environment variable
-@tindex MYSQL_TCP_PORT environment variable
-@tindex Environment variable, MYSQL_UNIX_PORT
-@tindex Environment variable, MYSQL_TCP_PORT
-@example
-shell> MYSQL_UNIX_PORT=/tmp/mysqld-new.sock
-shell> MYSQL_TCP_PORT=3307
-shell> export MYSQL_UNIX_PORT MYSQL_TCP_PORT
-shell> scripts/mysql_install_db
-shell> bin/safe_mysqld &
-@end example
-
-The environment variables appendix includes a list of other environment
-variables you can use to affect @code{mysqld}. @xref{Environment variables}.
-
-After this, you should edit your server boot script to start both daemons
-with different sockets and ports. For example, it could invoke
-@code{safe_mysqld} twice, but with different @code{--socket}, @code{--port},
-and @code{--basedir} options for each invocation.
+unix socket...}. @xref{Installing many servers}.
@item You don't have write access to @file{/tmp}
@cindex write access, tmp
@@ -9533,15 +9522,13 @@ tables.
@item --skip-name-resolve
Hostnames are not resolved. All @code{Host} column values in the grant
-tables must be IP numbers or @code{localhost}.
+tables must be IP numbers or @code{localhost}. @xref{DNS}.
@item --skip-networking
Don't listen for TCP/IP connections at all.
All interaction with @code{mysqld} must be made via Unix sockets.
This option is highly recommended for systems where only local requests
-are allowed. However, this option is unsuitable for systems that use
-MIT-pthreads, because the MIT-pthreads package doesn't support Unix
-sockets.
+are allowed. @xref{DNS}.
@item --skip-new
Don't use new, possible wrong routines.
@@ -9550,7 +9537,7 @@ This will also set default table type to @code{ISAM}. @xref{ISAM}.
@item --skip-host-cache
Never use host name cache for faster name-ip resolution, but query
-DNS server on every connect instead.
+DNS server on every connect instead. @xref{DNS}.
@item --skip-show-database
Don't allow 'SHOW DATABASE' commands, unless the user has
@@ -9583,8 +9570,8 @@ Output version information and exit.
@node Option files, , Command-line options, Post-installation
@subsection Option Files
-@strong{MySQL} Version 3.22 can read default startup options for the server and
-for clients from option files.
+@strong{MySQL} Version 3.22 can read default startup options for the
+server and for clients from option files.
@strong{MySQL} reads default options from the following files on Unix:
@@ -9746,7 +9733,80 @@ shell> my_print_defaults client mysql
The above output contains all options for the groups 'client' and 'mysql'.
-@node Upgrade, , Post-installation, Installing
+@node Installing many servers, Upgrade, Post-installation, Installing
+@section Installing many servers on the same machine
+@cindex post-install, many servers
+@cindex Installing many servers
+@cindex Starting many servers
+
+In some cases you may want to have many different @code{mysqld} deamons
+(servers) running on the same machine. You may for example want to run
+a new version of @code{MySQL} for testing together with an old version
+that is in production. Another case is when you want to give different
+users access to different mysqld servers that they manage themself.
+
+One way to get a new server running is by starting it with a different
+socket and port as follows:
+
+@tindex MYSQL_UNIX_PORT environment variable
+@tindex MYSQL_TCP_PORT environment variable
+@tindex Environment variable, MYSQL_UNIX_PORT
+@tindex Environment variable, MYSQL_TCP_PORT
+@example
+shell> MYSQL_UNIX_PORT=/tmp/mysqld-new.sock
+shell> MYSQL_TCP_PORT=3307
+shell> export MYSQL_UNIX_PORT MYSQL_TCP_PORT
+shell> scripts/mysql_install_db
+shell> bin/safe_mysqld &
+@end example
+
+The environment variables appendix includes a list of other environment
+variables you can use to affect @code{mysqld}. @xref{Environment variables}.
+
+The above is the quick and dirty way that one commonly use for testing.
+The nice thing with this is that all connections you do in the above shell
+will automaticly be directed to the new running server!
+
+If you need to do this more permanently, you should create an own option
+file for each server. @xref{Option files}. In your startup script that
+is executed at boot time (mysql.server?) you should specify for both
+servers:
+
+@code{safe_mysqld --default-file=path-to-option-file}
+
+At least the following options should be different per server:
+
+@table @code
+@item port=#
+@item socket=path
+@item pid-file=path
+@end table
+
+The following options should be different, if they are used:
+
+@table @code
+@item log=path
+@item log-bin=path
+@item log-update=path
+@item log-isam=path
+@item bdb-logdir=path
+@end table
+
+If you want more performance, you can also specify the following differently:
+
+@table @code
+@item tmpdir=path
+@item bdb-tmpdir=path
+@end table
+
+@xref{Command-line options}.
+
+If you are installing binary @strong{MySQL} versions (.tar files) and
+start them with @code{./bin/safe_mysqld} then in most cases the only
+option you need to add/change is the @code{socket} and @code{port}
+argument to @code{safe_mysqld}.
+
+@node Upgrade, , Installing many servers, Installing
@section Upgrading/Downgrading MySQL
@cindex upgrading
@cindex downgrading
@@ -9831,7 +9891,11 @@ all your tables with @code{isamchk -r}, as we have made some changes in
the sort order!
@item The default return type of @code{IF} will now depend on both arguments
and not only the first argument.
-@item @code{AUTO_INCREMENT} will not work with negative numbers.
+@item @code{AUTO_INCREMENT} will not work with negative numbers. The reason
+for this is that negative numbers caused problems when wrapping from -1 to 0.
+@code{AUTO_INCREMENT} is now for MyISAM tables handled at a lower level and
+is much faster than before. For MyISAM tables old numbers are also not reused
+anymore, even if you delete some rows from the table.
@item @code{INNER}, @code{DELAYED}, @code{RIGHT}, @code{CASE}, @code{THEN}, @code{WHEN}, @code{ELSE}, @code{END} and @code{WHEN} are now reserved words.
@item @code{FLOAT(X)} is now a true floating-point type and not a value with
a fixed number of decimals.
@@ -12766,8 +12830,9 @@ Access denied for user: 'root@' (Using password: YES)
This means that @strong{MySQL} got some error when trying to resolve the
IP to a hostname. In this case you can execute @code{mysqladmin
-flush-hosts} to reset the internal DNS cache. Some permanent solutions
-are:
+flush-hosts} to reset the internal DNS cache. @xref{DNS}.
+
+Some permanent solutions are:
@itemize @minus
@item
@@ -25633,7 +25698,7 @@ tables}.
* Replication Options:: Replication Options in my.cnf
* Replication SQL:: SQL Commands related to replication
* Replication FAQ:: Frequently Asked Questions about replication
-* Troubleshooting Replication:: Troubleshooting Replication
+* Troubleshooting Replication:: Troubleshooting Replication. Troubleshooting Replication
@end menu
@node Replication Intro, Replication Implementation, Replication, Replication
@@ -26194,7 +26259,7 @@ last log on the list), backup all the logs you are about to delete
@end multitable
-@node Replication FAQ,Troubleshooting Replication, Replication SQL, Replication
+@node Replication FAQ, Troubleshooting Replication, Replication SQL, Replication
@section Replication FAQ
@cindex @code{Binlog_Dump}
@@ -26448,7 +26513,7 @@ We are currently working on intergrating an automatic master election
system into @strong{MySQL}, but until it is ready, you will have to
create your own monitoring tools.
-@node Troubleshooting Replication, ,Replication FAQ, Replication
+@node Troubleshooting Replication, , Replication FAQ, Replication
@section Troubleshooting Replication
If you have followed the instructions, and your replication setup is not
@@ -26670,6 +26735,7 @@ are using @code{--skip-locking}
* Memory use:: How MySQL uses memory
* Internal locking:: How MySQL locks tables
* Table locking:: Table locking issues
+* DNS::
@end menu
@node Compile and link options, Disk issues, System, System
@@ -27280,7 +27346,7 @@ single queue. In this case, write locks and read locks would have the same
priority, which might help some applications.
@cindex problems, table locking
-@node Table locking, , Internal locking, System
+@node Table locking, DNS, Internal locking, System
@subsection Table Locking Issues
The table locking code in @strong{MySQL} is deadlock free.
@@ -27331,6 +27397,10 @@ Another client issues another @code{SELECT} statement on the same table. As
@code{UPDATE} has higher priority than @code{SELECT}, this @code{SELECT}
will wait for the @code{UPDATE} to finish. It will also wait for the first
@code{SELECT} to finish!
+@item
+A thread is waiting for something like @code{full disk}, in which case all
+threads that wants to access the problem table will also be put in a waiting
+state until more disk space is made available.
@end itemize
Some possible solutions to this problem are:
@@ -27378,6 +27448,39 @@ If you have problems with @code{SELECT} and @code{DELETE}, the @code{LIMIT}
option to @code{DELETE} may help. @xref{DELETE, , @code{DELETE}}.
@end itemize
+@cindex DNS
+@cindex hostname caching
+@node DNS, , Table locking, System
+@subsection How MySQL uses DNS
+
+When a new threads connects to @code{mysqld}, @code{mysqld} will span a
+new thread to handle the request. This thread will first check if the
+hostname is in the hostname cache. If not the thread will call
+@code{gethostbyaddr_r()} and @code{gethostbyname_r()} to resolve the
+hostname.
+
+If the operating system doesn't support the above thread-safe calls, the
+thread will lock a mutex and call @code{gethostbyaddr()} and
+@code{gethostbyname()} instead. Note that in this case no other thread
+can resolve other hostnames that is not in the hostname cache until the
+first thread is ready.
+
+You can disable DNS host lookup by starting @code{mysqld} with
+@code{--skip-name-resolve}. In this case you can however only use IP
+names in the @strong{MySQL} privilege tables.
+
+If you have a very slow DNS and many hosts, you can get more performance by
+either disabling DNS lookop with @code{--skip-name-resolve} or by
+increasing the @code{HOST_CACHE_SIZE} define (default: 128) and recompile
+@code{mysqld}.
+
+You can disable the hostname cache with @code{--skip-host-cache}. You
+can clear the hostname cache with @code{FLUSH HOSTS} or @code{mysqladmin
+flush-hosts}.
+
+If you don't want to allow connections over @code{TCP/IP}, you can do this
+by starting mysqld with @code{--skip-networking}.
+
@cindex data, size
@cindex reducing, data size
@cindex storage space, minimizing
@@ -40557,6 +40660,18 @@ All new features are being developed in the 4.0 version. Only
bug fixes and minor enhancements to existing features will be
added to 3.23.
+The replication code and BerkeleyDB code is still not as tested and as
+the rest of the code, so we will probably need to do a couple of future
+releases of 3.23 with small fixes for this part of the code. As long as
+you don't use these features, you should be quite safe with
+@strong{MySQL} 3.23!
+
+Note that the above doesn't mean that replication or Berkeley DB doesn't
+work; We have done a lot of testing of all code, including replication
+and BDB without finding any problems. It only means that not as many
+users uses this code as the rest of the code and because of this we are
+not yet 100 % confident in this code.
+
@menu
* News-3.23.32:: Changes in release 3.23.32
* News-3.23.31:: Changes in release 3.23.31
@@ -40597,6 +40712,16 @@ added to 3.23.
@appendixsubsec Changes in release 3.23.32
@itemize @bullet
@item
+@code{MERGE} tables didn't work on windows.
+@item
+Fixed problem with @code{SET PASSWORD=...} on windows.
+@item
+Added missing @file{my_config.h} to RPM distribution.
+@item
+@code{TRIM("foo" from "foo")} didn't return an empty string.
+@item
+Added @code{--with-version-suffix} to configure.
+@item
Fixed coredump when client aborted connection without @code{mysql_close()}.
@item
Fixed bug in @code{RESTORE TABLE} when trying to restore from a non-existing
@@ -45197,6 +45322,7 @@ fields, the @code{BLOB} was garbage on output.
Fixed @code{DISTINCT} with calculated columns.
@end itemize
+@cindex bugs, known
@cindex errors, known
@cindex design, issues
@cindex known errors
@@ -45243,6 +45369,9 @@ mapped tables.
@item
For the moment @code{MATCH} only works with @code{SELECT} statements.
@item
+When using @code{SET CHARACTER SET}, one can't use translated
+characters in database, table and column names.
+@item
You cannot build in another directory when using
MIT-pthreads. Because this requires changes to MIT-pthreads, we are not
likely to fix this.
@@ -45490,6 +45619,10 @@ expansions of column names) should not open the table, but only the
definition file. This will require less memory and be much faster.
@item
New key cache
+@item
+When using @code{SET CHARACTER SET} we should translate the whole query
+at once and not only strings. This will enable users to use the translated
+characters in database, table and column names.
@end itemize
@node TODO future, TODO sometime, TODO MySQL 4.0, TODO
diff --git a/acinclude.m4 b/acinclude.m4
index da817a179a7..94ea5e9b0fb 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -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.*h: ' [$1] > /dev/null
then
bdb_version_ok=yes
else
diff --git a/client/mysql.cc b/client/mysql.cc
index 695d11d039c..d0300344ba4 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -39,7 +39,7 @@
#include "my_readline.h"
#include <signal.h>
-const char *VER="11.11";
+const char *VER="11.12";
gptr sql_alloc(unsigned size); // Don't use mysqld alloc for these
void sql_element_free(void *ptr);
@@ -521,7 +521,7 @@ static void usage(int version)
puts(" -W, --pipe Use named pipes to connect to server");
#endif
printf("\n\
- -P --port=... Port number to use for connection.\n\
+ -P, --port=... Port number to use for connection.\n\
-q, --quick Don't cache result, print it row by row. This may\n\
slow down the server if the output is suspended.\n\
Doesn't use history file.\n\
@@ -530,7 +530,7 @@ static void usage(int version)
-S --socket=... Socket file to use for connection.\n");
#include "sslopt-usage.h"
printf("\
- -t --table Output in table format.\n\
+ -t, --table Output in table format.\n\
-T, --debug-info Print some debug info at exit.\n\
--tee=... Append everything into outfile. See interactive help\n\
(\\h) also. Does not work in batch mode.\n");
diff --git a/include/Makefile.am b/include/Makefile.am
index 17d9c95216c..0cd749aea8a 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -15,7 +15,7 @@
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA
-BUILT_SOURCES = mysql_version.h m_ctype.h
+BUILT_SOURCES = mysql_version.h m_ctype.h my_config.h
pkginclude_HEADERS = dbug.h m_string.h my_sys.h mysql.h mysql_com.h \
mysqld_error.h my_list.h \
my_pthread.h my_no_pthread.h raid.h errmsg.h \
@@ -43,6 +43,11 @@ all-local: my_global.h my_config.h
link_sources:
$(CP) ../config.h my_config.h
+# Keep automake happy
+
+my_config.h: ../config.h
+ $(CP) ../config.h my_config.h
+
# This should be changed in the source and removed.
my_global.h: global.h
$(RM) -f my_global.h
diff --git a/include/mysql_com.h b/include/mysql_com.h
index f7052225dce..f03dc0bf96e 100644
--- a/include/mysql_com.h
+++ b/include/mysql_com.h
@@ -26,6 +26,7 @@
#define NAME_LEN 64 /* Field/table name length */
#define HOSTNAME_LENGTH 60
#define USERNAME_LENGTH 16
+#define SERVER_VERSION_LENGTH 60
#define LOCAL_HOST "localhost"
#define LOCAL_HOST_NAMEDPIPE "."
diff --git a/include/mysql_version.h.in b/include/mysql_version.h.in
index 8a4bff7a284..44fd00f806a 100644
--- a/include/mysql_version.h.in
+++ b/include/mysql_version.h.in
@@ -1,10 +1,10 @@
-/* Copyright Abandoned 1996,1999 TCX DataKonsult AB & Monty Program KB & Detron HB
+/* Copyright Abandoned 1996, 1999, 2001 MySQL AB
This file is public domain and comes with NO WARRANTY of any kind */
/* Version numbers for protocol & mysqld */
#ifdef _CUSTOMCONFIG_
- #include <custom_conf.h>
+#include <custom_conf.h>
#else
#define PROTOCOL_VERSION @PROTOCOL_VERSION@
#define MYSQL_SERVER_VERSION "@VERSION@"
diff --git a/merge/open.c b/merge/open.c
index 18d3b53fa84..2a3d815cd27 100644
--- a/merge/open.c
+++ b/merge/open.c
@@ -36,11 +36,12 @@ int mode;
int handle_locking;
{
int save_errno,i,errpos;
- uint files,dir_length;
+ uint files,dir_length,length;
ulonglong file_offset;
char name_buff[FN_REFLEN*2],buff[FN_REFLEN],*end;
MRG_INFO info,*m_info;
- FILE *file;
+ File fd;
+ IO_CACHE file;
N_INFO *isam,*last_isam;
DBUG_ENTER("mrg_open");
@@ -48,15 +49,18 @@ int handle_locking;
isam=0;
errpos=files=0;
bzero((gptr) &info,sizeof(info));
- if (!(file=my_fopen(fn_format(name_buff,name,"",MRG_NAME_EXT,4),
- O_RDONLY | O_SHARE,MYF(0))))
+ bzero((char*) &file,sizeof(file));
+ if ((fd=my_open(fn_format(name_buff,name,"",MRG_NAME_EXT,4),
+ O_RDONLY | O_SHARE,MYF(0))) < 0 ||
+ init_io_cache(&file, fd, IO_SIZE, READ_CACHE, 0, 0,
+ MYF(MY_WME | MY_NABP)))
goto err;
errpos=1;
dir_length=dirname_part(name_buff,name);
info.reclength=0;
- while (fgets(buff,FN_REFLEN-1,file))
+ while ((length=my_b_gets(&file,buff,FN_REFLEN-1)))
{
- if ((end=strend(buff))[-1] == '\n')
+ if ((end=buff+length)[-1] == '\n')
end[-1]='\0';
if (buff[0]) /* Skipp empty lines */
{
@@ -113,7 +117,8 @@ int handle_locking;
m_info->end_table=m_info->open_tables+files;
m_info->last_used_table=m_info->open_tables;
- VOID(my_fclose(file,MYF(0)));
+ VOID(my_close(fd,MYF(0)));
+ end_io_cache(&file);
m_info->open_list.data=(void*) m_info;
pthread_mutex_lock(&THR_LOCK_open);
mrg_open_list=list_add(mrg_open_list,&m_info->open_list);
@@ -124,7 +129,8 @@ err:
save_errno=my_errno;
switch (errpos) {
case 1:
- VOID(my_fclose(file,MYF(0)));
+ VOID(my_close(fd,MYF(0)));
+ end_io_cache(&file);
for (i=files ; i-- > 0 ; )
{
isam=last_isam;
diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am
index 93804c4699b..d59250fbca5 100644
--- a/mysql-test/Makefile.am
+++ b/mysql-test/Makefile.am
@@ -30,8 +30,7 @@ dist-hook:
cp -p $(srcdir)/t/*.test $(srcdir)/t/*.opt $(distdir)/t
cp -p $(srcdir)/include/*.inc $(distdir)/include
cp -p $(srcdir)/r/*.result $(srcdir)/r/*.require $(distdir)/r
- cp -p $(srcdir)/std_data/*.dat $(srcdir)/std_data/*.frm \
-$(srcdir)/std_data/*.MRG $(distdir)/std_data
+ cp -p $(srcdir)/std_data/*.dat $(distdir)/std_data
install-data-local:
$(mkinstalldirs) \
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result
index aac051d00fa..c1a0c288562 100644
--- a/mysql-test/r/func_str.result
+++ b/mysql-test/r/func_str.result
@@ -32,6 +32,8 @@ concat(':',trim(BOTH 'ab' FROM 'ababmyabab'),':',trim(BOTH '*' FROM '***sql'),':
:my:sql:
concat(':',trim(LEADING '.*' FROM '.*my'),':',trim(TRAILING '.*' FROM 'sql.*.*'),':')
:my:sql:
+TRIM("foo" FROM "foo") TRIM("foo" FROM "foook") TRIM("foo" FROM "okfoo")
+ ok ok
insert('txs',2,1,'hi') insert('is ',4,0,'a') insert('txxxxt',2,4,'es')
this is a test
replace('aaaa','a','b') replace('aaaa','aa','b') replace('aaaa','a','bb') replace('aaaa','','b') replace('bbbb','a','c')
diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result
index 5135ce0c9e9..5ef58bcef3f 100644
--- a/mysql-test/r/merge.result
+++ b/mysql-test/r/merge.result
@@ -106,4 +106,4 @@ incr othr
2 24
4 33
3 53
-c
+a
diff --git a/mysql-test/std_data/m.MRG b/mysql-test/std_data/m.MRG
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/mysql-test/std_data/m.MRG
+++ /dev/null
diff --git a/mysql-test/std_data/m.frm b/mysql-test/std_data/m.frm
deleted file mode 100644
index fc684891d9e..00000000000
--- a/mysql-test/std_data/m.frm
+++ /dev/null
Binary files differ
diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test
index 51af2766dae..d4211868790 100644
--- a/mysql-test/t/func_str.test
+++ b/mysql-test/t/func_str.test
@@ -22,6 +22,7 @@ select concat(':',trim(LEADING FROM ' left'),':',trim(TRAILING FROM ' right '),'
select concat(':',trim(' m '),':',trim(BOTH FROM ' y '),':',trim('*' FROM '*s*'),':');
select concat(':',trim(BOTH 'ab' FROM 'ababmyabab'),':',trim(BOTH '*' FROM '***sql'),':');
select concat(':',trim(LEADING '.*' FROM '.*my'),':',trim(TRAILING '.*' FROM 'sql.*.*'),':');
+select TRIM("foo" FROM "foo"), TRIM("foo" FROM "foook"), TRIM("foo" FROM "okfoo");
select insert('txs',2,1,'hi'),insert('is ',4,0,'a'),insert('txxxxt',2,4,'es');
select replace('aaaa','a','b'),replace('aaaa','aa','b'),replace('aaaa','a','bb'),replace('aaaa','','b'),replace('bbbb','a','c');
diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test
index a4b4b5c8178..a3b2c8a11de 100644
--- a/mysql-test/t/merge.test
+++ b/mysql-test/t/merge.test
@@ -75,5 +75,6 @@ drop table t3,t2,t1;
#
# Test table without unions
#
-select * from m;
-
+create table t1 (a int not null) type=merge;
+select * from t1;
+drop table t1;
diff --git a/mysys/charset.c b/mysys/charset.c
index 47716540b2c..c17c6113b57 100644
--- a/mysys/charset.c
+++ b/mysys/charset.c
@@ -100,7 +100,7 @@ char *get_charsets_dir(char *buf)
DBUG_ENTER("get_charsets_dir");
if (charsets_dir != NULL)
- strnmov(buf, charsets_dir, FN_REFLEN);
+ strmake(buf, charsets_dir, FN_REFLEN-1);
else
{
if (test_if_hard_path(sharedir) ||
diff --git a/mysys/mf_format.c b/mysys/mf_format.c
index 3050fd88e90..bb784ff08fe 100644
--- a/mysys/mf_format.c
+++ b/mysys/mf_format.c
@@ -57,7 +57,7 @@ my_string fn_format(my_string to, const char *name, const char *dsk,
name+=(length=dirname_part(dev,(startpos=(my_string) name)));
if (length == 0 || flag & 1)
{
- (void) strnmov(dev,dsk, sizeof(dev) - 2);
+ (void) strmake(dev,dsk, sizeof(dev) - 2);
/* Use given directory */
convert_dirname(dev); /* Fix to this OS */
}
@@ -100,7 +100,7 @@ my_string fn_format(my_string to, const char *name, const char *dsk,
bmove(buff,(char*) name,length); /* Save name for last copy */
name=buff;
}
- pos=strnmov(strmov(to,dev),name,length);
+ pos=strmake(strmov(to,dev),name,length);
#ifdef FN_UPPER_CASE
caseup_str(to);
#endif
@@ -117,7 +117,7 @@ my_string fn_format(my_string to, const char *name, const char *dsk,
if (flag & 32 || (!lstat(to,&stat_buff) && S_ISLNK(stat_buff.st_mode)))
{
if (realpath(to,buff))
- strnmov(to,buff,FN_REFLEN-1);
+ strmake(to,buff,FN_REFLEN-1);
}
}
#endif
diff --git a/mysys/mf_tempfile.c b/mysys/mf_tempfile.c
index a12b4326705..6204c4d0407 100644
--- a/mysys/mf_tempfile.c
+++ b/mysys/mf_tempfile.c
@@ -69,7 +69,7 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
}
if ((res=tempnam((char*) dir,(char *) prefix)))
{
- strnmov(to,res,FN_REFLEN);
+ strmake(to,res,FN_REFLEN-1);
(*free)(res);
file=my_create(to,0, mode, MyFlags);
}
@@ -80,7 +80,7 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
dir=getenv("TMPDIR");
if ((res=tempnam((char*) dir,(char *) prefix)))
{
- strnmov(to,res,FN_REFLEN);
+ strmake(to,res,FN_REFLEN-1);
(*free)(res);
file=my_create(to, 0, mode, MyFlags);
}
@@ -130,7 +130,7 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
}
if ((res=tempnam((char*) dir, (char*) prefix)))
{
- strnmov(to,res,FN_REFLEN);
+ strmake(to,res,FN_REFLEN-1);
(*free)(res);
file=my_create(to,0,
(int) (O_RDWR | O_BINARY | O_TRUNC |
diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh
index 14c4b616dec..3f8e497e511 100644
--- a/scripts/make_binary_distribution.sh
+++ b/scripts/make_binary_distribution.sh
@@ -38,7 +38,7 @@ fi
# This should really be integrated with automake and not duplicate the
# installation list.
-BASE=$TMP/my_dist
+BASE=$TMP/my_dist$SUFFIX
if [ -d $BASE ] ; then
rm -r -f $BASE
@@ -59,10 +59,28 @@ do
done
for i in extra/comp_err extra/replace extra/perror extra/resolveip \
- extra/my_print_defaults isam/isamchk isam/pack_isam myisam/myisamchk myisam/myisampack sql/mysqld sql/mysqlbinlog \
- client/mysql sql/mysqld sql/mysqld.sym.gz client/mysqlshow \
- client/mysqladmin client/mysqldump client/mysqlimport client/mysqltest \
- client/.libs/mysql client/.libs/mysqlshow client/.libs/mysqladmin client/.libs/mysqldump client/.libs/mysqlimport client/.libs/mysqltest
+ extra/my_print_defaults isam/isamchk isam/pack_isam myisam/myisamchk \
+ myisam/myisampack sql/mysqld sql/mysqlbinlog \
+ client/mysql sql/mysqld client/mysqlshow \
+ client/mysqladmin client/mysqldump client/mysqlimport client/mysqltest \
+ client/.libs/mysql client/.libs/mysqlshow client/.libs/mysqladmin \
+ client/.libs/mysqldump client/.libs/mysqlimport client/.libs/mysqltest
+do
+ if [ -f $i ]
+ then
+ cp -p $i $BASE/bin
+ strip $BASE/bin
+ fi
+done
+
+for i in sql/mysqld.sym.gz
+ if [ -f $i ]
+ then
+ cp -p $i $BASE/bin
+ fi
+done
+
+for i in 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
do
if [ -f $i ]
then
@@ -75,7 +93,7 @@ rm $BASE/include/Makefile*; rm $BASE/include/*.in
cp -p tests/*.res tests/*.tst tests/*.pl $BASE/tests
cp -p support-files/* $BASE/support-files
-cp -p libmysql/.libs/libmysqlclient.a libmysql/.libs/libmysqlclient.so* libmysql/libmysqlclient.* libmysql_r/.libs/libmysqlclient_r.a libmysql_r/.libs/libmysqlclient_r.so* libmysql_r/libmysqlclient_r.* mysys/libmysys.a strings/libmystrings.a dbug/libdbug.a $BASE/lib
+
cp -r -p sql/share/* $BASE/share/mysql
rm -f $BASE/share/mysql/Makefile* $BASE/share/mysql/*/*.OLD
@@ -106,7 +124,7 @@ if [ -d $BASE/sql-bench/SCCS ] ; then
fi
# Change the distribution to a long descriptive name
-NEW_NAME=mysql-$version-$system-$machine$SUFFIX
+NEW_NAME=mysql@MYSQL_SERVER_SUFFIX@-$version-$system-$machine$SUFFIX
BASE2=$TMP/$NEW_NAME
rm -r -f $BASE2
mv $BASE $BASE2
diff --git a/sql-bench/Results/ATIS-mysql-NT_4.0 b/sql-bench/Results/ATIS-mysql-NT_4.0
index d523526a1a5..0b6f896a13b 100644
--- a/sql-bench/Results/ATIS-mysql-NT_4.0
+++ b/sql-bench/Results/ATIS-mysql-NT_4.0
@@ -1,19 +1,20 @@
-Testing server 'MySQL 3.23.26 gamma' at 2000-10-13 14:00:43
+Testing server 'MySQL 3.23.31' at 2001-01-18 0:38:04
ATIS table test
Creating tables
-Time for create_table (28): 1 wallclock secs ( 0.02 usr 0.02 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for create_table (28): 0 wallclock secs ( 0.00 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Inserting data
-Time to insert (9768): 5 wallclock secs ( 1.06 usr 1.22 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time to insert (9768): 5 wallclock secs ( 0.95 usr 1.20 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Retrieving data
-Time for select_simple_join (500): 3 wallclock secs ( 1.56 usr 0.66 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for select_join (200): 23 wallclock secs (13.31 usr 5.59 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for select_distinct (800): 17 wallclock secs ( 4.36 usr 2.64 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for select_group (2800): 20 wallclock secs ( 3.14 usr 1.14 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for select_simple_join (500): 3 wallclock secs ( 1.59 usr 0.67 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for select_join (100): 4 wallclock secs ( 1.39 usr 0.55 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for select_key_prefix_join (100): 19 wallclock secs (12.20 usr 4.53 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for select_distinct (800): 17 wallclock secs ( 4.72 usr 1.55 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for select_group (2800): 20 wallclock secs ( 3.14 usr 0.95 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: 69 wallclock secs (23.45 usr 11.27 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Total time: 68 wallclock secs (24.02 usr 9.47 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
diff --git a/sql-bench/Results/RUN-mysql-NT_4.0 b/sql-bench/Results/RUN-mysql-NT_4.0
index e1908bc04b0..43480bf0fe7 100644
--- a/sql-bench/Results/RUN-mysql-NT_4.0
+++ b/sql-bench/Results/RUN-mysql-NT_4.0
@@ -1,86 +1,96 @@
-Benchmark DBD suite: 2.9
-Date of test: 2000-10-13 13:16:20
+Benchmark DBD suite: 2.11a
+Date of test: 2001-01-17 23:59:27
Running tests on: Windows NT Version 4.0
Arguments:
Comments: 2x Pentium III XEON 450MHZ, 512M
Limits from:
-Server version: MySQL 3.23.26 gamma
+Server version: MySQL 3.23.31
-alter-table: Total time: 2663 wallclock secs ( 0.73 usr 0.64 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-ATIS: Total time: 69 wallclock secs (23.45 usr 11.27 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-big-tables: Total time: 80 wallclock secs (17.59 usr 18.69 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-connect: Total time: 178 wallclock secs (57.88 usr 48.91 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-create: Total time: 848 wallclock secs (14.42 usr 10.19 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-insert: Total time: 5599 wallclock secs (584.97 usr 320.95 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-select: Total time: 2294 wallclock secs (316.44 usr 121.50 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-wisconsin: Total time: 28 wallclock secs ( 8.39 usr 5.59 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+alter-table: Total time: 2315 wallclock secs ( 0.78 usr 0.53 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+ATIS: Total time: 68 wallclock secs (24.02 usr 9.47 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+big-tables: Total time: 80 wallclock secs (18.31 usr 19.30 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+connect: Total time: 183 wallclock secs (60.53 usr 49.50 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+create: Total time: 995 wallclock secs (13.64 usr 10.78 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+insert: Total time: 7164 wallclock secs (872.86 usr 441.45 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+select: Total time: 1297 wallclock secs (113.66 usr 43.80 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+wisconsin: Total time: 28 wallclock secs ( 7.94 usr 5.42 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 1433.00 0.45 0.34 0.00 992
-alter_table_drop 1177.00 0.17 0.14 0.00 496
-connect 33.00 11.66 10.31 0.00 10000
-connect+select_1_row 38.00 12.94 12.19 0.00 10000
-connect+select_simple 38.00 12.14 12.00 0.00 10000
-count 34.00 0.11 0.03 0.00 100
-count_distinct 74.00 0.95 0.28 0.00 1000
-count_distinct_big 1191.00 227.87 86.22 0.00 1020
-count_distinct_group 149.00 2.50 1.00 0.00 1000
-count_distinct_group_on_key 40.00 0.63 0.27 0.00 1000
-count_distinct_group_on_key_parts 149.00 2.95 1.06 0.00 1000
-count_group_on_key_parts 41.00 2.72 0.84 0.00 1000
-count_on_key 407.00 20.91 9.02 0.00 50100
-create+drop 124.00 3.22 2.39 0.00 10000
-create_MANY_tables 213.00 2.77 1.67 0.00 10000
-create_index 27.00 0.00 0.00 0.00 8
-create_key+drop 159.00 5.92 2.61 0.00 10000
-create_table 1.00 0.02 0.02 0.00 31
-delete_all 22.00 0.00 0.02 0.00 12
-delete_all_many_keys 1422.00 0.00 0.00 0.00 1
+alter_table_add 1225.00 0.47 0.25 0.00 992
+alter_table_drop 1039.00 0.19 0.11 0.00 496
+connect 33.00 11.47 9.97 0.00 10000
+connect+select_1_row 38.00 13.19 12.03 0.00 10000
+connect+select_simple 36.00 12.84 11.23 0.00 10000
+count 35.00 0.06 0.00 0.00 100
+count_distinct 80.00 0.94 0.31 0.00 2000
+count_distinct_big 214.00 23.03 7.88 0.00 120
+count_distinct_group 150.00 3.03 1.20 0.00 1000
+count_distinct_group_on_key 45.00 0.67 0.25 0.00 1000
+count_distinct_group_on_key_parts 150.00 3.31 0.97 0.00 1000
+count_group_on_key_parts 41.00 2.81 0.92 0.00 1000
+count_on_key 377.00 21.58 9.17 0.00 50100
+create+drop 142.00 3.30 2.89 0.00 10000
+create_MANY_tables 245.00 2.73 1.56 0.00 10000
+create_index 25.00 0.00 0.00 0.00 8
+create_key+drop 172.00 5.14 2.92 0.00 10000
+create_table 0.00 0.00 0.01 0.00 31
+delete_all 21.00 0.00 0.02 0.00 12
+delete_all_many_keys 1980.00 0.03 0.03 0.00 1
delete_big 0.00 0.00 0.00 0.00 1
-delete_big_many_keys 1422.00 0.00 0.00 0.00 128
-delete_key 7.00 0.97 1.36 0.00 10000
-drop_index 25.00 0.00 0.02 0.00 8
+delete_big_many_keys 1980.00 0.03 0.03 0.00 128
+delete_key 8.00 0.88 1.34 0.00 10000
+drop_index 25.00 0.00 0.00 0.00 8
drop_table 0.00 0.00 0.00 0.00 28
-drop_table_when_MANY_tables 159.00 1.22 1.27 0.00 10000
-insert 252.00 34.77 46.66 0.00 350768
-insert_duplicates 59.00 8.11 13.67 0.00 100000
-insert_key 1447.00 13.78 13.42 0.00 100000
-insert_many_fields 22.00 0.55 0.35 0.00 2000
+drop_table_when_MANY_tables 187.00 1.08 1.38 0.00 10000
+insert 234.00 35.02 48.52 0.00 350768
+insert_duplicates 59.00 8.92 14.09 0.00 100000
+insert_key 1853.00 13.92 13.81 0.00 100000
+insert_many_fields 22.00 0.64 0.39 0.00 2000
insert_select_1_key 8.00 0.00 0.00 0.00 1
-insert_select_2_keys 13.00 0.00 0.00 0.00 1
-min_max 18.00 0.11 0.02 0.00 60
-min_max_on_key 192.00 36.01 14.60 0.00 85000
-multiple_value_insert 9.00 2.34 0.26 0.00 100000
-order_by 98.00 63.58 25.14 0.00 10
-order_by_key 90.00 64.05 25.08 0.00 10
-outer_join 118.00 0.01 0.00 0.00 10
-outer_join_found 105.00 0.00 0.00 0.00 10
-outer_join_not_found 56.00 0.00 0.00 0.00 500
-outer_join_on_key 40.00 0.00 0.00 0.00 10
-select_1_row 5.00 0.78 1.78 0.00 10000
-select_2_rows 6.00 0.91 2.11 0.00 10000
-select_big 138.00 81.45 32.88 0.00 10080
-select_column+column 6.00 1.00 1.72 0.00 10000
-select_diff_key 124.00 0.41 0.09 0.00 500
-select_distinct 17.00 4.36 2.64 0.00 800
-select_group 56.00 3.22 1.16 0.00 2911
-select_group_when_MANY_tables 193.00 1.28 2.25 0.00 10000
-select_join 23.00 13.31 5.59 0.00 200
-select_key 196.00 96.84 36.63 0.00 200000
-select_key2 203.00 92.92 39.80 0.00 200000
-select_key_prefix 201.00 91.41 40.78 0.00 200000
-select_many_fields 56.00 17.03 18.35 0.00 2000
-select_range 189.00 26.94 9.30 0.00 410
-select_range_key2 30.00 10.56 3.72 0.00 25010
-select_range_prefix 26.00 9.81 4.36 0.00 25010
-select_simple 4.00 1.05 1.67 0.00 10000
-select_simple_join 3.00 1.56 0.66 0.00 500
-update_big 62.00 0.00 0.00 0.00 10
-update_of_key 492.00 4.46 7.55 0.00 50256
-update_of_key_big 33.00 0.06 0.03 0.00 501
-update_with_key 188.00 25.03 40.83 0.00 300000
-wisc_benchmark 9.00 5.80 1.47 0.00 114
-TOTALS 13172.00 1023.62 537.63 0.00 1944607
+insert_select_2_keys 12.00 0.00 0.00 0.00 1
+min_max 18.00 0.05 0.02 0.00 60
+min_max_on_key 193.00 35.67 14.80 0.00 85000
+multiple_value_insert 12.00 2.50 0.19 0.00 100000
+order_by_big 104.00 64.25 25.28 0.00 10
+order_by_big_key 95.00 69.14 26.05 0.00 10
+order_by_big_key2 90.00 63.38 26.20 0.00 10
+order_by_big_key_desc 96.00 68.61 26.58 0.00 10
+order_by_big_key_diff 100.00 65.05 24.69 0.00 10
+order_by_big_key_prefix 89.00 63.73 25.53 0.00 10
+order_by_key2_diff 11.00 5.53 2.23 0.00 500
+order_by_key_prefix 6.00 3.11 1.09 0.00 500
+order_by_range 9.00 3.02 1.25 0.00 500
+outer_join 118.00 0.00 0.00 0.00 10
+outer_join_found 106.00 0.02 0.00 0.00 10
+outer_join_not_found 58.00 0.02 0.00 0.00 500
+outer_join_on_key 41.00 0.03 0.00 0.00 10
+select_1_row 5.00 1.14 1.80 0.00 10000
+select_2_rows 6.00 0.91 2.03 0.00 10000
+select_big 146.00 83.48 34.54 0.00 10080
+select_column+column 6.00 0.88 1.83 0.00 10000
+select_diff_key 122.00 0.45 0.08 0.00 500
+select_distinct 17.00 4.72 1.55 0.00 800
+select_group 56.00 3.17 1.01 0.00 2911
+select_group_when_MANY_tables 249.00 1.39 2.03 0.00 10000
+select_join 4.00 1.39 0.55 0.00 100
+select_key 194.00 90.98 38.86 0.00 200000
+select_key2 202.00 92.78 37.67 0.00 200000
+select_key_prefix 199.00 93.61 38.05 0.00 200000
+select_key_prefix_join 19.00 12.20 4.53 0.00 100
+select_many_fields 55.00 17.65 18.90 0.00 2000
+select_range 187.00 27.39 9.33 0.00 410
+select_range_key2 29.00 10.31 3.64 0.00 25010
+select_range_prefix 28.00 10.05 4.22 0.00 25010
+select_simple 4.00 0.88 1.61 0.00 10000
+select_simple_join 3.00 1.59 0.67 0.00 500
+update_big 60.00 0.00 0.00 0.00 10
+update_of_key 56.00 4.28 7.00 0.00 50000
+update_of_key_big 33.00 0.06 0.08 0.00 501
+update_of_primary_key_many_keys 580.00 0.03 0.05 0.00 256
+update_with_key 188.00 27.97 41.06 0.00 300000
+update_with_key_prefix 59.00 9.42 12.14 0.00 100000
+wisc_benchmark 9.00 5.44 1.66 0.00 114
+TOTALS 14098.00 1111.56 580.08 0.00 2046247
diff --git a/sql-bench/Results/alter-table-mysql-NT_4.0 b/sql-bench/Results/alter-table-mysql-NT_4.0
index 5a7cd64f85b..3a75bf1a366 100644
--- a/sql-bench/Results/alter-table-mysql-NT_4.0
+++ b/sql-bench/Results/alter-table-mysql-NT_4.0
@@ -1,16 +1,16 @@
-Testing server 'MySQL 3.23.26 gamma' at 2000-10-13 13:16:20
+Testing server 'MySQL 3.23.31' at 2001-01-17 23:59:28
Testing of ALTER TABLE
Testing with 1000 columns and 1000 rows in 20 steps
Insert data into the table
-Time for insert (1000) 1 wallclock secs ( 0.11 usr 0.14 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for insert (1000) 1 wallclock secs ( 0.13 usr 0.17 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for alter_table_add (992): 1433 wallclock secs ( 0.45 usr 0.34 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for alter_table_add (992): 1225 wallclock secs ( 0.47 usr 0.25 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for create_index (8): 27 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for create_index (8): 25 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for drop_index (8): 25 wallclock secs ( 0.00 usr 0.02 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for drop_index (8): 25 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for alter_table_drop (496): 1177 wallclock secs ( 0.17 usr 0.14 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for alter_table_drop (496): 1039 wallclock secs ( 0.19 usr 0.11 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Total time: 2663 wallclock secs ( 0.73 usr 0.64 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Total time: 2315 wallclock secs ( 0.78 usr 0.53 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
diff --git a/sql-bench/Results/big-tables-mysql-NT_4.0 b/sql-bench/Results/big-tables-mysql-NT_4.0
index 75f88d4958c..8654e5711dd 100644
--- a/sql-bench/Results/big-tables-mysql-NT_4.0
+++ b/sql-bench/Results/big-tables-mysql-NT_4.0
@@ -1,19 +1,19 @@
-Testing server 'MySQL 3.23.26 gamma' at 2000-10-13 14:01:53
+Testing server 'MySQL 3.23.31' at 2001-01-18 0:39:12
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): 20 wallclock secs ( 8.03 usr 9.38 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time to select_many_fields(1000): 20 wallclock secs ( 8.56 usr 9.42 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): 36 wallclock secs ( 9.00 usr 8.97 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time to select_many_fields(1000): 35 wallclock secs ( 9.09 usr 9.48 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing insert VALUES()
-Time to insert_many_fields(1000): 3 wallclock secs ( 0.39 usr 0.13 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time to insert_many_fields(1000): 4 wallclock secs ( 0.47 usr 0.14 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing insert (all_fields) VALUES()
-Time to insert_many_fields(1000): 19 wallclock secs ( 0.16 usr 0.22 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time to insert_many_fields(1000): 18 wallclock secs ( 0.17 usr 0.25 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Total time: 80 wallclock secs (17.59 usr 18.69 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Total time: 80 wallclock secs (18.31 usr 19.30 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
diff --git a/sql-bench/Results/connect-mysql-NT_4.0 b/sql-bench/Results/connect-mysql-NT_4.0
index b98cc6603f1..cf366c0f547 100644
--- a/sql-bench/Results/connect-mysql-NT_4.0
+++ b/sql-bench/Results/connect-mysql-NT_4.0
@@ -1,30 +1,30 @@
-Testing server 'MySQL 3.23.26 gamma' at 2000-10-13 14:03:13
+Testing server 'MySQL 3.23.31' at 2001-01-18 0:40:33
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): 33 wallclock secs (11.66 usr 10.31 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time to connect (10000): 33 wallclock secs (11.47 usr 9.97 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Test connect/simple select/disconnect
-Time for connect+select_simple (10000): 38 wallclock secs (12.14 usr 12.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for connect+select_simple (10000): 36 wallclock secs (12.84 usr 11.23 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Test simple select
-Time for select_simple (10000): 4 wallclock secs ( 1.05 usr 1.67 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for select_simple (10000): 4 wallclock secs ( 0.88 usr 1.61 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): 38 wallclock secs (12.94 usr 12.19 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time to connect+select_1_row (10000): 38 wallclock secs (13.19 usr 12.03 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing select 1 row from table
-Time to select_1_row (10000): 5 wallclock secs ( 0.78 usr 1.78 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time to select_1_row (10000): 5 wallclock secs ( 1.14 usr 1.80 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing select 2 rows from table
-Time to select_2_rows (10000): 6 wallclock secs ( 0.91 usr 2.11 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time to select_2_rows (10000): 6 wallclock secs ( 0.91 usr 2.03 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Test select with aritmetic (+)
-Time for select_column+column (10000): 6 wallclock secs ( 1.00 usr 1.72 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for select_column+column (10000): 6 wallclock secs ( 0.88 usr 1.83 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing retrieval of big records (65000 bytes)
-Time to select_big (10000): 48 wallclock secs (17.38 usr 7.11 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time to select_big (10000): 55 wallclock secs (19.23 usr 8.98 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Total time: 178 wallclock secs (57.88 usr 48.91 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Total time: 183 wallclock secs (60.53 usr 49.50 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
diff --git a/sql-bench/Results/create-mysql-NT_4.0 b/sql-bench/Results/create-mysql-NT_4.0
index 7d75b7a3282..326148f9bbd 100644
--- a/sql-bench/Results/create-mysql-NT_4.0
+++ b/sql-bench/Results/create-mysql-NT_4.0
@@ -1,18 +1,18 @@
-Testing server 'MySQL 3.23.26 gamma' at 2000-10-13 14:06:11
+Testing server 'MySQL 3.23.31' at 2001-01-18 0:43:36
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): 213 wallclock secs ( 2.77 usr 1.67 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for create_MANY_tables (10000): 245 wallclock secs ( 2.73 usr 1.56 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Accessing tables
-Time to select_group_when_MANY_tables (10000): 193 wallclock secs ( 1.28 usr 2.25 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time to select_group_when_MANY_tables (10000): 249 wallclock secs ( 1.39 usr 2.03 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing drop
-Time for drop_table_when_MANY_tables (10000): 159 wallclock secs ( 1.22 usr 1.27 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for drop_table_when_MANY_tables (10000): 187 wallclock secs ( 1.08 usr 1.38 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing create+drop
-Time for create+drop (10000): 124 wallclock secs ( 3.22 usr 2.39 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for create_key+drop (10000): 159 wallclock secs ( 5.92 usr 2.61 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Total time: 848 wallclock secs (14.42 usr 10.19 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for create+drop (10000): 142 wallclock secs ( 3.30 usr 2.89 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for create_key+drop (10000): 172 wallclock secs ( 5.14 usr 2.92 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Total time: 995 wallclock secs (13.64 usr 10.78 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
diff --git a/sql-bench/Results/insert-mysql-NT_4.0 b/sql-bench/Results/insert-mysql-NT_4.0
index 638b021155c..1e5e47b994e 100644
--- a/sql-bench/Results/insert-mysql-NT_4.0
+++ b/sql-bench/Results/insert-mysql-NT_4.0
@@ -1,4 +1,4 @@
-Testing server 'MySQL 3.23.26 gamma' at 2000-10-13 14:20:19
+Testing server 'MySQL 3.23.31' at 2001-01-18 1:00:12
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,72 +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): 221 wallclock secs (30.06 usr 39.92 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for insert (300000): 203 wallclock secs (30.27 usr 42.14 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing insert of duplicates
-Time for insert_duplicates (100000): 59 wallclock secs ( 8.11 usr 13.67 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for insert_duplicates (100000): 59 wallclock secs ( 8.92 usr 14.09 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Retrieving data from the table
-Time for select_big (10:3000000): 89 wallclock secs (63.69 usr 25.58 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for order_by_key (10:3000000): 90 wallclock secs (64.05 usr 25.08 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for order_by (10:3000000): 98 wallclock secs (63.58 usr 25.14 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for select_diff_key (500:1000): 124 wallclock secs ( 0.41 usr 0.09 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for select_range_prefix (5010:42084): 14 wallclock secs ( 4.47 usr 1.89 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for select_range_key2 (5010:42084): 16 wallclock secs ( 4.64 usr 1.77 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for select_key_prefix (200000): 201 wallclock secs (91.41 usr 40.78 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for select_key (200000): 196 wallclock secs (96.84 usr 36.63 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for select_key2 (200000): 203 wallclock secs (92.92 usr 39.80 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for select_big (10:3000000): 90 wallclock secs (63.84 usr 25.47 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for order_by_big_key (10:3000000): 95 wallclock secs (69.14 usr 26.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for order_by_big_key_desc (10:3000000): 96 wallclock secs (68.61 usr 26.58 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for order_by_big_key_prefix (10:3000000): 89 wallclock secs (63.73 usr 25.53 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for order_by_big_key2 (10:3000000): 90 wallclock secs (63.38 usr 26.20 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for order_by_big_key_diff (10:3000000): 100 wallclock secs (65.05 usr 24.69 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for order_by_big (10:3000000): 104 wallclock secs (64.25 usr 25.28 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for order_by_range (500:125750): 9 wallclock secs ( 3.02 usr 1.25 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for order_by_key_prefix (500:125750): 6 wallclock secs ( 3.11 usr 1.09 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for order_by_key2_diff (500:250500): 11 wallclock secs ( 5.53 usr 2.23 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for select_diff_key (500:1000): 122 wallclock secs ( 0.45 usr 0.08 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for select_range_prefix (5010:42084): 15 wallclock secs ( 4.52 usr 1.78 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for select_range_key2 (5010:42084): 16 wallclock secs ( 4.67 usr 1.61 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for select_key_prefix (200000): 199 wallclock secs (93.61 usr 38.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for select_key (200000): 194 wallclock secs (90.98 usr 38.86 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for select_key2 (200000): 202 wallclock secs (92.78 usr 37.67 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Test of compares with simple ranges
-Time for select_range_prefix (20000:43500): 12 wallclock secs ( 5.34 usr 2.47 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for select_range_key2 (20000:43500): 14 wallclock secs ( 5.92 usr 1.95 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for select_group (111): 36 wallclock secs ( 0.08 usr 0.02 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for min_max_on_key (15000): 14 wallclock secs ( 6.45 usr 2.63 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for min_max (60): 18 wallclock secs ( 0.11 usr 0.02 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for count_on_key (100): 36 wallclock secs ( 0.03 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for count (100): 34 wallclock secs ( 0.11 usr 0.03 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for count_distinct_big (20): 96 wallclock secs ( 0.01 usr 0.03 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for select_range_prefix (20000:43500): 13 wallclock secs ( 5.53 usr 2.44 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for select_range_key2 (20000:43500): 13 wallclock secs ( 5.64 usr 2.03 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for select_group (111): 36 wallclock secs ( 0.03 usr 0.06 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for min_max_on_key (15000): 14 wallclock secs ( 6.42 usr 2.50 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for min_max (60): 18 wallclock secs ( 0.05 usr 0.02 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for count_on_key (100): 31 wallclock secs ( 0.06 usr 0.03 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for count (100): 35 wallclock secs ( 0.06 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for count_distinct_big (20): 103 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing update of keys with functions
-Time for update_of_key (50000): 56 wallclock secs ( 4.45 usr 7.47 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for update_of_key_big (501): 33 wallclock secs ( 0.06 usr 0.03 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for update_of_key (50000): 56 wallclock secs ( 4.28 usr 7.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for update_of_key_big (501): 33 wallclock secs ( 0.06 usr 0.08 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing update with key
-Time for update_with_key (300000): 188 wallclock secs (25.03 usr 40.83 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for update_with_key (300000): 188 wallclock secs (27.97 usr 41.06 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for update_with_key_prefix (100000): 59 wallclock secs ( 9.42 usr 12.14 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing update of all rows
-Time for update_big (10): 62 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for update_big (10): 60 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): 40 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for outer_join (10:10): 118 wallclock secs ( 0.01 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for outer_join_found (10:10): 105 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): 56 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): 41 wallclock secs ( 0.03 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for outer_join (10:10): 118 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for outer_join_found (10:10): 106 wallclock secs ( 0.02 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for outer_join_not_found (500:10): 58 wallclock secs ( 0.02 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing INSERT INTO ... SELECT
Time for insert_select_1_key (1): 8 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for insert_select_2_keys (1): 13 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.02 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for insert_select_2_keys (1): 12 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): 7 wallclock secs ( 0.97 usr 1.36 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for delete_all (12): 22 wallclock secs ( 0.00 usr 0.02 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for delete_key (10000): 8 wallclock secs ( 0.88 usr 1.34 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for delete_all (12): 21 wallclock secs ( 0.00 usr 0.02 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): 1447 wallclock secs (13.78 usr 13.42 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for insert_key (100000): 1853 wallclock secs (13.92 usr 13.81 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing update of keys
-Time for update_of_primary_key_many_keys (256): 436 wallclock secs ( 0.01 usr 0.08 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for update_of_primary_key_many_keys (256): 580 wallclock secs ( 0.03 usr 0.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Deleting rows from the table
-Time for delete_big_many_keys (128): 1422 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for delete_big_many_keys (128): 1980 wallclock secs ( 0.03 usr 0.03 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Deleting everything from table
-Time for delete_all_many_keys (1): 1422 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for delete_all_many_keys (1): 1980 wallclock secs ( 0.03 usr 0.03 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Inserting 100000 rows with multiple values
-Time for multiple_value_insert (100000): 9 wallclock secs ( 2.34 usr 0.26 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for multiple_value_insert (100000): 12 wallclock secs ( 2.50 usr 0.19 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: 5599 wallclock secs (584.97 usr 320.95 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Total time: 7164 wallclock secs (872.86 usr 441.45 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
diff --git a/sql-bench/Results/select-mysql-NT_4.0 b/sql-bench/Results/select-mysql-NT_4.0
index 4981e28cee8..a32f7063a25 100644
--- a/sql-bench/Results/select-mysql-NT_4.0
+++ b/sql-bench/Results/select-mysql-NT_4.0
@@ -1,23 +1,23 @@
-Testing server 'MySQL 3.23.26 gamma' at 2000-10-13 15:53:40
+Testing server 'MySQL 3.23.31' at 2001-01-18 2:59:37
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): 7 wallclock secs ( 1.06 usr 1.39 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time to insert (10000): 7 wallclock secs ( 1.30 usr 1.41 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.38 usr 0.19 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for select_range (410:1057904): 189 wallclock secs (26.94 usr 9.30 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for min_max_on_key (70000): 178 wallclock secs (29.56 usr 11.97 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for count_on_key (50000): 371 wallclock secs (20.88 usr 9.02 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for select_big (70:17207): 1 wallclock secs ( 0.41 usr 0.09 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for select_range (410:1057904): 187 wallclock secs (27.39 usr 9.33 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for min_max_on_key (70000): 179 wallclock secs (29.25 usr 12.30 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for count_on_key (50000): 346 wallclock secs (21.52 usr 9.14 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for count_group_on_key_parts (1000:0): 41 wallclock secs ( 2.72 usr 0.84 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for count_group_on_key_parts (1000:100000): 41 wallclock secs ( 2.81 usr 0.92 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing count(distinct) on the table
-Time for count_distinct (1000:2000): 74 wallclock secs ( 0.95 usr 0.28 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for count_distinct_group_on_key (1000:6000): 40 wallclock secs ( 0.63 usr 0.27 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for count_distinct_group_on_key_parts (1000:100000): 149 wallclock secs ( 2.95 usr 1.06 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for count_distinct_group (1000:100000): 149 wallclock secs ( 2.50 usr 1.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Time for count_distinct_big (1000:10000000): 1095 wallclock secs (227.86 usr 86.19 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Total time: 2294 wallclock secs (316.44 usr 121.50 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for count_distinct (2000:2000): 80 wallclock secs ( 0.94 usr 0.31 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for count_distinct_group_on_key (1000:6000): 45 wallclock secs ( 0.67 usr 0.25 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for count_distinct_group_on_key_parts (1000:100000): 150 wallclock secs ( 3.31 usr 0.97 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for count_distinct_group (1000:100000): 150 wallclock secs ( 3.03 usr 1.20 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for count_distinct_big (100:1000000): 111 wallclock secs (23.03 usr 7.88 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Total time: 1297 wallclock secs (113.66 usr 43.80 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
diff --git a/sql-bench/Results/wisconsin-mysql-NT_4.0 b/sql-bench/Results/wisconsin-mysql-NT_4.0
index e36922f1d3d..f4ed2847ff7 100644
--- a/sql-bench/Results/wisconsin-mysql-NT_4.0
+++ b/sql-bench/Results/wisconsin-mysql-NT_4.0
@@ -1,14 +1,14 @@
-Testing server 'MySQL 3.23.26 gamma' at 2000-10-13 16:31:55
+Testing server 'MySQL 3.23.31' at 2001-01-18 3:21:15
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): 19 wallclock secs ( 2.59 usr 4.13 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time to insert (31000): 19 wallclock secs ( 2.50 usr 3.77 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): 9 wallclock secs ( 5.80 usr 1.47 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Time for wisc_benchmark (114): 9 wallclock secs ( 5.44 usr 1.66 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
-Total time: 28 wallclock secs ( 8.39 usr 5.59 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
+Total time: 28 wallclock secs ( 7.94 usr 5.42 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
diff --git a/sql/handler.cc b/sql/handler.cc
index affd9df8f87..3859f496f9a 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -375,8 +375,8 @@ int handler::ha_open(const char *name, int mode, int test_if_locked)
{
int error;
DBUG_ENTER("handler::open");
- DBUG_PRINT("enter",("db_type: %d db_stat: %d mode: %d lock_test: %d",
- table->db_type, table->db_stat, mode, test_if_locked));
+ DBUG_PRINT("enter",("name: %s db_type: %d db_stat: %d mode: %d lock_test: %d",
+ name, table->db_type, table->db_stat, mode, test_if_locked));
if ((error=open(name,mode,test_if_locked)))
{
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index 103d82f36aa..c00a7aabe66 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -930,7 +930,7 @@ String *Item_func_trim::val_str(String *str)
char *ptr=(char*) res->ptr();
char *end=ptr+res->length();
const char *r_ptr=remove_str->ptr();
- while (ptr+remove_length < end && !memcmp(ptr,r_ptr,remove_length))
+ while (ptr+remove_length <= end && !memcmp(ptr,r_ptr,remove_length))
ptr+=remove_length;
#ifdef USE_MB
if (use_mb(default_charset_info) && !binary)
@@ -954,7 +954,7 @@ String *Item_func_trim::val_str(String *str)
else
#endif /* USE_MB */
{
- while (ptr + remove_length < end &&
+ while (ptr + remove_length <= end &&
!memcmp(end-remove_length,r_ptr,remove_length))
end-=remove_length;
}
diff --git a/sql/log.cc b/sql/log.cc
index 45e4c1620b5..5ce9a7a4deb 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -269,7 +269,7 @@ int MYSQL_LOG::find_first_log(LOG_INFO* linfo, const char* log_name)
for(;;)
{
uint length;
- if (!(length=my_b_gets(&io_cache, fname, FN_REFLEN)))
+ if (!(length=my_b_gets(&io_cache, fname, FN_REFLEN-1)))
{
error = !io_cache.error ? LOG_INFO_EOF : LOG_INFO_IO;
goto err;
@@ -608,7 +608,9 @@ bool MYSQL_LOG::write(THD *thd,enum enum_server_command command,
bool MYSQL_LOG::write(Query_log_event* event_info)
{
/* In most cases this is only called if 'is_open()' is true */
- bool error=1;
+ bool error=0;
+ if (!inited) // Can't use mutex if not init
+ return 0;
VOID(pthread_mutex_lock(&LOCK_log));
if (is_open())
{
@@ -622,7 +624,8 @@ bool MYSQL_LOG::write(Query_log_event* event_info)
VOID(pthread_mutex_unlock(&LOCK_log));
return 0;
}
-
+ error=1;
+
if (thd->last_insert_id_used)
{
Intvar_log_event e((uchar)LAST_INSERT_ID_EVENT, thd->last_insert_id);
@@ -665,8 +668,6 @@ err:
if (file == &log_file)
VOID(pthread_cond_broadcast(&COND_binlog_update));
}
- else
- error=0;
VOID(pthread_mutex_unlock(&LOCK_log));
return error;
}
@@ -729,23 +730,26 @@ err:
bool MYSQL_LOG::write(Load_log_event* event_info)
{
bool error=0;
- VOID(pthread_mutex_lock(&LOCK_log));
- if (is_open())
+ if (inited)
{
- THD *thd=event_info->thd;
- if ((thd->options & OPTION_BIN_LOG) ||
- !(thd->master_access & PROCESS_ACL))
+ VOID(pthread_mutex_lock(&LOCK_log));
+ if (is_open())
{
- if (event_info->write(&log_file) || flush_io_cache(&log_file))
+ THD *thd=event_info->thd;
+ if ((thd->options & OPTION_BIN_LOG) ||
+ !(thd->master_access & PROCESS_ACL))
{
- if (!write_error)
- sql_print_error(ER(ER_ERROR_ON_WRITE), name, errno);
- error=write_error=1;
+ if (event_info->write(&log_file) || flush_io_cache(&log_file))
+ {
+ if (!write_error)
+ sql_print_error(ER(ER_ERROR_ON_WRITE), name, errno);
+ error=write_error=1;
+ }
+ VOID(pthread_cond_broadcast(&COND_binlog_update));
}
- VOID(pthread_cond_broadcast(&COND_binlog_update));
}
+ VOID(pthread_mutex_unlock(&LOCK_log));
}
- VOID(pthread_mutex_unlock(&LOCK_log));
return error;
}
diff --git a/sql/log_event.h b/sql/log_event.h
index 5260b71adb7..4dd5e9140f7 100644
--- a/sql/log_event.h
+++ b/sql/log_event.h
@@ -311,7 +311,7 @@ public:
void print(FILE* file, bool short_form = 0);
};
-extern char server_version[50];
+extern char server_version[SERVER_VERSION_LENGTH];
class Start_log_event: public Log_event
{
@@ -333,6 +333,7 @@ public:
return;
binlog_version = uint2korr(buf+4);
memcpy(server_version, buf + 6, sizeof(server_version));
+ server_version[sizeof(server_version)-1]=0;
created = uint4korr(buf + 6 + sizeof(server_version));
}
Start_log_event(const char* buf);
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index 11e847d9b2b..6b4cfbed59d 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -275,6 +275,7 @@ char *net_store_length(char *packet,uint length);
char *net_store_data(char *to,const char *from);
char *net_store_data(char *to,int32 from);
char *net_store_data(char *to,longlong from);
+
bool net_store_null(String *packet);
bool net_store_data(String *packet,uint32 from);
bool net_store_data(String *packet,longlong from);
@@ -282,6 +283,9 @@ bool net_store_data(String *packet,const char *from);
bool net_store_data(String *packet,const char *from,uint length);
bool net_store_data(String *packet,struct tm *tmp);
bool net_store_data(String* packet, I_List<i_string>* str_list);
+bool net_store_data(String *packet,CONVERT *convert, const char *from,
+ uint length);
+bool net_store_data(String *packet, CONVERT *convert, const char *from);
SORT_FIELD * make_unireg_sortorder(ORDER *order, uint *length);
int setup_order(THD *thd,TABLE_LIST *tables, List<Item> &fields,
@@ -464,8 +468,8 @@ void sql_print_error(const char *format,...)
__attribute__ ((format (printf, 1, 2)));
extern uint32 server_id;
-extern char mysql_data_home[2],server_version[50],max_sort_char,
- mysql_real_data_home[];
+extern char mysql_data_home[2],server_version[SERVER_VERSION_LENGTH],
+ max_sort_char, mysql_real_data_home[];
extern my_string mysql_unix_port,mysql_tmpdir;
extern const char *first_keyword, *localhost;
extern ulong refresh_version,flush_version, thread_id,query_id,opened_tables,
diff --git a/sql/mysqlbinlog.cc b/sql/mysqlbinlog.cc
index 497364ca8a4..b09decf1c86 100644
--- a/sql/mysqlbinlog.cc
+++ b/sql/mysqlbinlog.cc
@@ -22,14 +22,14 @@
#include <my_sys.h>
#include <getopt.h>
#include <thr_alarm.h>
-#include "log_event.h"
#define MYSQL_SERVER // We want the C++ version of net
#include <mysql.h>
+#include "log_event.h"
#include "mini_client.h"
#define CLIENT_CAPABILITIES (CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG | CLIENT_LOCAL_FILES)
-char server_version[50];
+char server_version[SERVER_VERSION_LENGTH];
uint32 server_id = 0;
// needed by net_serv.c
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index d2d18f09696..62ee256b9da 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -275,7 +275,7 @@ char mysql_real_data_home[FN_REFLEN],
blob_newline,f_fyllchar,max_sort_char,*mysqld_user,*mysqld_chroot,
*opt_init_file;
char *opt_bin_logname = 0; // this one needs to be seen in sql_parse.cc
-char server_version[50]=MYSQL_SERVER_VERSION;
+char server_version[SERVER_VERSION_LENGTH]=MYSQL_SERVER_VERSION;
const char *first_keyword="first";
const char **errmesg; /* Error messages */
const char *myisam_recover_options_str="OFF";
@@ -1428,7 +1428,10 @@ static void open_log(MYSQL_LOG *log, const char *hostname,
char tmp[FN_REFLEN];
if (!opt_name || !opt_name[0])
{
- strnmov(tmp,hostname,FN_REFLEN-5);
+ /* TODO: The following should be using fn_format(); We just need to
+ first change fn_format() to cut the file name if it's too long.
+ */
+ strmake(tmp,hostname,FN_REFLEN-5);
strmov(strcend(tmp,'.'),extension);
opt_name=tmp;
}
@@ -1471,15 +1474,10 @@ int main(int argc, char **argv)
strmov(glob_hostname,"mysql");
strmov(pidfile_name,glob_hostname);
strmov(strcend(pidfile_name,'.'),".pid"); // Add extension
- strcat(server_version, MYSQL_SERVER_SUFFIX);
-#ifdef DEMO_VERSION
- strcat(server_version,"-demo");
-#endif
-#ifdef SHAREWARE_VERSION
- strcat(server_version,"-shareware");
-#endif
#ifndef DBUG_OFF
- strcat(server_version,"-debug");
+ strxmov(strend(server_version),MYSQL_SERVER_SUFFIX,"-debug",NullS);
+#else
+ strmov(strend(server_version),MYSQL_SERVER_SUFFIX);
#endif
#ifdef _CUSTOMSTARTUPCONFIG_
if (_cust_check_startup())
@@ -1655,7 +1653,10 @@ The server will not act as a slave.");
if (!opt_bin_logname)
{
char tmp[FN_REFLEN];
- strnmov(tmp,glob_hostname,FN_REFLEN-5);
+ /* TODO: The following should be using fn_format(); We just need to
+ first change fn_format() to cut the file name if it's too long.
+ */
+ strmake(tmp,glob_hostname,FN_REFLEN-5);
strmov(strcend(tmp,'.'),"-bin");
opt_bin_logname=my_strdup(tmp,MYF(MY_WME));
}
diff --git a/sql/net_pkg.cc b/sql/net_pkg.cc
index 590168930fd..caee12dc6f2 100644
--- a/sql/net_pkg.cc
+++ b/sql/net_pkg.cc
@@ -339,3 +339,24 @@ bool net_store_data(String* packet, I_List<i_string>* str_list)
return net_store_data(packet, (char*)tmp.ptr(), tmp.length());
}
+
+/*
+** translate and store data; These are mainly used by the SHOW functions
+*/
+
+bool
+net_store_data(String *packet,CONVERT *convert, const char *from,uint length)
+{
+ if (convert)
+ return convert->store(packet, from, length);
+ return net_store_date(packet,from,length);
+}
+
+bool
+net_store_data(String *packet, CONVERT *convert, const char *from)
+{
+ uint length=(uint) strlen(from);
+ if (convert)
+ return convert->store(packet, from, length);
+ return net_store_date(packet,from,length);
+}