Commit b1e00c96 authored by unknown's avatar unknown

Updated benchmarks and crash-me for postgreSQL 7.1.1

Fixed option for symlinks


Docs/manual.texi:
  Updated symlink handling.
sql-bench/Comments/postgres.benchmark:
  Updated benchmark text
sql-bench/Makefile.am:
  Added graph-compare-results
sql-bench/compare-results.sh:
  Don't reset the cmp option.
sql-bench/crash-me.sh:
  Updated transaction testing.
sql-bench/limits/mysql-3.23.cfg:
  Updated benchmark run
sql-bench/limits/mysql.cfg:
  Updated benchmark run
sql-bench/limits/pg.cfg:
  Updated benchmark run
sql-bench/server-cfg.sh:
  Don't do vacuum too often.
sql-bench/test-insert.sh:
  Don't do vacuum too often.
sql/mysqld.cc:
  Changed skip-symlinks to skip-symlink
parent 9d77fddc
......@@ -10407,8 +10407,9 @@ recommended for systems where only local requests are allowed. @xref{DNS}.
Don't use new, possible wrong routines. Implies @code{--skip-delay-key-write}.
This will also set default table type to @code{ISAM}. @xref{ISAM}.
@item --skip-symlinks
Don't delete or rename files that symlinks in the data directory points to.
@item --skip-symlink
Don't delete or rename files that a symlinked file in the data directory
points to.
@item --skip-safemalloc
If @strong{MySQL} is configured with @code{--with-debug=full}, all programs
......@@ -12159,7 +12160,7 @@ Normally this is done with the @code{su} command. For more details, see
@item
Don't support symlinks to tables (This can be disabled with the
@code{--skip-symlinks} option. This is especially important if you run
@code{--skip-symlink} option. This is especially important if you run
@code{mysqld} as root as anyone that has write access to the mysqld data
directories could then delete any file in the system!
@xref{Symbolic links to tables}.
......@@ -19157,7 +19158,7 @@ detect duplicated @code{UNIQUE} keys.
By using @code{DATA DIRECTORY="directory"} or @code{INDEX
DIRECTORY="directory"} you can specify where the table handler should
put it's table and index files. This only works for @code{MyISAM} tables
in @code{MySQL} 4.0, when you are not using the @code{--skip-symlinks}
in @code{MySQL} 4.0, when you are not using the @code{--skip-symlink}
option. @xref{Symbolic links to tables}.
@end itemize
......@@ -31112,12 +31113,12 @@ If you use @code{ALTER TABLE RENAME} to move a table to another database,
then the table will be moved to the other database directory and the old
symlinks and the files they pointed to will be deleted.
@item
If you are not using symlinks you should use the @code{--skip-symlinks}
If you are not using symlinks you should use the @code{--skip-symlink}
option to @code{mysqld} to ensure that no one can drop or rename a file
outside of the @code{mysqld} data directory.
@end itemize
Things that are not yet fully supported:
Things that are not yet supported:
@cindex TODO, symlinks
@itemize @bullet
......@@ -35001,7 +35002,8 @@ This can be used to get faster inserts! Deactivated indexes can be
reactivated by using @code{myisamchk -r}. keys.
@item -l or --no-symlinks
Do not follow symbolic links. Normally @code{myisamchk} repairs the
table a symlink points at.
table a symlink points at. This option doesn't exist in MySQL 4.0,
as MySQL 4.0 will not remove symlinks during repair.
@item -r or --recover
Can fix almost anything except unique keys that aren't unique
(which is an extremely unlikely error with ISAM/MyISAM tables).
......@@ -5,9 +5,16 @@
# Don't run the --fast test on a PostgreSQL 7.1.1 database on
# which you have any critical data; During one of our test runs
# PostgreSQL got a corrupted database and all data was destroyed!
# (When we tried to restart postmaster, It died with a
# When we tried to restart postmaster, It died with a
# 'no such file or directory' error and never recovered from that!
#
# Another time vacuum() filled our system disk with had 6G free
# while vaccuming a table of 60 M.
#
# We have sent a mail about this to the PostgreSQL mailing list, so
# the PostgreSQL developers should be aware of these problems and should
# hopefully fix this soon.
#
# WARNING
# The test was run on a Intel Xeon 2x 550 Mzh machine with 1G memory,
......@@ -73,8 +80,14 @@ make install
run-all-tests --comment="Intel Xeon, 2x550 Mhz, 512M, pg started with -o -F" --user=postgres --server=pg --cmp=mysql
# and a test where we do a vacuum() after each update.
# (The time for vacuum() is counted in the book-keeping() column)
# When running with --fast we run the following vacuum commands on
# the database between each major update of the tables:
# vacuum table
# or
# vacuum
# The time for vacuum() is accounted for in the book-keeping() column, not
# in the test that updates the database.
run-all-tests --comment="Intel Xeon, 2x550 Mhz, 512M, pg started with -o -F" --user=postgres --server=pg --cmp=mysql --fast
......
......@@ -21,15 +21,16 @@ benchdir_root= $(prefix)
benchdir = $(benchdir_root)/sql-bench
bench_SCRIPTS = test-ATIS test-connect test-create test-insert \
test-big-tables test-select test-wisconsin \
test-alter-table \
test-alter-table graph-compare-results \
bench-init.pl compare-results run-all-tests \
server-cfg crash-me copy-db
server-cfg crash-me copy-db \
CLEANFILES = $(bench_SCRIPTS)
EXTRA_SCRIPTS = test-ATIS.sh test-connect.sh test-create.sh \
test-insert.sh test-big-tables.sh test-select.sh \
test-alter-table.sh test-wisconsin.sh \
bench-init.pl.sh compare-results.sh server-cfg.sh \
run-all-tests.sh crash-me.sh copy-db.sh
run-all-tests.sh crash-me.sh copy-db.sh \
graph-compare-results.sh
EXTRA_DIST = $(EXTRA_SCRIPTS)
dist-hook:
......
......@@ -25,7 +25,7 @@ use Getopt::Long;
$opt_server="mysql";
$opt_dir="output";
$opt_machine="";
$opt_machine=$opt_cmp="";
$opt_relative=$opt_same_server=$opt_help=$opt_Information=$opt_skip_count=$opt_no_bars=$opt_verbose=0;
GetOptions("Information","help","server=s","cmp=s","machine=s","relative","same-server","dir=s","skip-count","no-bars","html","verbose") || usage();
......@@ -53,10 +53,6 @@ if ($#ARGV == -1)
@ARGV=glob($files);
$automatic_files=1;
}
else
{
$opt_cmp="";
}
foreach (@ARGV)
{
......
......@@ -38,7 +38,7 @@
# as such, and clarify ones such as "mediumint" with comments such as
# "3-byte int" or "same as xxx".
$version="1.56";
$version="1.57";
use DBI;
use Getopt::Long;
......@@ -1539,12 +1539,24 @@ report("insert INTO ... SELECT ...","insert_select",
"insert into crash_q (a) SELECT crash_me.a from crash_me",
"drop table crash_q $drop_attr");
report_trans("transactions","transactions",
[create_table("crash_q",["a integer not null"],[]),
"insert into crash_q values (1)"],
"select * from crash_q",
"drop table crash_q $drop_attr"
);
if (!defined($limits{"transactions"}))
{
my ($limit,$type);
$limit="transactions";
print "$limit: ";
foreach $type (('', 'type=bdb', 'type=innodb', 'type=gemini'))
{
undef($limits{$limit});
last if (!report_trans($limit,
[create_table("crash_q",["a integer not null"],[],
$type),
"insert into crash_q values (1)"],
"select * from crash_q",
"drop table crash_q $drop_attr"
));
}
print "$limits{$limit}\n";
}
report("atomic updates","atomic_updates",
create_table("crash_q",["a integer not null"],["primary key (a)"]),
......@@ -2500,8 +2512,7 @@ sub report_result
sub report_trans
{
my ($prompt,$limit,$queries,$check,$clear)=@_;
print "$prompt: ";
my ($limit,$queries,$check,$clear)=@_;
if (!defined($limits{$limit}))
{
eval {undef($dbh->{AutoCommit})};
......@@ -2518,7 +2529,6 @@ sub report_trans
safe_query($clear);
} else {
$dbh->{AutoCommit} = 1;
safe_query($clear);
save_config_data($limit,"error",$prompt);
}
} else {
......@@ -2532,8 +2542,7 @@ sub report_trans
}
safe_query($clear);
}
print "$limits{$limit}\n";
return $limits{$limit} ne "no";
return $limits{$limit} ne "yes";
}
......@@ -2961,9 +2970,11 @@ sub sql_concat
sub create_table
{
my($table_name,$fields,$index) = @_;
my($table_name,$fields,$index,$extra) = @_;
my($query,$nr,$parts,@queries,@index);
$extra="" if (!defined($extra));
$query="create table $table_name (";
$nr=0;
foreach $field (@$fields)
......@@ -3015,7 +3026,7 @@ sub create_table
}
}
chop($query);
$query.= ')';
$query.= ") $extra";
unshift(@queries,$query);
return @queries;
}
......
This diff is collapsed.
#This file is automaticly generated by crash-me 1.54
#This file is automaticly generated by crash-me 1.57
NEG=yes # update of column= -column
Need_cast_for_null=no # Need to cast NULL for arithmetic
......@@ -36,7 +36,7 @@ constraint_check=no # Column constraints
constraint_check_table=no # Table constraints
constraint_null=yes # NULL constraint (SyBase style)
crash_me_safe=yes # crash me safe
crash_me_version=1.54 # crash me version
crash_me_version=1.57 # crash me version
create_default=yes # default value for column
create_default_func=no # default value function for column
create_if_not_exists=yes # create table if not exists
......@@ -394,7 +394,7 @@ select_limit2=yes # SELECT with LIMIT #,#
select_string_size=1048565 # constant string size in SELECT
select_table_update=no # Update with sub select
select_without_from=yes # SELECT without FROM
server_version=MySQL 3.23.29 gamma # server version
server_version=MySQL 3.23.39 debug # server version
simple_joins=yes # ANSI SQL simple joins
storage_of_float=round # Storage of float values
subqueries=no # subqueries
......@@ -402,7 +402,7 @@ table_alias=yes # Table alias
table_name_case=no # case independent table names
table_wildcard=yes # Select table_name.*
temporary_table=yes # temporary tables
transactions=no # transactions
transactions=yes # constant string size in where
truncate_table=yes # truncate
type_extra_abstime=no # Type abstime
type_extra_bfile=no # Type bfile
......
#This file is automaticly generated by crash-me 1.54
#This file is automaticly generated by crash-me 1.57
NEG=yes # update of column= -column
Need_cast_for_null=no # Need to cast NULL for arithmetic
......@@ -36,7 +36,7 @@ constraint_check=no # Column constraints
constraint_check_table=no # Table constraints
constraint_null=yes # NULL constraint (SyBase style)
crash_me_safe=yes # crash me safe
crash_me_version=1.54 # crash me version
crash_me_version=1.57 # crash me version
create_default=yes # default value for column
create_default_func=no # default value function for column
create_if_not_exists=yes # create table if not exists
......@@ -394,7 +394,7 @@ select_limit2=yes # SELECT with LIMIT #,#
select_string_size=1048565 # constant string size in SELECT
select_table_update=no # Update with sub select
select_without_from=yes # SELECT without FROM
server_version=MySQL 3.23.29 gamma # server version
server_version=MySQL 3.23.39 debug # server version
simple_joins=yes # ANSI SQL simple joins
storage_of_float=round # Storage of float values
subqueries=no # subqueries
......@@ -402,7 +402,7 @@ table_alias=yes # Table alias
table_name_case=no # case independent table names
table_wildcard=yes # Select table_name.*
temporary_table=yes # temporary tables
transactions=no # transactions
transactions=yes # constant string size in where
truncate_table=yes # truncate
type_extra_abstime=no # Type abstime
type_extra_bfile=no # Type bfile
......
#This file is automaticly generated by crash-me 1.56
#This file is automaticly generated by crash-me 1.57
NEG=yes # update of column= -column
Need_cast_for_null=no # Need to cast NULL for arithmetic
......@@ -36,7 +36,7 @@ constraint_check=yes # Column constraints
constraint_check_table=yes # Table constraints
constraint_null=yes # NULL constraint (SyBase style)
crash_me_safe=yes # crash me safe
crash_me_version=1.56 # crash me version
crash_me_version=1.57 # crash me version
create_default=yes # default value for column
create_default_func=yes # default value function for column
create_if_not_exists=no # create table if not exists
......
......@@ -799,18 +799,27 @@ sub reconnect_on_errors
sub vacuum
{
my ($self,$full_vacuum,$dbh_ref)=@_;
my ($loop_time,$end_time,$dbh);
my ($self,$full_vacuum,$dbh_ref,@tables)=@_;
my ($loop_time,$end_time,$dbh,$table);
if (defined($full_vacuum))
{
$$dbh_ref->disconnect; $$dbh_ref= $self->connect();
}
$dbh=$$dbh_ref;
$loop_time=new Benchmark;
$dbh->do("vacuum") || die "Got error: $DBI::errstr when executing 'vacuum'\n";
$dbh->do("vacuum pg_attributes") || die "Got error: $DBI::errstr when executing 'vacuum'\n";
$dbh->do("vacuum pg_index") || die "Got error: $DBI::errstr when executing 'vacuum'\n";
$dbh->do("vacuum analyze") || die "Got error: $DBI::errstr when executing 'vacuum'\n";
if ($#tables >= 0)
{
foreach $table (@tables)
{
$dbh->do("vacuum $table") || die "Got error: $DBI::errstr when executing 'vacuum'\n";
}
}
else
{
# $dbh->do("vacuum pg_attributes") || die "Got error: $DBI::errstr when executing 'vacuum'\n";
# $dbh->do("vacuum pg_index") || die "Got error: $DBI::errstr when executing 'vacuum'\n";
$dbh->do("vacuum") || die "Got error: $DBI::errstr when executing 'vacuum'\n";
}
$end_time=new Benchmark;
print "Time for book-keeping (1): " .
Benchmark::timestr(Benchmark::timediff($end_time, $loop_time),"all") . "\n\n";
......
......@@ -250,10 +250,6 @@ if ($limits->{'unique_index'})
timestr(timediff($end_time, $loop_time),"all") . "\n\n";
}
#if ($opt_fast && defined($server->{vacuum}))
#{
# $server->vacuum(1,\$dbh);
#}
####
#### Do some selects on the table
......@@ -1410,10 +1406,6 @@ if ($limits->{'insert_multi_value'})
print "Time for multiple_value_insert (" . ($opt_loop_count) . "): " .
timestr(timediff($end_time, $loop_time),"all") . "\n\n";
if ($opt_fast && defined($server->{vacuum}))
{
$server->vacuum(1,\$dbh);
}
if ($opt_lock_tables)
{
$sth = $dbh->do("UNLOCK TABLES ") || die $DBI::errstr;
......
......@@ -2587,7 +2587,7 @@ static struct option long_options[] = {
{"skip-show-database", no_argument, 0, (int) OPT_SKIP_SHOW_DB},
{"skip-slave-start", no_argument, 0, (int) OPT_SKIP_SLAVE_START},
{"skip-stack-trace", no_argument, 0, (int) OPT_SKIP_STACK_TRACE},
{"skip-symlinks", no_argument, 0, (int) OPT_SKIP_SYMLINKS},
{"skip-symlink", no_argument, 0, (int) OPT_SKIP_SYMLINKS},
{"skip-thread-priority", no_argument, 0, (int) OPT_SKIP_PRIOR},
{"sql-bin-update-same", no_argument, 0, (int) OPT_SQL_BIN_UPDATE_SAME},
#include "sslopt-longopts.h"
......
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