Commit 3f9c19dc authored by unknown's avatar unknown

Fixed bug with text key compares in BDB


Docs/manual.texi:
  Updated statistics table
mysys/Makefile.am:
  Removed rule for getopt1.o
sql-bench/test-insert.sh:
  Enlarged some tests
sql/ha_berkeley.cc:
  Fixed bug with text key compares
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
parent 642ae16e
jani@prima.mysql.com jani@prima.mysql.com
monty@donna.mysql.com
...@@ -19703,50 +19703,58 @@ The following columns are returned: ...@@ -19703,50 +19703,58 @@ The following columns are returned:
below, though the format and numbers probably differ: below, though the format and numbers probably differ:
@example @example
+--------------------------+-------+ +--------------------------+------------+
| Variable_name | Value | | Variable_name | Value |
+--------------------------+-------+ +--------------------------+------------+
| Aborted_clients | 0 | | Aborted_clients | 0 |
| Aborted_connects | 0 | | Aborted_connects | 0 |
| Bytes_received | 100 | | Bytes_received | 142160923 |
| Bytes_sent | 2106 | | Bytes_sent | 1161910370 |
| Connections | 4 | | Connections | 30022 |
| Created_tmp_tables | 0 | | Created_tmp_disk_tables | 0 |
| Delayed_insert_threads | 0 | | Created_tmp_tables | 8988 |
| Delayed_writes | 0 | | Delayed_insert_threads | 0 |
| Delayed_errors | 0 | | Delayed_writes | 0 |
| Flush_commands | 1 | | Delayed_errors | 0 |
| Handler_delete | 0 | | Flush_commands | 1 |
| Handler_read_first | 1 | | Handler_delete | 462604 |
| Handler_read_key | 0 | | Handler_read_first | 95882 |
| Handler_read_next | 2 | | Handler_read_key | 27681068 |
| Handler_read_prev | 0 | | Handler_read_next | 265008218 |
| Handler_read_rnd | 0 | | Handler_read_prev | 3022500 |
| Handler_read_rnd_next | 25 | | Handler_read_rnd | 36900998 |
| Handler_update | 0 | | Handler_read_rnd_next | 252097176 |
| Handler_write | 0 | | Handler_update | 16945404 |
| Key_blocks_used | 1 | | Handler_write | 66826676 |
| Key_read_requests | 2 | | Key_blocks_used | 14955 |
| Key_reads | 1 | | Key_read_requests | 90131960 |
| Key_write_requests | 0 | | Key_reads | 163268 |
| Key_writes | 0 | | Key_write_requests | 7573912 |
| Max_used_connections | 0 | | Key_writes | 3780151 |
| Not_flushed_key_blocks | 0 | | Max_used_connections | 0 |
| Not_flushed_delayed_rows | 0 | | Not_flushed_key_blocks | 0 |
| Open_tables | 0 | | Not_flushed_delayed_rows | 0 |
| Open_files | 0 | | Open_tables | 0 |
| Open_streams | 0 | | Open_files | 0 |
| Opened_tables | 6 | | Open_streams | 0 |
| Questions | 4 | | Opened_tables | 44598 |
| Slow_launch_threads | 0 | | Questions | 1866024 |
| Slow_queries | 0 | | Select_full_join | 0 |
| Slave_running | OFF | | Select_full_range_join | 0 |
| Threads_cached | 0 | | Select_range | 68187 |
| Threads_connected | 1 | | Select_range_check | 0 |
| Threads_running | 1 | | Select_scan | 31440 |
| Uptime | 1256 | | Slave_running | OFF |
+--------------------------+-------+ | Slow_launch_threads | 0 |
| Slow_queries | 0 |
| Sort_range | 0 |
| Sort_rows | 36650500 |
| Sort_scan | 5298 |
| Threads_cached | 0 |
| Threads_connected | 1 |
| Threads_running | 1 |
| Uptime | 39613 |
+--------------------------+------------+
@end example @end example
@cindex variables, status @cindex variables, status
...@@ -38003,8 +38011,8 @@ Raw port of an SQL mode for XEmacs. Supports completion. Original by ...@@ -38003,8 +38011,8 @@ Raw port of an SQL mode for XEmacs. Supports completion. Original by
Peter D. Pezaris @email{pez@@atlantic2.sbi.com} and partial Peter D. Pezaris @email{pez@@atlantic2.sbi.com} and partial
@strong{MySQL} port by David Axmark. @strong{MySQL} port by David Axmark.
@item @uref{http://www.mysql.com/Downloads/Win32/myaccess97_1_3.zip, MyAccess97 1.3} @item @uref{http://www.mysql.com/Downloads/Win32/myaccess97_1_4.zip, MyAccess97 1.4}
@item @uref{http://www.mysql.com/Downloads/Win32/myaccess2000_1_3.zip, MyAccess2000 1.3} @item @uref{http://www.mysql.com/Downloads/Win32/myaccess2000_1_4.zip, MyAccess2000 1.4}
MyAccess is an AddIn for MS Access 97/2000 which allows you to manage MySQL databases from within Access. Main functions are: MyAccess is an AddIn for MS Access 97/2000 which allows you to manage MySQL databases from within Access. Main functions are:
@itemize @bullet @itemize @bullet
...@@ -38013,9 +38021,10 @@ MyAccess is an AddIn for MS Access 97/2000 which allows you to manage MySQL data ...@@ -38013,9 +38021,10 @@ MyAccess is an AddIn for MS Access 97/2000 which allows you to manage MySQL data
@item Extract "Create Table-Scripts' from MySQL @item Extract "Create Table-Scripts' from MySQL
@item Import/Export tables from Access to MySQL and vice versa @item Import/Export tables from Access to MySQL and vice versa
@item Log Changes @item Log Changes
@item Show a "Database Definition Report
@end itemize @end itemize
Written by Hubertus Hiden. @uref{http://myaccess.fsn.net, MyAccess homepage}. Written by Hubertus Hiden. @uref{http://www.accessmysql.com, MyAccess homepage}.
@item @uref{http://www.mysql.com/Downloads/Contrib/radius-0.3.tar.gz, radius-0.3.tar.gz} @item @uref{http://www.mysql.com/Downloads/Contrib/radius-0.3.tar.gz, radius-0.3.tar.gz}
Patches for @code{radiusd} to make it support @strong{MySQL}. By Wim Bonis, Patches for @code{radiusd} to make it support @strong{MySQL}. By Wim Bonis,
...@@ -61,7 +61,7 @@ DEFS = -DDEFAULT_BASEDIR=\"$(prefix)\" \ ...@@ -61,7 +61,7 @@ DEFS = -DDEFAULT_BASEDIR=\"$(prefix)\" \
-DSHAREDIR="\"$(MYSQLSHAREdir)\"" \ -DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
@DEFS@ @DEFS@
getopt1.o: @THREAD_LOBJECTS@ #getopt1.o: @THREAD_LOBJECTS@
OMIT_DEPENDENCIES = pthread.h stdio.h __stdio.h stdlib.h __stdlib.h math.h\ OMIT_DEPENDENCIES = pthread.h stdio.h __stdio.h stdlib.h __stdlib.h math.h\
__math.h time.h __time.h unistd.h __unistd.h types.h \ __math.h time.h __time.h unistd.h __unistd.h types.h \
......
...@@ -367,38 +367,38 @@ print " for order_by_big ($small_loop_count:$rows): " . ...@@ -367,38 +367,38 @@ print " for order_by_big ($small_loop_count:$rows): " .
$loop_time=new Benchmark; $loop_time=new Benchmark;
$estimated=$rows=0; $estimated=$rows=0;
for ($i=1 ; $i <= $small_loop_count ; $i++) for ($i=1 ; $i <= $range_loop_count ; $i++)
{ {
$start=$opt_loop_count/$small_loop_count*$i; $start=$opt_loop_count/$range_loop_count*$i;
$end=$start+$i; $end=$start+$i;
$rows+=fetch_all_rows($dbh,"select dummy1 from bench1 where id>=$start and id <= $end order by id",1); $rows+=fetch_all_rows($dbh,"select dummy1 from bench1 where id>=$start and id <= $end order by id",1);
$end_time=new Benchmark; $end_time=new Benchmark;
last if ($estimated=predict_query_time($loop_time,$end_time,\$i,$i, last if ($estimated=predict_query_time($loop_time,$end_time,\$i,$i,
$small_loop_count)); $range_loop_count));
} }
if ($estimated) if ($estimated)
{ print "Estimated time"; } { print "Estimated time"; }
else else
{ print "Time"; } { print "Time"; }
print " for order_by_key ($small_loop_count:$rows): " . print " for order_by_key ($range_loop_count:$rows): " .
timestr(timediff($end_time, $loop_time),"all") . "\n"; timestr(timediff($end_time, $loop_time),"all") . "\n";
$loop_time=new Benchmark; $loop_time=new Benchmark;
$estimated=$rows=0; $estimated=$rows=0;
for ($i=1 ; $i <= $small_loop_count ; $i++) for ($i=1 ; $i <= $range_loop_count ; $i++)
{ {
$start=$opt_loop_count/$small_loop_count*$i; $start=$opt_loop_count/$range_loop_count*$i;
$end=$start+$small_loop_count; $end=$start+$range_loop_count;
$rows+=fetch_all_rows($dbh,"select id2 from bench1 where id3>=$start and id3 <= $end order by id3",1); $rows+=fetch_all_rows($dbh,"select id2 from bench1 where id3>=$start and id3 <= $end order by id3",1);
$end_time=new Benchmark; $end_time=new Benchmark;
last if ($estimated=predict_query_time($loop_time,$end_time,\$i,$i, last if ($estimated=predict_query_time($loop_time,$end_time,\$i,$i,
$small_loop_count)); $range_loop_count));
} }
if ($estimated) if ($estimated)
{ print "Estimated time"; } { print "Estimated time"; }
else else
{ print "Time"; } { print "Time"; }
print " for order_by_key2_diff ($small_loop_count:$rows): " . print " for order_by_key2_diff ($range_loop_count:$rows): " .
timestr(timediff($end_time, $loop_time),"all") . "\n"; timestr(timediff($end_time, $loop_time),"all") . "\n";
# #
......
...@@ -1150,7 +1150,7 @@ int ha_berkeley::index_read(byte * buf, const byte * key, ...@@ -1150,7 +1150,7 @@ int ha_berkeley::index_read(byte * buf, const byte * key,
/* read of partial key */ /* read of partial key */
pack_key(&last_key, active_index, key_buff, key, key_len); pack_key(&last_key, active_index, key_buff, key, key_len);
/* Store for compare */ /* Store for compare */
memcpy(key_buff2, key_buff, last_key.size); memcpy(key_buff2, key_buff, (key_len=last_key.size));
key_info->handler.bdb_return_if_eq= -1; key_info->handler.bdb_return_if_eq= -1;
error=read_row(cursor->c_get(cursor, &last_key, &row, DB_SET_RANGE), error=read_row(cursor->c_get(cursor, &last_key, &row, DB_SET_RANGE),
buf, active_index, &row, (DBT*) 0, 0); buf, active_index, &row, (DBT*) 0, 0);
......
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