Commit ab7afc8c authored by unknown's avatar unknown

Changes for --with-server-suffix

Fixed mutex bug in logging (crash on windows when doing SET PASSWORD=)
Changed MERGE  tables to not use FILE


BitKeeper/deleted/.del-m.MRG~3f5632c37af00f18:
  Delete: mysql-test/std_data/m.MRG
BitKeeper/deleted/.del-m.frm~e351dfe0b6824c0c:
  Delete: mysql-test/std_data/m.frm
Docs/manual.texi:
  Added DNS section
configure.in:
  Update to 3.23.32
include/Makefile.am:
  Added my_config.h
include/mysql_com.h:
  Changes for --with-server-suffix
include/mysql_version.h.in:
  cleanup
merge/open.c:
  Don't use FILE
mysql-test/Makefile.am:
  removed not needed data files
mysql-test/r/merge.result:
  generate merge file
mysql-test/t/merge.test:
  generate merge file
sql-bench/Results/ATIS-mysql-NT_4.0:
  New benchmark results
sql-bench/Results/RUN-mysql-NT_4.0:
  New benchmark results
sql-bench/Results/alter-table-mysql-NT_4.0:
  New benchmark results
sql-bench/Results/big-tables-mysql-NT_4.0:
  New benchmark results
sql-bench/Results/connect-mysql-NT_4.0:
  New benchmark results
sql-bench/Results/create-mysql-NT_4.0:
  New benchmark results
sql-bench/Results/insert-mysql-NT_4.0:
  New benchmark results
sql-bench/Results/select-mysql-NT_4.0:
  New benchmark results
sql-bench/Results/wisconsin-mysql-NT_4.0:
  New benchmark results
sql/log.cc:
  Ensure that mutex are initialized before used
sql/log_event.h:
  Changes for --with-server-suffix
sql/mysql_priv.h:
  Changes for --with-server-suffix
sql/mysqlbinlog.cc:
  Changes for --with-server-suffix
sql/mysqld.cc:
  changed strnmov -> strmake
sql/net_pkg.cc:
  Prepare for adding char-set conversion to SHOW commands
parent 9223381f
......@@ -566,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
......@@ -592,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
......@@ -855,7 +857,7 @@ Changes in release 4.0.x (Development; Alpha)
Changes in release 3.23.x (Stable)
* News-3.23.32::
* 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
......@@ -9520,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.
......@@ -9537,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
......@@ -12830,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
......@@ -25691,7 +25692,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
......@@ -26252,7 +26253,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}
......@@ -26506,7 +26507,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
......@@ -26728,6 +26729,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
......@@ -27338,7 +27340,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.
......@@ -27389,6 +27391,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:
......@@ -27436,6 +27442,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
......@@ -40667,6 +40706,10 @@ not yet 100 % confident in this code.
@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.
......@@ -45267,6 +45310,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
......@@ -45313,6 +45357,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.
......@@ -45560,6 +45607,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
......@@ -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.31)
AM_INIT_AUTOMAKE(mysql, 3.23.32)
AM_CONFIG_HEADER(config.h)
PROTOCOL_VERSION=10
......
......@@ -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
......
......@@ -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 "."
......
/* 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@"
......
......@@ -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 @@ int handle_locking;
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;
......
......@@ -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) \
......
......@@ -106,4 +106,4 @@ incr othr
2 24
4 33
3 53
c
a
This diff was suppressed by a .gitattributes entry.
......@@ -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;
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)
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
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)
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)
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)
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)
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)
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)
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)
......@@ -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 @@ bool MYSQL_LOG::write(Query_log_event* event_info)
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 @@ bool MYSQL_LOG::write(IO_CACHE *cache)
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;
}
......
......@@ -311,7 +311,7 @@ class Load_log_event: public Log_event
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 @@ class Start_log_event: public Log_event
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);
......
......@@ -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,
......
......@@ -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
......
......@@ -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[60]=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;
}
......@@ -1650,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));
}
......
......@@ -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);
}
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