Commit b4c35885 authored by monty@hundin.mysql.fi's avatar monty@hundin.mysql.fi

Fixes for gcc 3.1

Fixed bug in new code for regexp LIKE NULL
parent 3de11a9a
...@@ -34,10 +34,10 @@ AM_MAKEFLAGS="-j 4" ...@@ -34,10 +34,10 @@ AM_MAKEFLAGS="-j 4"
# The following warning flag will give too many warnings: # The following warning flag will give too many warnings:
# -Wshadow -Wunused -Winline (The later isn't usable in C++ as # -Wshadow -Wunused -Winline (The later isn't usable in C++ as
# __attribute()__ doesn't work with gnu C++) # __attribute()__ doesn't work with gnu C++)
global_warnings="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings" global_warnings="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings"
#debug_extra_warnings="-Wuninitialized" #debug_extra_warnings="-Wuninitialized"
c_warnings="$global_warnings -Wunused" c_warnings="$global_warnings -Wunused"
cxx_warnings="$global_warnings -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor" cxx_warnings="$global_warnings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor"
alpha_cflags="-mcpu=ev6 -Wa,-mev6" # Not used yet alpha_cflags="-mcpu=ev6 -Wa,-mev6" # Not used yet
pentium_cflags="-mcpu=pentiumpro" pentium_cflags="-mcpu=pentiumpro"
......
...@@ -11,6 +11,6 @@ then ...@@ -11,6 +11,6 @@ then
(cd gemini && aclocal && autoheader && aclocal && automake && autoconf) (cd gemini && aclocal && autoheader && aclocal && automake && autoconf)
fi fi
CFLAGS="-g -Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa" CXX=gcc CXXFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa -g" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa" CXX=gcc CXXFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa -g" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client
gmake -j 4 gmake -j 4
...@@ -11,6 +11,6 @@ then ...@@ -11,6 +11,6 @@ then
(cd gemini && aclocal && autoheader && aclocal && automake && autoconf) (cd gemini && aclocal && autoheader && aclocal && automake && autoconf)
fi fi
CFLAGS="-g -Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa" CXX=gcc CXXFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa -g" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-debug CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa" CXX=gcc CXXFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa -g" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-debug
gmake -j 4 gmake -j 4
...@@ -6,7 +6,7 @@ aclocal && autoheader && aclocal && automake && autoconf ...@@ -6,7 +6,7 @@ aclocal && autoheader && aclocal && automake && autoconf
(cd bdb/dist && sh s_all) (cd bdb/dist && sh s_all)
(cd innobase && aclocal && autoheader && aclocal && automake && autoconf) (cd innobase && aclocal && autoheader && aclocal && automake && autoconf)
CFLAGS="-g -Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -DHAVE_purify -DEXTRA_DEBUG -O2" CXX=gcc CXXLD=g++ CXXFLAGS="-g -Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -DHAVE_purify -DEXTRA_DEBUG -O2" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-berkeley-db --with-innodb CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -DHAVE_purify -DEXTRA_DEBUG -O2" CXX=gcc CXXLD=g++ CXXFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -DHAVE_purify -DEXTRA_DEBUG -O2" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-berkeley-db --with-innodb
gmake -j 4 gmake -j 4
......
...@@ -26725,7 +26725,7 @@ constant. ...@@ -26725,7 +26725,7 @@ constant.
MySQL 4.0 does another optimization on @code{LIKE}. If you are using MySQL 4.0 does another optimization on @code{LIKE}. If you are using
@code{... LIKE "%string%"} and @code{string} is longer than 3 characters @code{... LIKE "%string%"} and @code{string} is longer than 3 characters
then MySQL will use the turbo-boyer-more algorithm to once initialize then MySQL will use the turbo-boyer-moore algorithm to once initialize
the pattern for the string and then use this pattern to quickly search the pattern for the string and then use this pattern to quickly search
after the given string. after the given string.
...@@ -49311,7 +49311,7 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}. ...@@ -49311,7 +49311,7 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}.
@itemize @bullet @itemize @bullet
@item @item
Use turbo-boyer-more to speed up @code{LIKE "%keyword%"} searches. Use turbo-boyer-moore to speed up @code{LIKE "%keyword%"} searches.
@item @item
Fixed bug in @code{DROP DATABASE} with symlink. Fixed bug in @code{DROP DATABASE} with symlink.
@item @item
...@@ -153,27 +153,27 @@ my_bool vio_ssl_peer_addr(Vio* vio, char *buf); ...@@ -153,27 +153,27 @@ my_bool vio_ssl_peer_addr(Vio* vio, char *buf);
void vio_ssl_in_addr(Vio *vio, struct in_addr *in); void vio_ssl_in_addr(Vio *vio, struct in_addr *in);
/* Single copy for server */ /* Single copy for server */
enum vio_ssl_acceptorfd_state
{
state_connect = 1,
state_accept = 2
};
struct st_VioSSLAcceptorFd struct st_VioSSLAcceptorFd
{ {
SSL_CTX* ssl_context_; SSL_CTX* ssl_context_;
SSL_METHOD* ssl_method_; SSL_METHOD* ssl_method_;
struct st_VioSSLAcceptorFd* session_id_context_; struct st_VioSSLAcceptorFd* session_id_context_;
enum {
state_connect = 1,
state_accept = 2
};
/* function pointers which are only once for SSL server
Vio*(*sslaccept)(struct st_VioSSLAcceptorFd*,Vio*); */
}; };
/* One copy for client */ /* One copy for client */
struct st_VioSSLConnectorFd struct st_VioSSLConnectorFd
{ {
SSL_CTX* ssl_context_; SSL_CTX* ssl_context_;
SSL_METHOD* ssl_method_;
/* function pointers which are only once for SSL client */ /* function pointers which are only once for SSL client */
SSL_METHOD* ssl_method_;
}; };
void sslaccept(struct st_VioSSLAcceptorFd*, Vio*, long timeout); void sslaccept(struct st_VioSSLAcceptorFd*, Vio*, long timeout);
void sslconnect(struct st_VioSSLConnectorFd*, Vio*, long timeout); void sslconnect(struct st_VioSSLConnectorFd*, Vio*, long timeout);
......
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( number INT NOT NULL, alpha CHAR(6) NOT NULL );
INSERT INTO t1 VALUES (1413006,'idlfmv'),
(1413065,'smpsfz'),(1413127,'sljrhx'),(1413304,'qerfnd');
SELECT number, alpha, CONCAT_WS('<---->',number,alpha) AS new
FROM t1 GROUP BY number;
number alpha new number alpha new
1413006 idlfmv 1413006<---->idlfmv 1413006 idlfmv 1413006<---->idlfmv
1413065 smpsfz 1413065<---->smpsfz 1413065 smpsfz 1413065<---->smpsfz
1413127 sljrhx 1413127<---->sljrhx 1413127 sljrhx 1413127<---->sljrhx
1413304 qerfnd 1413304<---->qerfnd 1413304 qerfnd 1413304<---->qerfnd
SELECT CONCAT_WS('<---->',number,alpha) AS new
FROM t1 GROUP BY new LIMIT 1;
new new
1413006<---->idlfmv 1413006<---->idlfmv
SELECT number, alpha, CONCAT_WS('<->',number,alpha) AS new
FROM t1 GROUP BY new LIMIT 1;
number alpha new number alpha new
1413006 idlfmv 1413006<->idlfmv 1413006 idlfmv 1413006<->idlfmv
SELECT number, alpha, CONCAT_WS('-',number,alpha,alpha,alpha,alpha,alpha,alpha,alpha) AS new
FROM t1 GROUP BY new LIMIT 1;
number alpha new number alpha new
1413006 idlfmv 1413006-idlfmv-idlfmv-idlfmv-idlfmv-idlfmv-idlfmv-idlfmv 1413006 idlfmv 1413006-idlfmv-idlfmv-idlfmv-idlfmv-idlfmv-idlfmv-idlfmv
SELECT number, alpha, CONCAT_WS('<------------------>',number,alpha) AS new
FROM t1 GROUP BY new LIMIT 1;
number alpha new number alpha new
1413006 idlfmv 1413006<------------------>idlfmv 1413006 idlfmv 1413006<------------------>idlfmv
drop table t1;
Testing server 'MySQL 4.0.2 alpha' at 2002-05-20 15:34:53
ATIS table test
Creating tables
Time for create_table (28): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Inserting data
Time to insert (9768): 2 wallclock secs ( 0.44 usr 0.21 sys + 0.00 cusr 0.00 csys = 0.65 CPU)
Retrieving data
Time for select_simple_join (500): 2 wallclock secs ( 0.60 usr 0.19 sys + 0.00 cusr 0.00 csys = 0.79 CPU)
Time for select_join (100): 1 wallclock secs ( 0.46 usr 0.14 sys + 0.00 cusr 0.00 csys = 0.60 CPU)
Time for select_key_prefix_join (100): 10 wallclock secs ( 3.98 usr 1.52 sys + 0.00 cusr 0.00 csys = 5.50 CPU)
Time for select_distinct (800): 9 wallclock secs ( 1.59 usr 0.55 sys + 0.00 cusr 0.00 csys = 2.14 CPU)
Time for select_group (2800): 9 wallclock secs ( 1.34 usr 0.28 sys + 0.00 cusr 0.00 csys = 1.62 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: 33 wallclock secs ( 8.41 usr 2.89 sys + 0.00 cusr 0.00 csys = 11.30 CPU)
Benchmark DBD suite: 2.14
Date of test: 2002-05-20 17:48:45
Running tests on: Linux 2.4.16-64GB-SMP i686
Arguments:
Comments: Intel Xeon 2M cache, 4x700 Mhz, 2G, key_buffer=16M, gcc 3.1
Limits from:
Server version: MySQL 4.0.2 alpha
Optimization: None
Hardware:
alter-table: Total time: 241 wallclock secs ( 0.17 usr 0.07 sys + 0.00 cusr 0.00 csys = 0.24 CPU)
ATIS: Total time: 33 wallclock secs ( 8.41 usr 2.89 sys + 0.00 cusr 0.00 csys = 11.30 CPU)
big-tables: Total time: 27 wallclock secs ( 9.38 usr 5.17 sys + 0.00 cusr 0.00 csys = 14.55 CPU)
connect: Total time: 156 wallclock secs (71.06 usr 31.02 sys + 0.00 cusr 0.00 csys = 102.08 CPU)
create: Total time: 90 wallclock secs ( 5.77 usr 1.91 sys + 0.00 cusr 0.00 csys = 7.68 CPU)
insert: Total time: 1730 wallclock secs (523.67 usr 128.19 sys + 0.00 cusr 0.00 csys = 651.86 CPU)
select: Total time: 1106 wallclock secs (52.54 usr 11.75 sys + 0.00 cusr 0.00 csys = 64.29 CPU)
transactions: Test skipped because the database doesn't support transactions
wisconsin: Total time: 12 wallclock secs ( 3.07 usr 1.20 sys + 0.00 cusr 0.00 csys = 4.27 CPU)
All 9 test executed successfully
Totals per operation:
Operation seconds usr sys cpu tests
alter_table_add 134.00 0.12 0.03 0.15 992
alter_table_drop 102.00 0.04 0.02 0.06 496
connect 7.00 4.50 1.62 6.12 10000
connect+select_1_row 10.00 5.09 2.31 7.40 10000
connect+select_simple 9.00 5.19 2.02 7.21 10000
count 33.00 0.04 0.00 0.04 100
count_distinct 34.00 0.24 0.05 0.29 1000
count_distinct_2 38.00 0.25 0.07 0.32 1000
count_distinct_big 50.00 7.15 2.75 9.90 120
count_distinct_group 47.00 1.00 0.27 1.27 1000
count_distinct_group_on_key 43.00 0.26 0.05 0.31 1000
count_distinct_group_on_key_parts 47.00 0.98 0.29 1.27 1000
count_distinct_key_prefix 28.00 0.29 0.03 0.32 1000
count_group_on_key_parts 43.00 0.96 0.31 1.27 1000
count_on_key 416.00 11.73 1.70 13.43 50100
create+drop 17.00 1.49 0.50 1.99 10000
create_MANY_tables 25.00 1.12 0.28 1.40 10000
create_index 3.00 0.00 0.00 0.00 8
create_key+drop 23.00 1.84 0.62 2.46 10000
create_table 0.00 0.00 0.00 0.00 31
delete_all_many_keys 51.00 0.02 0.00 0.02 1
delete_big 0.00 0.00 0.00 0.00 1
delete_big_many_keys 51.00 0.02 0.00 0.02 128
delete_key 2.00 0.39 0.26 0.65 10000
delete_range 11.00 0.01 0.00 0.01 12
drop_index 2.00 0.00 0.00 0.00 8
drop_table 0.00 0.00 0.00 0.00 28
drop_table_when_MANY_tables 11.00 0.34 0.17 0.51 10000
insert 78.00 14.11 7.05 21.16 350768
insert_duplicates 16.00 2.42 2.15 4.57 100000
insert_key 86.00 7.22 2.27 9.49 100000
insert_many_fields 7.00 0.19 0.07 0.26 2000
insert_select_1_key 5.00 0.00 0.00 0.00 1
insert_select_2_keys 6.00 0.00 0.00 0.00 1
min_max 23.00 0.02 0.00 0.02 60
min_max_on_key 159.00 19.21 2.78 21.99 85000
multiple_value_insert 5.00 1.29 0.00 1.29 100000
order_by_big 40.00 21.73 8.15 29.88 10
order_by_big_key 33.00 23.12 7.93 31.05 10
order_by_big_key2 31.00 21.98 7.84 29.82 10
order_by_big_key_desc 32.00 23.13 8.16 31.29 10
order_by_big_key_diff 39.00 22.07 7.71 29.78 10
order_by_big_key_prefix 31.00 21.76 8.21 29.97 10
order_by_key2_diff 4.00 2.00 0.58 2.58 500
order_by_key_prefix 3.00 0.98 0.34 1.32 500
order_by_range 3.00 0.81 0.41 1.22 500
outer_join 48.00 0.01 0.00 0.01 10
outer_join_found 46.00 0.01 0.00 0.01 10
outer_join_not_found 31.00 0.00 0.00 0.00 500
outer_join_on_key 40.00 0.00 0.00 0.00 10
select_1_row 22.00 9.63 4.42 14.05 100000
select_1_row_cache 19.00 6.75 3.55 10.30 100000
select_2_rows 24.00 9.99 4.11 14.10 100000
select_big 31.00 21.97 8.10 30.07 80
select_big_str 13.00 5.10 3.32 8.42 10000
select_cache 88.00 2.21 0.38 2.59 10000
select_cache2 89.00 2.49 0.39 2.88 10000
select_column+column 23.00 8.62 3.65 12.27 100000
select_diff_key 138.00 0.12 0.02 0.14 500
select_distinct 9.00 1.59 0.55 2.14 800
select_group 51.00 1.40 0.29 1.69 2911
select_group_when_MANY_tables 14.00 0.98 0.34 1.32 10000
select_join 1.00 0.46 0.14 0.60 100
select_key 82.00 51.17 8.13 59.30 200000
select_key2 86.00 50.00 7.89 57.89 200000
select_key2_return_key 81.00 48.57 6.51 55.08 200000
select_key2_return_prim 83.00 49.27 7.43 56.70 200000
select_key_prefix 87.00 51.79 8.42 60.21 200000
select_key_prefix_join 10.00 3.98 1.52 5.50 100
select_key_return_key 79.00 48.93 7.01 55.94 200000
select_many_fields 19.00 9.18 5.10 14.28 2000
select_range 103.00 8.73 2.95 11.68 410
select_range_key2 12.00 4.65 0.92 5.57 25010
select_range_prefix 13.00 5.01 0.99 6.00 25010
select_simple 15.00 8.15 2.84 10.99 100000
select_simple_cache 14.00 8.03 3.18 11.21 100000
select_simple_join 2.00 0.60 0.19 0.79 500
update_big 44.00 0.00 0.00 0.00 10
update_of_key 14.00 1.80 0.94 2.74 50000
update_of_key_big 20.00 0.01 0.01 0.02 501
update_of_primary_key_many_keys 25.00 0.01 0.00 0.01 256
update_with_key 60.00 9.66 6.21 15.87 300000
update_with_key_prefix 21.00 6.04 1.98 8.02 100000
wisc_benchmark 4.00 2.17 0.52 2.69 114
TOTALS 3399.00 664.19 179.00 843.19 3227247
Testing server 'MySQL 4.0.2 alpha' at 2002-05-20 15:30:52
Testing of ALTER TABLE
Testing with 1000 columns and 1000 rows in 20 steps
Insert data into the table
Time for insert (1000) 0 wallclock secs ( 0.01 usr 0.02 sys + 0.00 cusr 0.00 csys = 0.03 CPU)
Time for alter_table_add (992): 134 wallclock secs ( 0.12 usr 0.03 sys + 0.00 cusr 0.00 csys = 0.15 CPU)
Time for create_index (8): 3 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for drop_index (8): 2 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for alter_table_drop (496): 102 wallclock secs ( 0.04 usr 0.02 sys + 0.00 cusr 0.00 csys = 0.06 CPU)
Total time: 241 wallclock secs ( 0.17 usr 0.07 sys + 0.00 cusr 0.00 csys = 0.24 CPU)
Testing server 'MySQL 4.0.2 alpha' at 2002-05-20 15:35:26
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): 8 wallclock secs ( 4.72 usr 2.37 sys + 0.00 cusr 0.00 csys = 7.09 CPU)
Testing select all_fields from table with 1 record
Time to select_many_fields(1000): 11 wallclock secs ( 4.46 usr 2.73 sys + 0.00 cusr 0.00 csys = 7.19 CPU)
Testing insert VALUES()
Time to insert_many_fields(1000): 2 wallclock secs ( 0.15 usr 0.05 sys + 0.00 cusr 0.00 csys = 0.20 CPU)
Testing insert (all_fields) VALUES()
Time to insert_many_fields(1000): 5 wallclock secs ( 0.04 usr 0.02 sys + 0.00 cusr 0.00 csys = 0.06 CPU)
Total time: 27 wallclock secs ( 9.38 usr 5.17 sys + 0.00 cusr 0.00 csys = 14.55 CPU)
Testing server 'MySQL 4.0.2 alpha' at 2002-05-20 15:35:53
Testing the speed of connecting to the server and sending of data
Connect tests are done 10000 times and other tests 100000 times
Testing connection/disconnect
Time to connect (10000): 7 wallclock secs ( 4.50 usr 1.62 sys + 0.00 cusr 0.00 csys = 6.12 CPU)
Test connect/simple select/disconnect
Time for connect+select_simple (10000): 9 wallclock secs ( 5.19 usr 2.02 sys + 0.00 cusr 0.00 csys = 7.21 CPU)
Test simple select
Time for select_simple (100000): 15 wallclock secs ( 8.15 usr 2.84 sys + 0.00 cusr 0.00 csys = 10.99 CPU)
Test simple select
Time for select_simple_cache (100000): 14 wallclock secs ( 8.03 usr 3.18 sys + 0.00 cusr 0.00 csys = 11.21 CPU)
Testing connect/select 1 row from table/disconnect
Time to connect+select_1_row (10000): 10 wallclock secs ( 5.09 usr 2.31 sys + 0.00 cusr 0.00 csys = 7.40 CPU)
Testing select 1 row from table
Time to select_1_row (100000): 22 wallclock secs ( 9.63 usr 4.42 sys + 0.00 cusr 0.00 csys = 14.05 CPU)
Time to select_1_row_cache (100000): 19 wallclock secs ( 6.75 usr 3.55 sys + 0.00 cusr 0.00 csys = 10.30 CPU)
Testing select 2 rows from table
Time to select_2_rows (100000): 24 wallclock secs ( 9.99 usr 4.11 sys + 0.00 cusr 0.00 csys = 14.10 CPU)
Test select with aritmetic (+)
Time for select_column+column (100000): 23 wallclock secs ( 8.62 usr 3.65 sys + 0.00 cusr 0.00 csys = 12.27 CPU)
Testing retrieval of big records (65000 bytes)
Time to select_big_str (10000): 13 wallclock secs ( 5.10 usr 3.32 sys + 0.00 cusr 0.00 csys = 8.42 CPU)
Total time: 156 wallclock secs (71.06 usr 31.02 sys + 0.00 cusr 0.00 csys = 102.08 CPU)
Testing server 'MySQL 4.0.2 alpha' at 2002-05-20 15:38:29
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): 25 wallclock secs ( 1.12 usr 0.28 sys + 0.00 cusr 0.00 csys = 1.40 CPU)
Accessing tables
Time to select_group_when_MANY_tables (10000): 14 wallclock secs ( 0.98 usr 0.34 sys + 0.00 cusr 0.00 csys = 1.32 CPU)
Testing drop
Time for drop_table_when_MANY_tables (10000): 11 wallclock secs ( 0.34 usr 0.17 sys + 0.00 cusr 0.00 csys = 0.51 CPU)
Testing create+drop
Time for create+drop (10000): 17 wallclock secs ( 1.49 usr 0.50 sys + 0.00 cusr 0.00 csys = 1.99 CPU)
Time for create_key+drop (10000): 23 wallclock secs ( 1.84 usr 0.62 sys + 0.00 cusr 0.00 csys = 2.46 CPU)
Total time: 90 wallclock secs ( 5.77 usr 1.91 sys + 0.00 cusr 0.00 csys = 7.68 CPU)
Testing server 'MySQL 4.0.2 alpha' at 2002-05-20 15:39:59
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.
Generating random keys
Creating tables
Inserting 100000 rows in order
Inserting 100000 rows in reverse order
Inserting 100000 rows in random order
Time for insert (300000): 65 wallclock secs (12.32 usr 5.91 sys + 0.00 cusr 0.00 csys = 18.23 CPU)
Testing insert of duplicates
Time for insert_duplicates (100000): 16 wallclock secs ( 2.42 usr 2.15 sys + 0.00 cusr 0.00 csys = 4.57 CPU)
Retrieving data from the table
Time for select_big (10:3000000): 31 wallclock secs (21.84 usr 8.07 sys + 0.00 cusr 0.00 csys = 29.91 CPU)
Time for order_by_big_key (10:3000000): 33 wallclock secs (23.12 usr 7.93 sys + 0.00 cusr 0.00 csys = 31.05 CPU)
Time for order_by_big_key_desc (10:3000000): 32 wallclock secs (23.13 usr 8.16 sys + 0.00 cusr 0.00 csys = 31.29 CPU)
Time for order_by_big_key_prefix (10:3000000): 31 wallclock secs (21.76 usr 8.21 sys + 0.00 cusr 0.00 csys = 29.97 CPU)
Time for order_by_big_key2 (10:3000000): 31 wallclock secs (21.98 usr 7.84 sys + 0.00 cusr 0.00 csys = 29.82 CPU)
Time for order_by_big_key_diff (10:3000000): 39 wallclock secs (22.07 usr 7.71 sys + 0.00 cusr 0.00 csys = 29.78 CPU)
Time for order_by_big (10:3000000): 40 wallclock secs (21.73 usr 8.15 sys + 0.00 cusr 0.00 csys = 29.88 CPU)
Time for order_by_range (500:125750): 3 wallclock secs ( 0.81 usr 0.41 sys + 0.00 cusr 0.00 csys = 1.22 CPU)
Time for order_by_key_prefix (500:125750): 3 wallclock secs ( 0.98 usr 0.34 sys + 0.00 cusr 0.00 csys = 1.32 CPU)
Time for order_by_key2_diff (500:250500): 4 wallclock secs ( 2.00 usr 0.58 sys + 0.00 cusr 0.00 csys = 2.58 CPU)
Time for select_diff_key (500:1000): 138 wallclock secs ( 0.12 usr 0.02 sys + 0.00 cusr 0.00 csys = 0.14 CPU)
Time for select_range_prefix (5010:42084): 7 wallclock secs ( 2.28 usr 0.46 sys + 0.00 cusr 0.00 csys = 2.74 CPU)
Time for select_range_key2 (5010:42084): 7 wallclock secs ( 2.16 usr 0.40 sys + 0.00 cusr 0.00 csys = 2.56 CPU)
Time for select_key_prefix (200000): 87 wallclock secs (51.79 usr 8.42 sys + 0.00 cusr 0.00 csys = 60.21 CPU)
Time for select_key (200000): 82 wallclock secs (51.17 usr 8.13 sys + 0.00 cusr 0.00 csys = 59.30 CPU)
Time for select_key_return_key (200000): 79 wallclock secs (48.93 usr 7.01 sys + 0.00 cusr 0.00 csys = 55.94 CPU)
Time for select_key2 (200000): 86 wallclock secs (50.00 usr 7.89 sys + 0.00 cusr 0.00 csys = 57.89 CPU)
Time for select_key2_return_key (200000): 81 wallclock secs (48.57 usr 6.51 sys + 0.00 cusr 0.00 csys = 55.08 CPU)
Time for select_key2_return_prim (200000): 83 wallclock secs (49.27 usr 7.43 sys + 0.00 cusr 0.00 csys = 56.70 CPU)
Test of compares with simple ranges
Time for select_range_prefix (20000:43500): 6 wallclock secs ( 2.73 usr 0.53 sys + 0.00 cusr 0.00 csys = 3.26 CPU)
Time for select_range_key2 (20000:43500): 5 wallclock secs ( 2.49 usr 0.52 sys + 0.00 cusr 0.00 csys = 3.01 CPU)
Time for select_group (111): 42 wallclock secs ( 0.06 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.07 CPU)
Time for min_max_on_key (15000): 6 wallclock secs ( 3.53 usr 0.54 sys + 0.00 cusr 0.00 csys = 4.07 CPU)
Time for min_max (60): 23 wallclock secs ( 0.02 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.02 CPU)
Time for count_on_key (100): 38 wallclock secs ( 0.03 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.04 CPU)
Time for count (100): 33 wallclock secs ( 0.04 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.04 CPU)
Time for count_distinct_big (20): 38 wallclock secs ( 0.01 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.01 CPU)
Testing update of keys with functions
Time for update_of_key (50000): 14 wallclock secs ( 1.80 usr 0.94 sys + 0.00 cusr 0.00 csys = 2.74 CPU)
Time for update_of_key_big (501): 20 wallclock secs ( 0.01 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.02 CPU)
Testing update with key
Time for update_with_key (300000): 60 wallclock secs ( 9.66 usr 6.21 sys + 0.00 cusr 0.00 csys = 15.87 CPU)
Time for update_with_key_prefix (100000): 21 wallclock secs ( 6.04 usr 1.98 sys + 0.00 cusr 0.00 csys = 8.02 CPU)
Testing update of all rows
Time for update_big (10): 44 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): 48 wallclock secs ( 0.01 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.01 CPU)
Time for outer_join_found (10:10): 46 wallclock secs ( 0.01 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.01 CPU)
Time for outer_join_not_found (500:10): 31 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing SELECT ... WHERE id in (10 values)
Time for select_in (500:5000) 0 wallclock secs ( 0.19 usr 0.03 sys + 0.00 cusr 0.00 csys = 0.22 CPU)
Time for select_join_in (500:5000) 1 wallclock secs ( 0.18 usr 0.02 sys + 0.00 cusr 0.00 csys = 0.20 CPU)
Testing SELECT ... WHERE id in (100 values)
Time for select_in (500:50000) 3 wallclock secs ( 0.57 usr 0.11 sys + 0.00 cusr 0.00 csys = 0.68 CPU)
Time for select_join_in (500:50000) 1 wallclock secs ( 0.51 usr 0.19 sys + 0.00 cusr 0.00 csys = 0.70 CPU)
Testing SELECT ... WHERE id in (1000 values)
Time for select_in (500:500000) 26 wallclock secs ( 4.25 usr 1.40 sys + 0.00 cusr 0.00 csys = 5.65 CPU)
Time for select_join_in (500:500000) 14 wallclock secs ( 4.09 usr 1.42 sys + 0.00 cusr 0.00 csys = 5.51 CPU)
Testing INSERT INTO ... SELECT
Time for insert_select_1_key (1): 5 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for insert_select_2_keys (1): 6 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for drop table(2): 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): 2 wallclock secs ( 0.39 usr 0.26 sys + 0.00 cusr 0.00 csys = 0.65 CPU)
Time for delete_range (12): 11 wallclock secs ( 0.01 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.01 CPU)
Insert into table with 16 keys and with a primary key with 16 parts
Time for insert_key (100000): 86 wallclock secs ( 7.22 usr 2.27 sys + 0.00 cusr 0.00 csys = 9.49 CPU)
Testing update of keys
Time for update_of_primary_key_many_keys (256): 25 wallclock secs ( 0.01 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.01 CPU)
Deleting rows from the table
Time for delete_big_many_keys (128): 51 wallclock secs ( 0.02 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.02 CPU)
Deleting everything from table
Time for delete_all_many_keys (1): 51 wallclock secs ( 0.02 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.02 CPU)
Inserting 100000 rows with multiple values
Time for multiple_value_insert (100000): 5 wallclock secs ( 1.29 usr 0.00 sys + 0.00 cusr 0.00 csys = 1.29 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: 1730 wallclock secs (523.67 usr 128.19 sys + 0.00 cusr 0.00 csys = 651.86 CPU)
Testing server 'MySQL 4.0.2 alpha' at 2002-05-20 16:08:50
Testing the speed of selecting on keys that consist of many parts
The test-table has 10000 rows and the test is done with 500 ranges.
Creating table
Inserting 10000 rows
Time to insert (10000): 3 wallclock secs ( 0.46 usr 0.25 sys + 0.00 cusr 0.00 csys = 0.71 CPU)
Test if the database has a query cache
Time for select_cache (10000): 88 wallclock secs ( 2.21 usr 0.38 sys + 0.00 cusr 0.00 csys = 2.59 CPU)
Time for select_cache2 (10000): 89 wallclock secs ( 2.49 usr 0.39 sys + 0.00 cusr 0.00 csys = 2.88 CPU)
Testing big selects on the table
Time for select_big (70:17207): 0 wallclock secs ( 0.13 usr 0.03 sys + 0.00 cusr 0.00 csys = 0.16 CPU)
Time for select_range (410:1057904): 103 wallclock secs ( 8.73 usr 2.95 sys + 0.00 cusr 0.00 csys = 11.68 CPU)
Time for min_max_on_key (70000): 153 wallclock secs (15.68 usr 2.24 sys + 0.00 cusr 0.00 csys = 17.92 CPU)
Time for count_on_key (50000): 378 wallclock secs (11.70 usr 1.69 sys + 0.00 cusr 0.00 csys = 13.39 CPU)
Time for count_group_on_key_parts (1000:100000): 43 wallclock secs ( 0.96 usr 0.31 sys + 0.00 cusr 0.00 csys = 1.27 CPU)
Testing count(distinct) on the table
Time for count_distinct_key_prefix (1000:1000): 28 wallclock secs ( 0.29 usr 0.03 sys + 0.00 cusr 0.00 csys = 0.32 CPU)
Time for count_distinct (1000:1000): 34 wallclock secs ( 0.24 usr 0.05 sys + 0.00 cusr 0.00 csys = 0.29 CPU)
Time for count_distinct_2 (1000:1000): 38 wallclock secs ( 0.25 usr 0.07 sys + 0.00 cusr 0.00 csys = 0.32 CPU)
Time for count_distinct_group_on_key (1000:6000): 43 wallclock secs ( 0.26 usr 0.05 sys + 0.00 cusr 0.00 csys = 0.31 CPU)
Time for count_distinct_group_on_key_parts (1000:100000): 47 wallclock secs ( 0.98 usr 0.29 sys + 0.00 cusr 0.00 csys = 1.27 CPU)
Time for count_distinct_group (1000:100000): 47 wallclock secs ( 1.00 usr 0.27 sys + 0.00 cusr 0.00 csys = 1.27 CPU)
Time for count_distinct_big (100:1000000): 12 wallclock secs ( 7.14 usr 2.75 sys + 0.00 cusr 0.00 csys = 9.89 CPU)
Total time: 1106 wallclock secs (52.54 usr 11.75 sys + 0.00 cusr 0.00 csys = 64.29 CPU)
Testing server 'MySQL 4.0.2 alpha' at 2002-05-20 16:27:17
Test skipped because the database doesn't support transactions
Testing server 'MySQL 4.0.2 alpha' at 2002-05-20 16:27:17
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): 8 wallclock secs ( 0.89 usr 0.68 sys + 0.00 cusr 0.00 csys = 1.57 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 the actual benchmark
Time for wisc_benchmark (114): 4 wallclock secs ( 2.17 usr 0.52 sys + 0.00 cusr 0.00 csys = 2.69 CPU)
Total time: 12 wallclock secs ( 3.07 usr 1.20 sys + 0.00 cusr 0.00 csys = 4.27 CPU)
...@@ -1280,6 +1280,9 @@ bool Item_func_like::fix_fields(THD *thd,struct st_table_list *tlist) ...@@ -1280,6 +1280,9 @@ bool Item_func_like::fix_fields(THD *thd,struct st_table_list *tlist)
if (args[1]->const_item() && !(specialflag & SPECIAL_NO_NEW_FUNC)) if (args[1]->const_item() && !(specialflag & SPECIAL_NO_NEW_FUNC))
{ {
String* res2 = args[1]->val_str(&tmp_value2); String* res2 = args[1]->val_str(&tmp_value2);
if (!res2)
return 0; // Null argument
const size_t len = res2->length(); const size_t len = res2->length();
const char* first = res2->ptr(); const char* first = res2->ptr();
const char* last = first + len - 1; const char* last = first + len - 1;
......
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