summaryrefslogtreecommitdiff
path: root/sql-bench
diff options
context:
space:
mode:
authormonty@mysql.com/narttu.mysql.fi <>2007-02-23 13:13:55 +0200
committermonty@mysql.com/narttu.mysql.fi <>2007-02-23 13:13:55 +0200
commitf0ae3ce9b97f45b717201764c6af6e4bd4176e5c (patch)
treeaa523ca58b5c098a79faefb22302aa717f4ae942 /sql-bench
parenta5051aa4ebaf48fae5f7b6f52889c3c66a12dd23 (diff)
downloadmariadb-git-f0ae3ce9b97f45b717201764c6af6e4bd4176e5c.tar.gz
Fixed compiler warnings
Fixed compile-pentium64 scripts Fixed wrong estimate of update_with_key_prefix in sql-bench Merge bk-internal.mysql.com:/home/bk/mysql-5.1 into mysql.com:/home/my/mysql-5.1 Fixed unsafe define of uint4korr() Fixed that --extern works with mysql-test-run.pl Small trivial cleanups This also fixes a bug in counting number of rows that are updated when we have many simultanous queries Move all connection handling and command exectuion main loop from sql_parse.cc to sql_connection.cc Split handle_one_connection() into reusable sub functions. Split create_new_thread() into reusable sub functions. Added thread_scheduler; Preliminary interface code for future thread_handling code. Use 'my_thread_id' for internal thread id's Make thr_alarm_kill() to depend on thread_id instead of thread Make thr_abort_locks_for_thread() depend on thread_id instead of thread In store_globals(), set my_thread_var->id to be thd->thread_id. Use my_thread_var->id as basis for my_thread_name() The above changes makes the connection we have between THD and threads more soft. Added a lot of DBUG_PRINT() and DBUG_ASSERT() functions Fixed compiler warnings Fixed core dumps when running with --debug Removed setting of signal masks (was never used) Made event code call pthread_exit() (portability fix) Fixed that event code doesn't call DBUG_xxx functions before my_thread_init() is called. Made handling of thread_id and thd->variables.pseudo_thread_id uniform. Removed one common 'not freed memory' warning from mysqltest Fixed a couple of usage of not initialized warnings (unlikely cases) Suppress compiler warnings from bdb and (for the moment) warnings from ndb
Diffstat (limited to 'sql-bench')
-rw-r--r--sql-bench/bench-init.pl.sh14
-rw-r--r--sql-bench/example19
-rw-r--r--sql-bench/run-all-tests.sh6
-rw-r--r--sql-bench/test-insert.sh2
4 files changed, 33 insertions, 8 deletions
diff --git a/sql-bench/bench-init.pl.sh b/sql-bench/bench-init.pl.sh
index 5ae1155fd0f..a728086760a 100644
--- a/sql-bench/bench-init.pl.sh
+++ b/sql-bench/bench-init.pl.sh
@@ -39,7 +39,7 @@ require "$pwd/server-cfg" || die "Can't read Configuration file: $!\n";
$|=1; # Output data immediately
-$opt_skip_test=$opt_skip_create=$opt_skip_delete=$opt_verbose=$opt_fast_insert=$opt_lock_tables=$opt_debug=$opt_skip_delete=$opt_fast=$opt_force=$opt_log=$opt_use_old_results=$opt_help=$opt_odbc=$opt_small_test=$opt_small_tables=$opt_samll_key_tables=$opt_stage=$opt_old_headers=$opt_die_on_errors=$opt_tcpip=$opt_random=0;
+$opt_skip_test=$opt_skip_create=$opt_skip_delete=$opt_verbose=$opt_fast_insert=$opt_lock_tables=$opt_debug=$opt_skip_delete=$opt_fast=$opt_force=$opt_log=$opt_use_old_results=$opt_help=$opt_odbc=$opt_small_test=$opt_small_tables=$opt_samll_key_tables=$opt_stage=$opt_old_headers=$opt_die_on_errors=$opt_tcpip=$opt_random=$opt_only_missing_tests=0;
$opt_cmp=$opt_user=$opt_password=$opt_connect_options="";
$opt_server="mysql"; $opt_dir="output";
$opt_host="localhost";$opt_database="test";
@@ -59,7 +59,7 @@ $log_prog_args=join(" ", skip_arguments(\@ARGV,"comments","cmp","server",
"use-old-results","skip-test",
"optimization","hw",
"machine", "dir", "suffix", "log"));
-GetOptions("skip-test=s","comments=s","cmp=s","server=s","user=s","host=s","database=s","password=s","loop-count=i","row-count=i","skip-create","skip-delete","verbose","fast-insert","lock-tables","debug","fast","force","field-count=i","regions=i","groups=i","time-limit=i","log","use-old-results","machine=s","dir=s","suffix=s","help","odbc","small-test","small-tables","small-key-tables","stage=i","threads=i","random","old-headers","die-on-errors","create-options=s","hires","tcpip","silent","optimization=s","hw=s","socket=s","connect-options=s") || usage();
+GetOptions("skip-test=s","comments=s","cmp=s","server=s","user=s","host=s","database=s","password=s","loop-count=i","row-count=i","skip-create","skip-delete","verbose","fast-insert","lock-tables","debug","fast","force","field-count=i","regions=i","groups=i","time-limit=i","log","use-old-results","machine=s","dir=s","suffix=s","help","odbc","small-test","small-tables","small-key-tables","stage=i","threads=i","random","old-headers","die-on-errors","create-options=s","hires","tcpip","silent","optimization=s","hw=s","socket=s","connect-options=s","only-missing-tests") || usage();
usage() if ($opt_help);
$server=get_server($opt_server,$opt_host,$opt_database,$opt_odbc,
@@ -504,6 +504,13 @@ All benchmarks takes the following options:
--odbc
Use the ODBC DBI driver to connect to the database.
+--only-missing-tests
+ Only run test that don\'t have an old test result.
+ This is useful when you want to do a re-run of tests that failed in last run.
+
+--optimization='some comments'
+ Add coments about optimization of DBMS, which was done before the test.
+
--password='password'
Password for the current user.
@@ -576,9 +583,6 @@ All benchmarks takes the following options:
This is a test specific option that is only used when debugging a test.
Print more information about what is going on.
---optimization='some comments'
- Add coments about optimization of DBMS, which was done before the test.
-
--hw='some comments'
Add coments about hardware used for this test.
diff --git a/sql-bench/example b/sql-bench/example
index 8c9603a3a64..df2a9b8be69 100644
--- a/sql-bench/example
+++ b/sql-bench/example
@@ -1,3 +1,20 @@
#/bin/sh
-run-all-tests --prefix=-innodb --hw="AMD Athlon 4000+; 2400 MHz 1M cache, 3G memory" --optimization="gcc 4.0.2 -O3" --comments="Engine=InnoDB" --create-options="ENGINE=InnoDB"
+hw="2xPentium(R) 3.2 GHz, 1M cache, 4G memory"
+optimization="gcc 4.1.2 -m64 -O3 --static"
+machine="Linux-x64"
+
+# InnoDB tests
+
+./run-all-tests --suffix=-innodb --comments="Engine=InnoDB --innodb_log_file_size=100M" --create-options="ENGINE=InnoDB" --hw="$hw" --optimization="$optimization" --machine="$machine" --log
+
+./run-all-tests --suffix=_fast-innodb --comments="Engine=InnoDB --innodb_log_file_size=100M" --create-options="ENGINE=InnoDB" --hw="$hw" --optimization="$optimization" --machine="$machine" --fast --log
+
+
+# MyISAM tests
+
+./run-all-tests --suffix=-myisam --comments="Engine=MyISAM key_buffer_size=16M" --create-options="ENGINE=myisam" --hw="$hw" --optimization="$optimization" --machine="$machine" --log
+
+./run-all-tests --suffix=_fast-myisam --comments="Engine=MyISAM key_buffer_size=16M" --create-options="ENGINE=myisam" --hw="$hw" --optimization="$optimization" --machine="$machine" --fast --log
+
+compare-results --relative output/RUN-mysql-myisam-* output/RUN-mysql_fast-myisam* output/RUN-mysql*
diff --git a/sql-bench/run-all-tests.sh b/sql-bench/run-all-tests.sh
index 7e607b313e4..50ac8d0cbe3 100644
--- a/sql-bench/run-all-tests.sh
+++ b/sql-bench/run-all-tests.sh
@@ -114,7 +114,6 @@ print "Server version: $server_version\n";
print "Optimization: $opt_optimization\n";
print "Hardware: $opt_hw\n\n";
-
$estimated=$warning=$got_warning=0;
while (<test-*>)
{
@@ -130,6 +129,11 @@ while (<test-*>)
last;
}
}
+ if ($opt_only_missing_tests && -f "$opt_dir$dir$prog-$filename")
+ {
+ # Test already run, skip it
+ $skip_prog= 1;
+ }
print "$prog: ";
if ((!$opt_use_old_results) && (!$skip_prog))
{
diff --git a/sql-bench/test-insert.sh b/sql-bench/test-insert.sh
index 5189e8851e1..badc52c99d6 100644
--- a/sql-bench/test-insert.sh
+++ b/sql-bench/test-insert.sh
@@ -998,7 +998,7 @@ for ($i=1 ; $i < $opt_loop_count*3 ; $i+=3)
{
$sth = $dbh->do("update bench1 set dummy1='updated' where id=$i") or die $DBI::errstr;
$end_time=new Benchmark;
- last if ($estimated=predict_query_time($loop_time,$end_time,\$i,$tests,
+ last if ($estimated=predict_query_time($loop_time,$end_time,\$i,($i-1)/3,
$opt_loop_count));
}
if ($estimated)