Commit 5985de2d authored by monty@donna.mysql.fi's avatar monty@donna.mysql.fi
Browse files

Added new tests to benchmark suite

parent c1402e2d
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -23588,7 +23588,7 @@ The @code{GEMINI} table type is developed and supported by NuSphere Corporation
(@uref{http://www.nusphere.com}).  It features row-level locking, transaction
support (@code{COMMIT} and @code{ROLLBACK}), and automatic crash recovery.
@code{GEMINI} tables will be included in the @strong{MySQL} 4.0 source
@code{GEMINI} tables will be included in the @strong{MySQL} 3.23.35 source
distribution.
@node GEMINI start, GEMINI features, GEMINI overview, GEMINI
@@ -23669,7 +23669,7 @@ Innobase is included in the @strong{MySQL} source distribution starting
from 3.23.34 and will be activated in the @strong{MySQL}-max binary.
If you have downloaded a binary version of @strong{MySQL} that includes
support for Berkeley DB, simply follow the instructions for
support for Innobase, simply follow the instructions for
installing a binary version of @strong{MySQL}. @xref{Installing binary}.
To compile @strong{MySQL} with Innobase support, download @strong{MySQL}
@@ -23678,7 +23678,7 @@ To compile @strong{MySQL} with Innobase support, download @strong{MySQL}
@example
cd /path/to/source/of/mysql-3.23.34
./configure --with-berkeley-db
./configure --with-innobase
@end example
Innobase provides MySQL with a transaction safe table handler with
@@ -47192,6 +47192,11 @@ characters in database, table and column names.
@item
Add a portable interface over @code{gethostbyaddr_r()} so that we can change
@code{ip_to_hostname()} to not block other threads while doing DNS lookups.
@item
Add @code{record_in_range()} method to @code{MERGE} tables to be
able to choose the right index when there is many to choose from. We should
also extend the info interface to get the key distribution for each index,
of @code{analyze} is run on all sub tables.
@end itemize
@node TODO future, TODO sometime, TODO MySQL 4.0, TODO
+22 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@
#include "my_readline.h"
#include <signal.h>

const char *VER="11.12";
const char *VER="11.13";

/* Don't try to make a nice table if the data is too big */
#define MAX_COLUMN_LENGTH	     1024
@@ -1518,6 +1518,22 @@ com_ego(String *buffer,char *line)
  return result;
}

static void
print_field_types(MYSQL_RES *result)
{
  MYSQL_FIELD	*field;  
  while ((field = mysql_fetch_field(result)))
  {
    tee_fprintf(PAGER,"%s '%s' %d %d %d %d %d\n",
		field->name,
		field->table ? "" : field->table,
		(int) field->type,
		field->length, field->max_length, 
		field->flags, field->decimals);
  }
  tee_puts("", PAGER);
}


static void
print_table_data(MYSQL_RES *result)
@@ -1528,6 +1544,11 @@ print_table_data(MYSQL_RES *result)
  bool		*num_flag;

  num_flag=(bool*) my_alloca(sizeof(bool)*mysql_num_fields(result));
  if (info_flag)
  {
    print_field_types(result);
    mysql_field_seek(result,0);
  }
  separator.copy("+",1);
  while ((field = mysql_fetch_field(result)))
  {
+7 −4
Original line number Diff line number Diff line
@@ -28,9 +28,9 @@
#include <my_pthread.h>				/* because of signal()	*/
#endif

#define ADMIN_VERSION "8.17"
#define ADMIN_VERSION "8.18"
#define MAX_MYSQL_VAR 64
#define MAX_TIME_TO_WAIT 3600			/* Wait for shutdown */
#define SHUTDOWN_DEF_TIMEOUT 3600		/* Wait for shutdown */
#define MAX_TRUNC_LENGTH 3

char truncated_var_names[MAX_MYSQL_VAR][MAX_TRUNC_LENGTH];
@@ -40,7 +40,7 @@ static int interval=0;
static my_bool option_force=0,interrupted=0,new_line=0,
               opt_compress=0, opt_relative=0, opt_verbose=0, opt_vertical=0;
static uint tcp_port = 0, option_wait = 0, option_silent=0;
static ulong opt_connect_timeout;
static ulong opt_connect_timeout, opt_shutdown_timeout;
static my_string unix_port=0;

/* When using extended-status relatively, ex_val_max_len is the estimated
@@ -134,6 +134,8 @@ static struct option long_options[] = {

CHANGEABLE_VAR changeable_vars[] = {
  { "connect_timeout", (long*) &opt_connect_timeout, 0, 0, 3600*12, 0, 1},
  { "shutdown_timeout", (long*) &opt_shutdown_timeout, SHUTDOWN_DEF_TIMEOUT, 0,
    3600*12, 0, 1},
  { 0, 0, 0, 0, 0, 0, 0}  
};

@@ -148,6 +150,7 @@ int main(int argc,char *argv[])
  MY_INIT(argv[0]);
  mysql_init(&mysql);
  load_defaults("my",load_default_groups,&argc,&argv);
  set_all_changeable_vars( changeable_vars );

  while ((c=getopt_long(argc,argv,"h:i:p::u:#::P:sS:Ct:fq?vVw::WrEO:",
			long_options, &option_index)) != EOF)
@@ -1125,7 +1128,7 @@ static void wait_pidfile(char *pidfile)
  uint count=0;

  system_filename(buff,pidfile);
  while ((fd = open(buff, O_RDONLY)) >= 0 && count++ < MAX_TIME_TO_WAIT)
  while ((fd = open(buff, O_RDONLY)) >= 0 && count++ < opt_shutdown_timeout)
  {
    close(fd);
    sleep(1);
+4 −4
Original line number Diff line number Diff line
@@ -450,14 +450,14 @@ stop_slave ()
{
  if [ x$SLAVE_RUNNING = x1 ]
  then
    $MYSQLADMIN --no-defaults --socket=$SLAVE_MYSOCK -u root shutdown
    $MYSQLADMIN --no-defaults --socket=$SLAVE_MYSOCK -u root -O shutdown_timeout=10 shutdown
    if [ $? != 0 ] && [ -f $SLAVE_MYPID ]
    then # try harder!
     $ECHO "slave not cooperating with mysqladmin, will try manual kill"
     kill `$CAT $SLAVE_MYPID`
     sleep $SLEEP_TIME
     if [ -f $SLAVE_MYPID ] ; then
       $ECHO "slave refused to die, resorting to SIGKILL murder"
       $ECHO "slave refused to die. Sending SIGKILL"
       kill -9 `$CAT $SLAVE_MYPID`
       $RM -f $SLAVE_MYPID
     else
@@ -472,14 +472,14 @@ stop_master ()
{
  if [ x$MASTER_RUNNING = x1 ]
  then
    $MYSQLADMIN --no-defaults --socket=$MASTER_MYSOCK -u root shutdown
    $MYSQLADMIN --no-defaults --socket=$MASTER_MYSOCK -u root -O shutdown_timeout=10 shutdown
    if [ $? != 0 ] && [ -f $MASTER_MYPID ]
    then # try harder!
     $ECHO "master not cooperating with mysqladmin, will try manual kill"
     kill `$CAT $MASTER_MYPID`
     sleep $SLEEP_TIME
     if [ -f $MASTER_MYPID ] ; then
       $ECHO "master refused to die, resorting to SIGKILL murder"
       $ECHO "master refused to die. Sending SIGKILL"
       kill -9 `$CAT $MASTER_MYPID`
       $RM -f $MASTER_MYPID
     else

sql-bench/TODO

0 → 100644
+21 −0
Original line number Diff line number Diff line
When comparing with ms-sql:

Check how to get MySQL faster         mysql   ms-sql

count_distinct (2000)               |  89.00|  39.00|
count_distinct_big (120)            | 324.00| 121.00|
count_distinct_group (1000)         | 158.00| 107.00|
count_distinct_group_on_key (1000)  |  49.00|  17.00|
count_distinct_group_on_key_parts (1| 157.00| 108.00|
order_by_big (10)                   | 197.00|  89.00|
order_by_big_key (10)               | 170.00|  82.00|
order_by_big_key2 (10)              | 163.00|  73.00|
order_by_big_key_desc (10)          | 172.00|  84.00|
order_by_big_key_diff (10)          | 193.00|  89.00|
order_by_big_key_prefix (10)        | 165.00|  72.00|                          


Why is the following slow on NT:
				        NT     Linux
update_of_primary_key_many_keys (256| 560.00|  65.00|
Loading