Below is the list of changes that have just been committed into a
4.0 repository of monty. When monty does a push, they will be propogated to
the main repository and within 24 hours after the push to the public repository.
For information on how to access the public repository
see http://www.mysql.com/doc/I/n/Installing_source_tree.html
ChangeSet@stripped, 2001-11-28 03:47:15+02:00, monty@stripped
Fix for IO_CACHE.
Portability fixes.
BUILD/compile-alpha-debug
1.6 01/11/28 03:47:15 monty@stripped +4 -3
Update to newer version
libmysqld/lib_vio.c
1.8 01/11/28 03:47:15 monty@stripped +1 -1
dbug_assert -> DBUG_ASSERT
mysql-test/r/symlink.result
1.4 01/11/28 03:47:15 monty@stripped +5 -13
Update for new tests
mysql-test/t/symlink.test
1.3 01/11/28 03:47:15 monty@stripped +12 -5
Update for new test format
mysys/mf_iocache2.c
1.11 01/11/28 03:47:15 monty@stripped +8 -12
Fixed bug when reading in old buffer
sql-bench/test-transactions.sh
1.2 01/11/28 03:47:15 monty@stripped +99 -71
Update with delete tests
sql/mysqld.cc
1.252 01/11/28 03:47:15 monty@stripped +9 -0
Updates for amiga
sql/sql_string.cc
1.22 01/11/28 03:47:15 monty@stripped +3 -3
Fix typo
sql/stacktrace.c
1.7 01/11/28 03:47:15 monty@stripped +1 -1
Portability fix
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: monty
# Host: hundin.mysql.fi
# Root: /my/bk/mysql-4.0
--- 1.5/BUILD/compile-alpha-debug Sat Oct 20 11:04:21 2001
+++ 1.6/BUILD/compile-alpha-debug Wed Nov 28 03:47:15 2001
@@ -1,7 +1,8 @@
+/bin/rm -f */.deps/*.P */*.o
make -k clean
-/bin/rm -f */.deps/*.P
-/bin/rm -f config.cache
+/bin/rm -f */.deps/*.P */*.o
+/bin/rm -f */.deps/*.P config.cache innobase/config.cache bdb/build_unix/config.cache mysql-*.tar.gz
aclocal; autoheader; aclocal; automake; autoconf
-CFLAGS=-O6 CXX=gcc CXXFLAGS="-O6 -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-debug --with-extra-charsets=complex
+CFLAGS=-O1 CC=gcc CXX=gcc CXXFLAGS="-O1 -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-debug --with-extra-charsets=complex --without-extra-tools
make
--- 1.251/sql/mysqld.cc Mon Nov 26 03:28:15 2001
+++ 1.252/sql/mysqld.cc Wed Nov 28 03:47:15 2001
@@ -686,6 +686,11 @@
}
#endif
+#if defined(__amiga__)
+#undef sigset
+#define sigset signal
+#endif
+
static sig_handler print_signal_warning(int sig)
{
sql_print_error("Warning: Got signal %d from thread %d",
@@ -1310,7 +1315,11 @@
sigprocmask(SIG_SETMASK,&sa.sa_mask,NULL);
init_stacktrace();
+#if defined(__amiga__)
+ sa.sa_handler=(void(*)())handle_segfault;
+#else
sa.sa_handler=handle_segfault;
+#endif
sigaction(SIGSEGV, &sa, NULL);
#ifdef SIGBUS
sigaction(SIGBUS, &sa, NULL);
--- 1.21/sql/sql_string.cc Tue Nov 27 02:21:44 2001
+++ 1.22/sql/sql_string.cc Wed Nov 28 03:47:15 2001
@@ -779,10 +779,10 @@
{
while (str != str_end && *str != cmp)
str++;
- if (str++ == str_end)
+ if (str++ == str_end)
{
- DBUG_RETURN(-1)
- };
+ DBUG_RETURN(-1);
+ }
{
int tmp=wild_compare(str,str_end,wildstr,wildend,escape);
if (tmp <= 0)
--- 1.10/mysys/mf_iocache2.c Wed Nov 28 02:55:41 2001
+++ 1.11/mysys/mf_iocache2.c Wed Nov 28 03:47:15 2001
@@ -32,17 +32,16 @@
void my_b_seek(IO_CACHE *info,my_off_t pos)
{
+ my_off_t offset = (pos - info->pos_in_file);
DBUG_ENTER("my_b_seek");
DBUG_PRINT("enter",("pos: %lu", (ulong) pos));
if (info->type == READ_CACHE)
{
- byte* try_pos=info->read_pos + (pos - info->pos_in_file);
- if (try_pos >= info->buffer &&
- try_pos <= info->read_end)
+ if ((ulonglong) offset < (ulonglong) (info->read_end - info->buffer))
{
- /* The position is in the current buffer; Reuse it */
- info->read_pos = try_pos;
+ /* The read is in the current buffer; Reuse it */
+ info->read_pos = info->buffer + offset;
DBUG_VOID_RETURN;
}
else
@@ -53,17 +52,14 @@
}
else if (info->type == WRITE_CACHE)
{
- byte* try_pos;
/* If write is in current buffer, reuse it */
- try_pos = info->write_pos + (pos - info->pos_in_file);
- if (try_pos >= info->write_buffer &&
- try_pos <= info->write_end)
+ if ((ulonglong) offset <
+ (ulonglong) (info->write_end - info->write_buffer))
{
- info->write_pos = try_pos;
+ info->write_pos = info->write_buffer + offset;
DBUG_VOID_RETURN;
}
- else
- flush_io_cache(info);
+ flush_io_cache(info);
}
info->pos_in_file=pos;
info->seek_not_done=1;
--- 1.6/sql/stacktrace.c Thu Nov 22 13:57:00 2001
+++ 1.7/sql/stacktrace.c Wed Nov 28 03:47:15 2001
@@ -218,7 +218,7 @@
{
signal(sig, SIG_DFL);
pthread_kill(pthread_self(), sig);
-#if defined(P_MYID)
+#if defined(P_MYID) && !defined(SCO)
/* On Solaris, the above kill is not enough */
sigsend(P_PID,P_MYID,sig);
#endif
--- 1.3/mysql-test/r/symlink.result Thu Oct 11 03:59:45 2001
+++ 1.4/mysql-test/r/symlink.result Wed Nov 28 03:47:15 2001
@@ -21,7 +21,6 @@
insert into t2 (b) select b from t1;
insert into t1 (b) select b from t2;
drop table t2;
- create table t9 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam data directory="/home/sasha/bk/mysql-4.0/mysql-test/var/tmp" index directory="/home/sasha/bk/mysql-4.0/mysql-test/var/run";
insert into t9 select * from t1;
check table t9;
Table Op Msg_type Msg_text
@@ -45,18 +44,11 @@
alter table t8 rename t7;
rename table t7 to t9;
drop table t1;
-create table t1 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam data directory="tmp";
-Incorrect table name 'tmp'
-drop database if exists test_mysqltest;
-create database test_mysqltest;
-create table test_mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam index directory="/this-dir-does-not-exist";
-Can't create/write to file '/this-dir-does-not-exist/t9.MYI' (Errcode: 2)
-create table test_mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam index directory="not-hard-path";
-Incorrect table name 'not-hard-path'
- create table test_mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam index directory="/home/sasha/bk/mysql-4.0/mysql-test/var/run";
-Can't create/write to file '/home/sasha/bk/mysql-4.0/mysql-test/var/run/t9.MYI' (Errcode: 17)
- create table test_mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam data directory="/home/sasha/bk/mysql-4.0/mysql-test/var/tmp";
-Can't create/write to file '/home/sasha/bk/mysql-4.0/mysql-test/var/tmp/t9.MYD' (Errcode: 17)
+Got one of the listed errors
+Got one of the listed errors
+Got one of the listed errors
+Got one of the listed errors
+Got one of the listed errors
alter table t9 rename test_mysqltest.t9;
select count(*) from test_mysqltest.t9;
count(*)
--- 1.2/mysql-test/t/symlink.test Thu Oct 11 03:59:43 2001
+++ 1.3/mysql-test/t/symlink.test Wed Nov 28 03:47:15 2001
@@ -1,5 +1,7 @@
-- require r/have_symlink.require
+disable_query_log;
show variables like "have_symlink";
+enable_query_log;
#
# First create little data to play with
@@ -33,7 +35,10 @@
# We use t9 here to not crash with tables generated by the backup test
#
+disable_query_log;
eval create table t9 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam data directory="$MYSQL_TEST_DIR/var/tmp" index directory="$MYSQL_TEST_DIR/var/run";
+enable_query_log;
+
insert into t9 select * from t1;
check table t9;
optimize table t9;
@@ -53,7 +58,8 @@
# Note that we are using the above table t9 here!
#
---error 1103
+disable_query_log;
+--error 1103,1103
create table t1 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam data directory="tmp";
# Check that we cannot link over a table from another database.
@@ -61,17 +67,18 @@
drop database if exists test_mysqltest;
create database test_mysqltest;
---error 1
+--error 1,1
create table test_mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam index directory="/this-dir-does-not-exist";
---error 1103
+--error 1103,1103
create table test_mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam index directory="not-hard-path";
---error 1
+--error 1,1
eval create table test_mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam index directory="$MYSQL_TEST_DIR/var/run";
---error 1
+--error 1,1
eval create table test_mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam data directory="$MYSQL_TEST_DIR/var/tmp";
+enable_query_log;
# Check moving table t9 from default database to test_mysqltest;
# In this case the symlinks should be removed.
--- 1.1/sql-bench/test-transactions.sh Thu Nov 22 17:55:18 2001
+++ 1.2/sql-bench/test-transactions.sh Wed Nov 28 03:47:15 2001
@@ -1,5 +1,4 @@
#!@PERL@
-#
# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
#
# This library is free software; you can redistribute it and/or
@@ -28,7 +27,7 @@
$opt_groups=27; # Characters are 'A' -> Z
-$opt_loop_count=100000; # Change this to make test harder/easier
+$opt_loop_count=10000; # Change this to make test harder/easier
$opt_medium_loop_count=100; # Change this to make test harder/easier
chomp($pwd = `pwd`); $pwd = "." if ($pwd eq '');
@@ -114,86 +113,109 @@
}
###
-### Test update perfomance
+### Test rollback performance
###
-test_update("bench1","update_commit",0);
-test_update("bench2","update_autocommit",1);
+print "Test transactions rollback performance\n" if($opt_debug);
+
+##
+## Insert rollback test
+##
+
+#
+# Test is done by inserting 100 rows in a table with lots of rows and
+# then doing a rollback on these
+#
-sub test_update
{
- my ($table, $test_name, $auto_commit)= @_;
- my ($loop_time,$end_time,$id);
+ my ($id,$rev_id,$grp,$region,$end,$loop_time,$end_time,$commit_loop,$count);
- $dbh->{AutoCommit}= $auto_commit;
+ $dbh->{AutoCommit} = 0;
$loop_time=new Benchmark;
+ $end=$opt_loop_count*2;
+ $count=0;
- for ($id=0 ; $id < $opt_loop_count ; $id++)
+ for ($commit_loop=1, $id=$opt_loop_count ; $id < $end ;
+ $id++, $commit_loop++)
{
- do_query($dbh,"update bench1 set updated=1 where idn=$id");
+ $rev_id=$end-$id;
+ $grp=$id/$opt_groups;
+ $region=chr(65+$id%$opt_groups);
+ do_query($dbh,"insert into bench1 values ($id,$rev_id,'$region',$grp,0)");
+ if ($commit_loop >= $opt_medium_loop_count)
+ {
+ $dbh->rollback;
+ $commit_loop=0;
+ $count++;
+ }
+ }
+ if ($commit_loop > 1)
+ {
+ $dbh->rollback;
+ $count++;
}
-
- $dbh->commit if (!$auto_commit);
$end_time=new Benchmark;
- print "Time for $test_name ($opt_loop_count): " .
+ print "Time for insert_rollback ($count:$opt_loop_count): " .
timestr(timediff($end_time, $loop_time),"all") . "\n\n";
}
-###
-### Test delete perfomance
-###
+##
+## Update rollback test
+##
-test_delete("bench1","delete_commit",0);
-test_delete("bench2","delete_autocommit",1);
+#
+# Test is done by updating 100 rows in a table with lots of rows and
+# then doing a rollback on these
+#
-sub test_delete
{
- my ($table, $test_name, $auto_commit)= @_;
- my ($loop_time,$end_time,$id);
+ my ($id,$loop_time,$end_time,$commit_loop,$count);
- $dbh->{AutoCommit}= $auto_commit;
+ $dbh->{AutoCommit} = 0;
$loop_time=new Benchmark;
+ $end=$opt_loop_count*2;
+ $count=0;
- for ($id=0 ; $id < $opt_loop_count ; $id++)
- {
- do_query($dbh,"delete from $table where idn=$id");
+ for ($commit_loop=1, $id=0 ; $id < $opt_loop_count ; $id++, $commit_loop++)
+ {
+ do_query($dbh,"update bench1 set updated=2 where idn=$id");
+ if ($commit_loop >= $opt_medium_loop_count)
+ {
+ $dbh->rollback;
+ $commit_loop=0;
+ $count++;
+ }
+ }
+ if ($commit_loop > 1)
+ {
+ $dbh->rollback;
+ $count++;
}
- $dbh->commit if (!$auto_commit);
$end_time=new Benchmark;
- print "Time for $test_name ($opt_loop_count): " .
- timestr(timediff($end_time, $loop_time),"all") . "\n\n";
+ print "Time for update_rollback ($count:$opt_loop_count): " .
+ timestr(timediff($end_time, $loop_time),"all") . "\n\n";
}
-###
-### Test rollback performance
-###
-
-print "Test transactions rollback performance\n" if($opt_debug);
-
##
-## Insert rollback test
+## Delete rollback test
##
#
-# Test is done by inserting 10 rows in a table with lots of rows and
+# Test is done by deleting 100 rows in a table with lots of rows and
# then doing a rollback on these
#
{
- my ($id,$rev_id,$grp,$region,$end,$loop_time,$end_time,$commit_loop,$count);
+ my ($id,$loop_time,$end_time,$commit_loop,$count);
$dbh->{AutoCommit} = 0;
$loop_time=new Benchmark;
$end=$opt_loop_count*2;
$count=0;
- for ($commit_loop=1, $id=$opt_loop_count ; $id < $end ;
- $id++, $commit_loop++)
+ for ($commit_loop=1, $id=0 ; $id < $opt_loop_count ; $id++, $commit_loop++)
{
- $rev_id=$end-$id;
- $grp=$id/$opt_groups;
- $region=chr(65+$id%$opt_groups);
- do_query($dbh,"insert into bench1 values ($id,$rev_id,'$region',$grp,0)");
+ do_query($dbh,"delete from bench1 where idn=$id");
if ($commit_loop >= $opt_medium_loop_count)
{
$dbh->rollback;
@@ -207,55 +229,61 @@
$count++;
}
$end_time=new Benchmark;
- print "Time for insert_rollback ($count:$opt_loop_count): " .
+ print "Time for delete_rollback ($count:$opt_loop_count): " .
timestr(timediff($end_time, $loop_time),"all") . "\n\n";
}
+
###
-### Update rollback test
+### Test update perfomance
###
-if (0)
-{
+test_update("bench1","update_commit",0);
+test_update("bench2","update_autocommit",1);
- $dbh->{AutoCommit} = 0;
+sub test_update
+{
+ my ($table, $test_name, $auto_commit)= @_;
+ my ($loop_time,$end_time,$id);
+ $dbh->{AutoCommit}= $auto_commit;
$loop_time=new Benchmark;
- for ($id=0,$rev_id=$opt_medium_loop_count ; $id < $opt_medium_loop_count; $id++,$rev_id--)
+ for ($id=0 ; $id < $opt_loop_count ; $id++)
{
- $grp=$id/$opt_groups;
- $region=chr(65+$id%$opt_groups);
- do_query($dbh,"update bench1 set region='$region',grp=$grp where idn=$id");
+ do_query($dbh,"update bench1 set updated=1 where idn=$id");
}
- $dbh->rollback;
-
+ $dbh->commit if (!$auto_commit);
$end_time=new Benchmark;
- print "Time for update rollback (" . ($opt_medium_loop_count) . "): " .
+ print "Time for $test_name ($opt_loop_count): " .
timestr(timediff($end_time, $loop_time),"all") . "\n\n";
+}
-### Delete rollback test
- $dbh->{AutoCommit} = 0;
+###
+### Test delete perfomance
+###
- $loop_time=new Benchmark;
+test_delete("bench1","delete_commit",0);
+test_delete("bench2","delete_autocommit",1);
- for ($id=0,$rev_id=$opt_medium_loop_count; $id < $opt_medium_loop_count; $id++,$rev_id--)
- {
- $grp=$id/$opt_groups;
- $region=chr(65+$id%$opt_groups);
- do_query($dbh,"delete from bench1 where idn=$id");
- }
+sub test_delete
+{
+ my ($table, $test_name, $auto_commit)= @_;
+ my ($loop_time,$end_time,$id);
- $dbh->rollback;
+ $dbh->{AutoCommit}= $auto_commit;
+ $loop_time=new Benchmark;
+ for ($id=0 ; $id < $opt_loop_count ; $id++)
+ {
+ do_query($dbh,"delete from $table where idn=$id");
+ }
+ $dbh->commit if (!$auto_commit);
$end_time=new Benchmark;
- print "Time for delete rollback (" . ($opt_medium_loop_count) . "): " .
- timestr(timediff($end_time, $loop_time),"all") . "\n\n";
-
- $dbh->{AutoCommit} = 1;
+ print "Time for $test_name ($opt_loop_count): " .
+ timestr(timediff($end_time, $loop_time),"all") . "\n\n";
}
-
####
#### End of benchmark
--- 1.7/libmysqld/lib_vio.c Tue Oct 9 03:35:28 2001
+++ 1.8/libmysqld/lib_vio.c Wed Nov 28 03:47:15 2001
@@ -110,7 +110,7 @@
vio->reading = 1;
if (vio->where_in_packet >= vio->end_of_packet)
{
- dbug_assert(vio->packets);
+ DBUG_ASSERT(vio->packets);
vio->where_in_packet = vio->packets + sizeof(char *) + 4;
vio->end_of_packet = vio->where_in_packet +
uint4korr(vio->packets + sizeof(char *));
| Thread |
|---|
| • bk commit into 4.0 tree | monty | 28 Nov |