Commit dd7e7257 authored by unknown's avatar unknown

Merge paul@work.mysql.com:/home/bk/mysql

into teton.kitebird.com:/home/paul/mysql


Docs/manual.texi:
  Auto merged
parents ccf31559 8da0f5f2
...@@ -10414,8 +10414,9 @@ recommended for systems where only local requests are allowed. @xref{DNS}. ...@@ -10414,8 +10414,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}. 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}. This will also set default table type to @code{ISAM}. @xref{ISAM}.
@item --skip-symlinks @item --skip-symlink
Don't delete or rename files that symlinks in the data directory points to. Don't delete or rename files that a symlinked file in the data directory
points to.
@item --skip-safemalloc @item --skip-safemalloc
If @strong{MySQL} is configured with @code{--with-debug=full}, all programs If @strong{MySQL} is configured with @code{--with-debug=full}, all programs
...@@ -12182,7 +12183,7 @@ user}. ...@@ -12182,7 +12183,7 @@ user}.
@item @item
Don't support symlinks to tables (This can be disabled with the 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 @code{mysqld} as root as anyone that has write access to the mysqld data
directories could then delete any file in the system! directories could then delete any file in the system!
@xref{Symbolic links to tables}. @xref{Symbolic links to tables}.
...@@ -19172,7 +19173,7 @@ detect duplicated @code{UNIQUE} keys. ...@@ -19172,7 +19173,7 @@ detect duplicated @code{UNIQUE} keys.
By using @code{DATA DIRECTORY="directory"} or @code{INDEX By using @code{DATA DIRECTORY="directory"} or @code{INDEX
DIRECTORY="directory"} you can specify where the table handler should DIRECTORY="directory"} you can specify where the table handler should
put it's table and index files. This only works for @code{MyISAM} tables 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}. option. @xref{Symbolic links to tables}.
@end itemize @end itemize
...@@ -31127,12 +31128,12 @@ If you use @code{ALTER TABLE RENAME} to move a table to another database, ...@@ -31127,12 +31128,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 then the table will be moved to the other database directory and the old
symlinks and the files they pointed to will be deleted. symlinks and the files they pointed to will be deleted.
@item @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 option to @code{mysqld} to ensure that no one can drop or rename a file
outside of the @code{mysqld} data directory. outside of the @code{mysqld} data directory.
@end itemize @end itemize
Things that are not yet fully supported: Things that are not yet supported:
@cindex TODO, symlinks @cindex TODO, symlinks
@itemize @bullet @itemize @bullet
...@@ -35016,7 +35017,8 @@ This can be used to get faster inserts! Deactivated indexes can be ...@@ -35016,7 +35017,8 @@ This can be used to get faster inserts! Deactivated indexes can be
reactivated by using @code{myisamchk -r}. keys. reactivated by using @code{myisamchk -r}. keys.
@item -l or --no-symlinks @item -l or --no-symlinks
Do not follow symbolic links. Normally @code{myisamchk} repairs the 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 @item -r or --recover
Can fix almost anything except unique keys that aren't unique Can fix almost anything except unique keys that aren't unique
(which is an extremely unlikely error with ISAM/MyISAM tables). (which is an extremely unlikely error with ISAM/MyISAM tables).
...@@ -5,9 +5,16 @@ ...@@ -5,9 +5,16 @@
# Don't run the --fast test on a PostgreSQL 7.1.1 database on # 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 # which you have any critical data; During one of our test runs
# PostgreSQL got a corrupted database and all data was destroyed! # 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! # '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 # WARNING
# The test was run on a Intel Xeon 2x 550 Mzh machine with 1G memory, # The test was run on a Intel Xeon 2x 550 Mzh machine with 1G memory,
...@@ -73,8 +80,14 @@ make install ...@@ -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 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. # When running with --fast we run the following vacuum commands on
# (The time for vacuum() is counted in the book-keeping() column) # 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 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) ...@@ -21,15 +21,16 @@ benchdir_root= $(prefix)
benchdir = $(benchdir_root)/sql-bench benchdir = $(benchdir_root)/sql-bench
bench_SCRIPTS = test-ATIS test-connect test-create test-insert \ bench_SCRIPTS = test-ATIS test-connect test-create test-insert \
test-big-tables test-select test-wisconsin \ test-big-tables test-select test-wisconsin \
test-alter-table \ test-alter-table graph-compare-results \
bench-init.pl compare-results run-all-tests \ bench-init.pl compare-results run-all-tests \
server-cfg crash-me copy-db server-cfg crash-me copy-db \
CLEANFILES = $(bench_SCRIPTS) CLEANFILES = $(bench_SCRIPTS)
EXTRA_SCRIPTS = test-ATIS.sh test-connect.sh test-create.sh \ EXTRA_SCRIPTS = test-ATIS.sh test-connect.sh test-create.sh \
test-insert.sh test-big-tables.sh test-select.sh \ test-insert.sh test-big-tables.sh test-select.sh \
test-alter-table.sh test-wisconsin.sh \ test-alter-table.sh test-wisconsin.sh \
bench-init.pl.sh compare-results.sh server-cfg.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) EXTRA_DIST = $(EXTRA_SCRIPTS)
dist-hook: dist-hook:
......
...@@ -25,7 +25,7 @@ use Getopt::Long; ...@@ -25,7 +25,7 @@ use Getopt::Long;
$opt_server="mysql"; $opt_server="mysql";
$opt_dir="output"; $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; $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(); 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) ...@@ -53,10 +53,6 @@ if ($#ARGV == -1)
@ARGV=glob($files); @ARGV=glob($files);
$automatic_files=1; $automatic_files=1;
} }
else
{
$opt_cmp="";
}
foreach (@ARGV) foreach (@ARGV)
{ {
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
# as such, and clarify ones such as "mediumint" with comments such as # as such, and clarify ones such as "mediumint" with comments such as
# "3-byte int" or "same as xxx". # "3-byte int" or "same as xxx".
$version="1.56"; $version="1.57";
use DBI; use DBI;
use Getopt::Long; use Getopt::Long;
...@@ -1539,12 +1539,24 @@ report("insert INTO ... SELECT ...","insert_select", ...@@ -1539,12 +1539,24 @@ report("insert INTO ... SELECT ...","insert_select",
"insert into crash_q (a) SELECT crash_me.a from crash_me", "insert into crash_q (a) SELECT crash_me.a from crash_me",
"drop table crash_q $drop_attr"); "drop table crash_q $drop_attr");
report_trans("transactions","transactions", if (!defined($limits{"transactions"}))
[create_table("crash_q",["a integer not null"],[]), {
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)"], "insert into crash_q values (1)"],
"select * from crash_q", "select * from crash_q",
"drop table crash_q $drop_attr" "drop table crash_q $drop_attr"
); ));
}
print "$limits{$limit}\n";
}
report("atomic updates","atomic_updates", report("atomic updates","atomic_updates",
create_table("crash_q",["a integer not null"],["primary key (a)"]), create_table("crash_q",["a integer not null"],["primary key (a)"]),
...@@ -2500,8 +2512,7 @@ sub report_result ...@@ -2500,8 +2512,7 @@ sub report_result
sub report_trans sub report_trans
{ {
my ($prompt,$limit,$queries,$check,$clear)=@_; my ($limit,$queries,$check,$clear)=@_;
print "$prompt: ";
if (!defined($limits{$limit})) if (!defined($limits{$limit}))
{ {
eval {undef($dbh->{AutoCommit})}; eval {undef($dbh->{AutoCommit})};
...@@ -2518,7 +2529,6 @@ sub report_trans ...@@ -2518,7 +2529,6 @@ sub report_trans
safe_query($clear); safe_query($clear);
} else { } else {
$dbh->{AutoCommit} = 1; $dbh->{AutoCommit} = 1;
safe_query($clear);
save_config_data($limit,"error",$prompt); save_config_data($limit,"error",$prompt);
} }
} else { } else {
...@@ -2532,8 +2542,7 @@ sub report_trans ...@@ -2532,8 +2542,7 @@ sub report_trans
} }
safe_query($clear); safe_query($clear);
} }
print "$limits{$limit}\n"; return $limits{$limit} ne "yes";
return $limits{$limit} ne "no";
} }
...@@ -2961,9 +2970,11 @@ sub sql_concat ...@@ -2961,9 +2970,11 @@ sub sql_concat
sub create_table sub create_table
{ {
my($table_name,$fields,$index) = @_; my($table_name,$fields,$index,$extra) = @_;
my($query,$nr,$parts,@queries,@index); my($query,$nr,$parts,@queries,@index);
$extra="" if (!defined($extra));
$query="create table $table_name ("; $query="create table $table_name (";
$nr=0; $nr=0;
foreach $field (@$fields) foreach $field (@$fields)
...@@ -3015,7 +3026,7 @@ sub create_table ...@@ -3015,7 +3026,7 @@ sub create_table
} }
} }
chop($query); chop($query);
$query.= ')'; $query.= ") $extra";
unshift(@queries,$query); unshift(@queries,$query);
return @queries; 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 NEG=yes # update of column= -column
Need_cast_for_null=no # Need to cast NULL for arithmetic Need_cast_for_null=no # Need to cast NULL for arithmetic
...@@ -36,7 +36,7 @@ constraint_check=no # Column constraints ...@@ -36,7 +36,7 @@ constraint_check=no # Column constraints
constraint_check_table=no # Table constraints constraint_check_table=no # Table constraints
constraint_null=yes # NULL constraint (SyBase style) constraint_null=yes # NULL constraint (SyBase style)
crash_me_safe=yes # crash me safe 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=yes # default value for column
create_default_func=no # default value function for column create_default_func=no # default value function for column
create_if_not_exists=yes # create table if not exists create_if_not_exists=yes # create table if not exists
...@@ -394,7 +394,7 @@ select_limit2=yes # SELECT with LIMIT #,# ...@@ -394,7 +394,7 @@ select_limit2=yes # SELECT with LIMIT #,#
select_string_size=1048565 # constant string size in SELECT select_string_size=1048565 # constant string size in SELECT
select_table_update=no # Update with sub select select_table_update=no # Update with sub select
select_without_from=yes # SELECT without FROM 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 simple_joins=yes # ANSI SQL simple joins
storage_of_float=round # Storage of float values storage_of_float=round # Storage of float values
subqueries=no # subqueries subqueries=no # subqueries
...@@ -402,7 +402,7 @@ table_alias=yes # Table alias ...@@ -402,7 +402,7 @@ table_alias=yes # Table alias
table_name_case=no # case independent table names table_name_case=no # case independent table names
table_wildcard=yes # Select table_name.* table_wildcard=yes # Select table_name.*
temporary_table=yes # temporary tables temporary_table=yes # temporary tables
transactions=no # transactions transactions=yes # constant string size in where
truncate_table=yes # truncate truncate_table=yes # truncate
type_extra_abstime=no # Type abstime type_extra_abstime=no # Type abstime
type_extra_bfile=no # Type bfile 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 NEG=yes # update of column= -column
Need_cast_for_null=no # Need to cast NULL for arithmetic Need_cast_for_null=no # Need to cast NULL for arithmetic
...@@ -36,7 +36,7 @@ constraint_check=no # Column constraints ...@@ -36,7 +36,7 @@ constraint_check=no # Column constraints
constraint_check_table=no # Table constraints constraint_check_table=no # Table constraints
constraint_null=yes # NULL constraint (SyBase style) constraint_null=yes # NULL constraint (SyBase style)
crash_me_safe=yes # crash me safe 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=yes # default value for column
create_default_func=no # default value function for column create_default_func=no # default value function for column
create_if_not_exists=yes # create table if not exists create_if_not_exists=yes # create table if not exists
...@@ -394,7 +394,7 @@ select_limit2=yes # SELECT with LIMIT #,# ...@@ -394,7 +394,7 @@ select_limit2=yes # SELECT with LIMIT #,#
select_string_size=1048565 # constant string size in SELECT select_string_size=1048565 # constant string size in SELECT
select_table_update=no # Update with sub select select_table_update=no # Update with sub select
select_without_from=yes # SELECT without FROM 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 simple_joins=yes # ANSI SQL simple joins
storage_of_float=round # Storage of float values storage_of_float=round # Storage of float values
subqueries=no # subqueries subqueries=no # subqueries
...@@ -402,7 +402,7 @@ table_alias=yes # Table alias ...@@ -402,7 +402,7 @@ table_alias=yes # Table alias
table_name_case=no # case independent table names table_name_case=no # case independent table names
table_wildcard=yes # Select table_name.* table_wildcard=yes # Select table_name.*
temporary_table=yes # temporary tables temporary_table=yes # temporary tables
transactions=no # transactions transactions=yes # constant string size in where
truncate_table=yes # truncate truncate_table=yes # truncate
type_extra_abstime=no # Type abstime type_extra_abstime=no # Type abstime
type_extra_bfile=no # Type bfile 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 NEG=yes # update of column= -column
Need_cast_for_null=no # Need to cast NULL for arithmetic Need_cast_for_null=no # Need to cast NULL for arithmetic
...@@ -36,7 +36,7 @@ constraint_check=yes # Column constraints ...@@ -36,7 +36,7 @@ constraint_check=yes # Column constraints
constraint_check_table=yes # Table constraints constraint_check_table=yes # Table constraints
constraint_null=yes # NULL constraint (SyBase style) constraint_null=yes # NULL constraint (SyBase style)
crash_me_safe=yes # crash me safe 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=yes # default value for column
create_default_func=yes # default value function for column create_default_func=yes # default value function for column
create_if_not_exists=no # create table if not exists create_if_not_exists=no # create table if not exists
......
...@@ -799,18 +799,27 @@ sub reconnect_on_errors ...@@ -799,18 +799,27 @@ sub reconnect_on_errors
sub vacuum sub vacuum
{ {
my ($self,$full_vacuum,$dbh_ref)=@_; my ($self,$full_vacuum,$dbh_ref,@tables)=@_;
my ($loop_time,$end_time,$dbh); my ($loop_time,$end_time,$dbh,$table);
if (defined($full_vacuum)) if (defined($full_vacuum))
{ {
$$dbh_ref->disconnect; $$dbh_ref= $self->connect(); $$dbh_ref->disconnect; $$dbh_ref= $self->connect();
} }
$dbh=$$dbh_ref; $dbh=$$dbh_ref;
$loop_time=new Benchmark; $loop_time=new Benchmark;
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"; $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";
$end_time=new Benchmark; $end_time=new Benchmark;
print "Time for book-keeping (1): " . print "Time for book-keeping (1): " .
Benchmark::timestr(Benchmark::timediff($end_time, $loop_time),"all") . "\n\n"; Benchmark::timestr(Benchmark::timediff($end_time, $loop_time),"all") . "\n\n";
......
...@@ -250,10 +250,6 @@ if ($limits->{'unique_index'}) ...@@ -250,10 +250,6 @@ if ($limits->{'unique_index'})
timestr(timediff($end_time, $loop_time),"all") . "\n\n"; 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 #### Do some selects on the table
...@@ -1410,10 +1406,6 @@ if ($limits->{'insert_multi_value'}) ...@@ -1410,10 +1406,6 @@ if ($limits->{'insert_multi_value'})
print "Time for multiple_value_insert (" . ($opt_loop_count) . "): " . print "Time for multiple_value_insert (" . ($opt_loop_count) . "): " .
timestr(timediff($end_time, $loop_time),"all") . "\n\n"; timestr(timediff($end_time, $loop_time),"all") . "\n\n";
if ($opt_fast && defined($server->{vacuum}))
{
$server->vacuum(1,\$dbh);
}
if ($opt_lock_tables) if ($opt_lock_tables)
{ {
$sth = $dbh->do("UNLOCK TABLES ") || die $DBI::errstr; $sth = $dbh->do("UNLOCK TABLES ") || die $DBI::errstr;
......
...@@ -2587,7 +2587,7 @@ static struct option long_options[] = { ...@@ -2587,7 +2587,7 @@ static struct option long_options[] = {
{"skip-show-database", no_argument, 0, (int) OPT_SKIP_SHOW_DB}, {"skip-show-database", no_argument, 0, (int) OPT_SKIP_SHOW_DB},
{"skip-slave-start", no_argument, 0, (int) OPT_SKIP_SLAVE_START}, {"skip-slave-start", no_argument, 0, (int) OPT_SKIP_SLAVE_START},
{"skip-stack-trace", no_argument, 0, (int) OPT_SKIP_STACK_TRACE}, {"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}, {"skip-thread-priority", no_argument, 0, (int) OPT_SKIP_PRIOR},
{"sql-bin-update-same", no_argument, 0, (int) OPT_SQL_BIN_UPDATE_SAME}, {"sql-bin-update-same", no_argument, 0, (int) OPT_SQL_BIN_UPDATE_SAME},
#include "sslopt-longopts.h" #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