Commit aaca0e3c authored by unknown's avatar unknown

Abort patch


Build-tools/Do-compile:
  Auto merged
client/mysqldump.c:
  Aborted Serges patch as this would have caused incompatibility
  problems with old MySQL servers.
parents 8d0dafe3 40f6a9a9
......@@ -4,8 +4,8 @@ use Getopt::Long;
$opt_distribution=$opt_user=$opt_result=$opt_config_options=$opt_config_env="";
$opt_dbd_options=$opt_perl_options="";
$opt_tmp="";
$opt_help=$opt_Information=$opt_no_delete=$opt_debug=$opt_stage=$opt_rsh_mail=$opt_no_test=$opt_no_perl=$opt_with_low_memory=$opt_fast_benchmark=$opt_static_client=$opt_static_server=$opt_static_perl=$opt_sur=$opt_with_small_disk=$opt_local_perl=0;
GetOptions("Information","help","distribution=s","user=s","result=s","no-delete","no-test","perl-files=s","debug","config-options=s","config-env=s","stage=i","rsh-mail","with-low-memory","fast-benchmark","tmp=s","static-client","static-server","static-perl","no-perl","local-perl","perl-options=s","sur","with-small-disk","dbd-options=s") || usage();
$opt_help=$opt_Information=$opt_no_delete=$opt_debug=$opt_stage=$opt_rsh_mail=$opt_no_test=$opt_no_perl=$opt_with_low_memory=$opt_fast_benchmark=$opt_static_client=$opt_static_server=$opt_static_perl=$opt_sur=$opt_with_small_disk=$opt_local_perl=$opt_tcpip=0;
GetOptions("Information","help","distribution=s","user=s","result=s","no-delete","no-test","perl-files=s","debug","config-options=s","config-env=s","stage=i","rsh-mail","with-low-memory","fast-benchmark","tmp=s","static-client","static-server","static-perl","no-perl","local-perl","perl-options=s","sur","with-small-disk","dbd-options=s","tcpip") || usage();
usage() if ($opt_help || $opt_Information);
usage() if (!$opt_distribution);
......@@ -20,6 +20,7 @@ $log="$pwd/Logs/$host.log";
$opt_distribution =~ /(mysql-[^\/]*)\.tar/;
$ver=$1;
$gcc_version=which("gcc");
$connect_option= ($opt_tcpip ? "--host=$host" : "");
if (defined($gcc_version) && ! $opt_config_env)
{
$tmp=`$gcc_version -v 2>&1`;
......@@ -186,7 +187,7 @@ if ($opt_stage <= 7 && !$opt_no_test)
{
safe_cd("$test_dir/sql-bench");
log_system("rm -f limits/mysql.cfg");
safe_system("perl ./crash-me --force --batch-mode");
safe_system("perl ./crash-me --force --batch-mode $connect_option");
}
if ($opt_stage <= 8 && !$opt_no_test)
......@@ -194,7 +195,7 @@ if ($opt_stage <= 8 && !$opt_no_test)
safe_cd("$test_dir/sql-bench");
log_system("rm -f output/*");
$tmp= $opt_fast_benchmark ? "--fast --user root --small-test" : "";
check_system("perl ./run-all-tests --log --die-on-errors $tmp","RUN-mysql");
check_system("perl ./run-all-tests --log --die-on-errors $connect_option $tmp","RUN-mysql");
}
if ($opt_stage <= 9 && $opt_result)
......
......@@ -238,7 +238,7 @@ Linux notes (all Linux versions)
* Linux-Alpha:: Linux-Alpha notes
* MKLinux:: MkLinux notes
* Qube2:: Qube2 Linux notes
* Linux-Ia64:: IA64 Linux notes
* Linux-Ia64::
BSD/OS notes
......@@ -650,7 +650,7 @@ Some common errors when using MySQL
Solving some common problems with MySQL
* Log Replication:: Database replication with update log
* Log Replication:: Database replication with update log
* Backup:: Database backups
* Update log:: The update log
* Slow query log:: Log of slow queries
......@@ -766,6 +766,7 @@ MySQL change history
Changes in release 3.23.x (Recommended; beta)
* News-3.23.24::
* News-3.23.23:: Changes in release 3.23.23
* News-3.23.22:: Changes in release 3.23.22
* News-3.23.21:: Changes in release 3.23.21
......@@ -9895,8 +9896,9 @@ unchecked values to @strong{MySQL} is very dangerous!
Check data sizes before passing them to @strong{MySQL}.
@item
Consider having your application connect to the database using a
different user name than the one you use for administrative purposes. Do not give
your applications any more access privileges than what they need.
different user name than the one you use for administrative purposes. Do
not give your applications any more access privileges than what they
need.
@end itemize
@item
Users of PHP:
......@@ -12302,6 +12304,11 @@ recent operation if you don't give it a value yourself. You can also set it
to the current date and time by assigning it a @code{NULL} value. @xref{Date
and time types}.
Note that @code{TIMESTAMP(X)} columns where X is 8 or 14 are reported to
be numbers while other @code{TIMESTAMP(X)} columns are reported to be
strings. This is just to ensure that one can reliable dump and restore
the table with these types!
@tindex TIME
@item TIME
......@@ -28281,17 +28288,32 @@ If you are using Access 2000, you should get and install the newest
Microsoft MDAC (@code{Microsoft Data Access Components}) from
@uref{http://www.microsoft.com/data}. This will fix the bug in Access
that when you export data to @strong{MySQL}, the table and column names
aren't specified.
aren't specified. Another way to around this bug is to upgrade to
MyODBC 2.50.33 and @strong{MySQL} 3.23.x, which together provides a
workaround for this bug!
@item
You should have a primary key in the table.
Set the `Return matching rows' MyODBC option field when connecting to
@strong{MySQL}.
@item
You should have a primary key in the table; If not, new or updated rows
may chow up as @code{#Deleted#}.
@item
You should have a timestamp in all tables you want to be able to update.
For maximum portability @code{TIMESTAMP(14)} or simple @code{TIMESTAMP}
is recommended instead of other @code{TIMESTAMP(X)} variations.
@item
Only use double float fields. Access fails when comparing with single floats.
The symptom usually is that new or updated rows may chow up as @code{#Deleted#}
or that you can't find or update rows.
@item
Set the `Return matching rows' option field when connecting to @strong{MySQL}.
If you still get the error @code{Another user has changed your data} after
adding a @code{TIMESTAMP} column the following trick may help you:
Don't use @code{table} data sheet view. Create instead a form with the
fields you want, and use that @code{form} data sheet view. You should
set the @code{DefaultValue} property for the @code{TIMESTAMP} column to
@code{NOW()}. It may be a good idea to hide the @code{TIMESTAMP} column
from the view to not confuse your users.
@item
Access on NT will report @code{BLOB} columns as @code{OLE OBJECTS}. If
you want to have @code{MEMO} columns instead, you should change the
......@@ -28303,8 +28325,8 @@ with these, change the columns to @code{DATETIME}.
In some cases, Access may generate illegal SQL queries that
@strong{MySQL} can't understand. You can fix this by selecting
@code{"Query|SQLSpecific|Pass-Through"} from the Access menu.
@end itemize
@item Borland Builder 4
When you start a query you can use the property @code{Active} or use the
method @code{Open}. Note that @code{Active} will start by automatically issue
......@@ -35673,6 +35695,7 @@ version. The replication and BerkeleyDB code is still under development,
though, so 3.23 is not released as a stable version yet.
@menu
* News-3.23.24:: Changes in release 3.23.24
* News-3.23.23:: Changes in release 3.23.23
* News-3.23.22:: Changes in release 3.23.22
* News-3.23.21:: Changes in release 3.23.21
......@@ -35699,7 +35722,16 @@ though, so 3.23 is not released as a stable version yet.
* News-3.23.0:: Changes in release 3.23.0
@end menu
@node News-3.23.23, News-3.23.22, News-3.23.x, News-3.23.x
@node News-3.23.24, News-3.23.23, News-3.23.x, News-3.23.x
@appendixsubsec Changes in release 3.23.24
@itemize @bullet
@item
To make it possibly to reliable dump and restore tables with
@code{TIMESTAMP(X)} columns, @code{MySQL} now reports columns with X
other than 14 or 8 to be strings.
@end itemize
@node News-3.23.23, News-3.23.22, News-3.23.24, News-3.23.x
@appendixsubsec Changes in release 3.23.23
@itemize @bullet
@item
......@@ -604,6 +604,28 @@ static uint getTableStructure(char *table, char* db)
DBUG_RETURN(0);
}
/* Make an sql-file, if path was given iow. option -T was given */
if (!tFlag)
{
if (path)
{
char filename[FN_REFLEN], tmp_path[FN_REFLEN];
strmov(tmp_path,path);
convert_dirname(tmp_path);
sql_file= my_fopen(fn_format(filename, table, tmp_path, ".sql", 4),
O_WRONLY, MYF(MY_WME));
if (!sql_file) /* If file couldn't be opened */
{
safe_exit(EX_MYSQLERR);
DBUG_RETURN(0);
}
write_heder(sql_file, db);
}
fprintf(sql_file, "\n#\n# Table structure for table '%s'\n#\n\n", table);
if (opt_drop)
fprintf(sql_file, "DROP TABLE IF EXISTS %s;\n",table_name);
fprintf(sql_file, "CREATE TABLE %s (\n", table_name);
}
if (cFlag)
sprintf(insert_pat, "INSERT %sINTO %s (", delayed, table_name);
else
......@@ -619,18 +641,32 @@ static uint getTableStructure(char *table, char* db)
ulong *lengths=mysql_fetch_lengths(tableRes);
if (init)
{
if (!tFlag)
fputs(",\n",sql_file);
if (cFlag)
strpos=strmov(strpos,", ");
}
init=1;
if (cFlag)
strpos=strmov(strpos,quote_name(row[SHOW_FIELDNAME],name_buff));
}
if (cFlag)
{
strpos=strmov(strpos,") VALUES ");
if (!extended_insert)
strpos=strmov(strpos,"(");
if (!tFlag)
{
if (opt_keywords)
fprintf(sql_file, " %s.%s %s", table_name,
quote_name(row[SHOW_FIELDNAME],name_buff), row[SHOW_TYPE]);
else
fprintf(sql_file, " %s %s", quote_name(row[SHOW_FIELDNAME],name_buff),
row[SHOW_TYPE]);
if (row[SHOW_DEFAULT])
{
fputs(" DEFAULT ", sql_file);
unescape(sql_file,row[SHOW_DEFAULT],lengths[SHOW_DEFAULT]);
}
if (!row[SHOW_NULL][0])
fputs(" NOT NULL", sql_file);
if (row[SHOW_EXTRA][0])
fprintf(sql_file, " %s",row[SHOW_EXTRA]);
}
}
numFields = (uint) mysql_num_rows(tableRes);
mysql_free_result(tableRes);
......@@ -638,37 +674,102 @@ static uint getTableStructure(char *table, char* db)
{
/* Make an sql-file, if path was given iow. option -T was given */
char buff[20+FN_REFLEN];
sprintf(buff,"show create table %s",table_name);
uint keynr,primary_key;
sprintf(buff,"show keys from %s",table_name);
if (mysql_query(sock, buff))
{
fprintf(stderr, "%s: Can't get CREATE TABLE for table '%s' (%s)\n",
fprintf(stderr, "%s: Can't get keys for table '%s' (%s)\n",
my_progname, table, mysql_error(sock));
if (sql_file != stdout)
my_fclose(sql_file, MYF(MY_WME));
safe_exit(EX_MYSQLERR);
DBUG_RETURN(0);
}
if (path)
tableRes=mysql_store_result(sock);
/* Find first which key is primary key */
keynr=0;
primary_key=INT_MAX;
while ((row=mysql_fetch_row(tableRes)))
{
char filename[FN_REFLEN], tmp_path[FN_REFLEN];
strmov(tmp_path,path);
convert_dirname(tmp_path);
sql_file= my_fopen(fn_format(filename, table, tmp_path, ".sql", 4),
O_WRONLY, MYF(MY_WME));
if (!sql_file) /* If file couldn't be opened */
if (atoi(row[3]) == 1)
{
safe_exit(EX_MYSQLERR);
DBUG_RETURN(0);
keynr++;
#ifdef FORCE_PRIMARY_KEY
if (atoi(row[1]) == 0 && primary_key == INT_MAX)
primary_key=keynr;
#endif
if (!strcmp(row[2],"PRIMARY"))
{
primary_key=keynr;
break;
}
}
write_heder(sql_file, db);
}
fprintf(sql_file, "\n#\n# Table structure for table '%s'\n#\n\n", table);
if (opt_drop)
fprintf(sql_file, "DROP TABLE IF EXISTS %s;\n",table_name);
mysql_data_seek(tableRes,0);
keynr=0;
while ((row=mysql_fetch_row(tableRes)))
{
if (atoi(row[3]) == 1)
{
if (keynr++)
putc(')', sql_file);
if (atoi(row[1])) /* Test if duplicate key */
/* Duplicate allowed */
fprintf(sql_file, ",\n KEY %s (",quote_name(row[2],name_buff));
else if (keynr == primary_key)
fputs(",\n PRIMARY KEY (",sql_file); /* First UNIQUE is primary */
else
fprintf(sql_file, ",\n UNIQUE %s (",quote_name(row[2],name_buff));
}
else
putc(',', sql_file);
fputs(quote_name(row[4],name_buff), sql_file);
if (row[7])
fprintf(sql_file, "(%s)",row[7]); /* Sub key */
}
if (keynr)
putc(')', sql_file);
fputs("\n)",sql_file);
tableRes=mysql_store_result(sock);
row=mysql_fetch_row(tableRes);
fprintf(sql_file, "%s;\n", row[1]);
/* Get MySQL specific create options */
if (create_options)
{
sprintf(buff,"show table status like '%s'",table);
if (mysql_query(sock, buff))
{
if (mysql_errno(sock) != ER_PARSE_ERROR)
{ /* If old MySQL version */
if (verbose)
fprintf(stderr,
"# Warning: Couldn't get status information for table '%s' (%s)\n",
table,mysql_error(sock));
}
}
else if (!(tableRes=mysql_store_result(sock)) ||
!(row=mysql_fetch_row(tableRes)))
{
fprintf(stderr,
"Error: Couldn't read status information for table '%s' (%s)\n",
table,mysql_error(sock));
}
else
{
fputs("/*!",sql_file);
print_value(sql_file,tableRes,row,"type=","Type",0);
print_value(sql_file,tableRes,row,"","Create_options",0);
print_value(sql_file,tableRes,row,"comment=","Comment",1);
fputs(" */",sql_file);
}
mysql_free_result(tableRes); /* Is always safe to free */
}
fputs(";\n", sql_file);
}
if (cFlag)
{
strpos=strmov(strpos,") VALUES ");
if (!extended_insert)
strpos=strmov(strpos,"(");
}
DBUG_RETURN(numFields);
} /* getTableStructure */
......@@ -841,7 +942,7 @@ static void dumpTable(uint numFields, char *table)
{
if (length)
{
if (!IS_NUM(field->type))
if (!IS_NUM_FIELD(field))
{
if (dynstr_realloc(&extended_row,length * 2+2))
{
......@@ -873,7 +974,7 @@ static void dumpTable(uint numFields, char *table)
putchar(',');
if (row[i])
{
if (!IS_NUM(field->type))
if (!IS_NUM_FIELD(field))
unescape(stdout, row[i], lengths[i]);
else
fputs(row[i],stdout);
......@@ -945,7 +1046,7 @@ static char *getTableName(int reset)
}
if ((row = mysql_fetch_row(res)))
return((char*) row[0]);
if (reset)
mysql_data_seek(res,0); /* We want to read again */
else
......@@ -1033,14 +1134,14 @@ static int dump_all_tables_in_db(char *database)
dynstr_append(&query, " READ /*!32311 LOCAL */,");
}
if (numrows && mysql_real_query(sock, query.str, query.length-1))
DBerror(sock, "when using LOCK TABLES");
DBerror(sock, "when using LOCK TABLES");
/* We shall continue here, if --force was given */
dynstr_free(&query);
}
if (flush_logs)
{
if (mysql_refresh(sock, REFRESH_LOG))
DBerror(sock, "when doing refresh");
DBerror(sock, "when doing refresh");
/* We shall continue here, if --force was given */
}
while ((table = getTableName(0)))
......@@ -1074,14 +1175,14 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
dynstr_append(&query, " READ /*!32311 LOCAL */,");
}
if (mysql_real_query(sock, query.str, query.length-1))
DBerror(sock, "when doing LOCK TABLES");
DBerror(sock, "when doing LOCK TABLES");
/* We shall countinue here, if --force was given */
dynstr_free(&query);
}
if (flush_logs)
{
if (mysql_refresh(sock, REFRESH_LOG))
DBerror(sock, "when doing refresh");
DBerror(sock, "when doing refresh");
/* We shall countinue here, if --force was given */
}
for (; tables > 0 ; tables-- , table_names++)
......@@ -1157,7 +1258,7 @@ int main(int argc, char **argv)
else if (argc > 1 && !opt_databases)
dump_selected_tables(*argv, (argv + 1), (argc - 1));
/* One or more databases, all tables */
else
else
dump_databases(argv);
if (opt_first_slave)
......
......@@ -73,6 +73,8 @@ extern char *mysql_unix_port;
#define IS_NOT_NULL(n) ((n) & NOT_NULL_FLAG)
#define IS_BLOB(n) ((n) & BLOB_FLAG)
#define IS_NUM(t) ((t) <= FIELD_TYPE_INT24 || (t) == FIELD_TYPE_YEAR)
#define IS_NUM_FIELD(f) ((f)->flags & NUM_FLAG)
#define INTERNAL_NUM_FIELD(f) (((f)->type <= FIELD_TYPE_INT24 && (f)->type != FIELD_TYPE_TIMESTAMP || (f)->length == 14 || (f)->length == 8) || (f)->type == FIELD_TYPE_YEAR)
typedef struct st_mysql_field {
char *name; /* Name of column */
......
......@@ -61,6 +61,7 @@ enum enum_server_command {COM_SLEEP,COM_QUIT,COM_INIT_DB,COM_QUERY,
#define AUTO_INCREMENT_FLAG 512 /* field is a autoincrement field */
#define TIMESTAMP_FLAG 1024 /* Field is a timestamp */
#define SET_FLAG 2048 /* field is a set */
#define NUM_FLAG 32768 /* Field is num (for clients) */
#define PART_KEY_FLAG 16384 /* Intern; Part of some key */
#define GROUP_FLAG 32768 /* Intern: Group field */
#define UNIQUE_FLAG 65536 /* Intern: Used by sql_yacc */
......
......@@ -852,6 +852,8 @@ unpack_fields(MYSQL_DATA *data,MEM_ROOT *alloc,uint fields,
field->flags= (uint) (uchar) row->data[4][0];
field->decimals=(uint) (uchar) row->data[4][1];
}
if (INTERNAL_NUM_FIELD(field))
field->flags|= NUM_FLAG;
if (default_value && row->data[5])
field->def=strdup_root(alloc,(char*) row->data[5]);
else
......
......@@ -310,7 +310,7 @@ then
echo
echo "The latest information about MySQL is available on the web at"
echo "http://www.mysql.com"
echo "Support MySQL by buying support/licenses at http://www.mysql.com/license.htmy."
echo "Support MySQL by buying support/licenses at https://order.mysql.com"
echo
exit 0
else
......
Testing server 'MySQL 3.23.17a alpha' at 2000-06-02 17:36:42
ATIS table test
Creating tables
Time for create_table (28): 1 wallclock secs ( 0.02 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Inserting data
Time to insert (9768): 5 wallclock secs ( 0.88 usr 1.38 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Retrieving data
Time for select_simple_join (500): 3 wallclock secs ( 1.58 usr 0.66 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_join (200): 22 wallclock secs (12.86 usr 5.22 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_distinct (800): 17 wallclock secs ( 4.78 usr 1.80 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_group (2800): 20 wallclock secs ( 3.55 usr 1.13 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Removing tables
Time to drop_table (28): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 68 wallclock secs (23.67 usr 10.17 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.23 beta' at 2000-09-01 1:23:52
ATIS table test
Creating tables
Time for create_table (28): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Inserting data
Time to insert (9768): 5 wallclock secs ( 0.69 usr 1.47 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Retrieving data
Time for select_simple_join (500): 4 wallclock secs ( 1.47 usr 0.69 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_join (200): 22 wallclock secs (13.20 usr 5.34 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_distinct (800): 17 wallclock secs ( 4.75 usr 1.70 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_group (2800): 19 wallclock secs ( 3.31 usr 0.98 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Removing tables
Time to drop_table (28): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 67 wallclock secs (23.42 usr 10.20 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Benchmark DBD suite: 2.8
Date of test: 2000-06-02 23:00:05
Running tests on: Windows NT Version 4.0
Arguments:
Comments: Pentium 2x550 xeon, 550 Mhz, IDE
Limits from:
Server version: MySQL 3.23.17a alpha
alter-table: Total time: 2260 wallclock secs ( 0.89 usr 0.42 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
ATIS: Total time: 68 wallclock secs (23.67 usr 10.17 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
big-tables: Total time: 80 wallclock secs (17.91 usr 18.64 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
connect: Total time: 186 wallclock secs (56.84 usr 51.02 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
create: Total time: 1040 wallclock secs (13.34 usr 9.47 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
insert: Total time: 4284 wallclock secs (485.59 usr 280.22 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
select: Total time: 2255 wallclock secs (315.95 usr 115.52 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
wisconsin: Total time: 29 wallclock secs ( 8.19 usr 5.44 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Totals per operation:
Operation seconds usr sys cpu tests
alter_table_add 1201.00 0.53 0.19 0.00 992
alter_table_drop 1009.00 0.23 0.09 0.00 496
connect 34.00 11.53 10.31 0.00 10000
connect+select_1_row 39.00 12.75 13.53 0.00 10000
connect+select_simple 37.00 12.56 11.92 0.00 10000
count 40.00 0.11 0.05 0.00 100
count_distinct 69.00 1.17 0.41 0.00 1000
count_distinct_big 1229.00 224.25 81.19 0.00 1020
count_distinct_group 152.00 2.81 0.92 0.00 1000
count_distinct_group_on_key 38.00 0.70 0.17 0.00 1000
count_distinct_group_on_key_parts 153.00 2.61 1.03 0.00 1000
count_group_on_key_parts 34.00 2.64 1.00 0.00 1000
count_on_key 347.00 21.47 8.38 0.00 50100
create+drop 123.00 3.36 2.61 0.00 10000
create_MANY_tables 232.00 2.97 1.23 0.00 10000
create_index 25.00 0.00 0.00 0.00 8
create_key+drop 156.00 5.13 2.78 0.00 10000
create_table 1.00 0.02 0.00 0.00 31
delete_big 21.00 0.00 0.00 0.00 13
delete_big_many_keys 438.00 0.00 0.00 0.00 2
delete_key 6.00 0.84 1.30 0.00 10000
drop_index 25.00 0.00 0.00 0.00 8
drop_table 0.00 0.00 0.00 0.00 28
drop_table_when_MANY_tables 223.00 0.80 1.34 0.00 10000
insert 235.00 34.08 47.74 0.00 350768
insert_duplicates 38.00 8.48 12.98 0.00 300000
insert_key 1418.00 13.78 12.97 0.00 100000
insert_many_fields 22.00 0.58 0.49 0.00 2000
min_max 18.00 0.05 0.00 0.00 60
min_max_on_key 175.00 37.82 14.90 0.00 85000
multiple_value_insert 10.00 2.59 0.14 0.00 100000
order_by 98.00 62.59 25.67 0.00 10
order_by_key 88.00 62.23 25.44 0.00 10
outer_join 115.00 0.00 0.00 0.00 10
outer_join_found 102.00 0.01 0.00 0.00 10
outer_join_not_found 54.00 0.02 0.00 0.00 500
outer_join_on_key 37.00 0.05 0.00 0.00 10
select_1_row 5.00 1.11 1.91 0.00 10000
select_2_rows 7.00 1.23 1.58 0.00 10000
select_big 142.00 78.10 33.81 0.00 10080
select_column+column 6.00 1.05 1.86 0.00 10000
select_diff_key 138.00 0.52 0.16 0.00 500
select_distinct 17.00 4.78 1.80 0.00 800
select_group 51.00 3.64 1.15 0.00 2911
select_group_when_MANY_tables 306.00 1.09 1.50 0.00 10000
select_join 22.00 12.86 5.22 0.00 200
select_key 201.00 92.41 38.77 0.00 200000
select_key_prefix 198.00 93.94 37.94 0.00 200000
select_many_fields 55.00 17.33 18.16 0.00 2000
select_range 213.00 37.28 12.82 0.00 25420
select_range_prefix 28.00 9.94 4.00 0.00 25010
select_simple 4.00 0.94 1.67 0.00 10000
select_simple_join 3.00 1.58 0.66 0.00 500
update_big 64.00 0.00 0.01 0.00 500
update_of_key 468.00 4.61 6.75 0.00 756
update_of_key_big 33.00 0.05 0.05 0.00 501
update_with_key 185.00 25.34 40.66 0.00 100000
wisc_benchmark 9.00 5.66 1.53 0.00 114
TOTALS 10191.00 921.17 488.93 0.00 1685468
Benchmark DBD suite: 2.9
Date of test: 2000-09-01 3:34:21
Running tests on: Windows NT Version 4.0
Arguments:
Comments: Pentium 2x550 xeon, 550 Mhz, IDE
Limits from:
Server version: MySQL 3.23.23 beta
alter-table: Total time: 2313 wallclock secs ( 0.84 usr 0.34 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
ATIS: Total time: 67 wallclock secs (23.42 usr 10.20 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
big-tables: Total time: 79 wallclock secs (18.42 usr 19.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
connect: Total time: 185 wallclock secs (59.45 usr 51.06 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
create: Total time: 852 wallclock secs (14.36 usr 9.64 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
insert: Total time: 4332 wallclock secs (490.00 usr 278.16 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
select: Total time: 2278 wallclock secs (313.80 usr 117.34 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
wisconsin: Total time: 28 wallclock secs ( 7.91 usr 5.50 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
All 8 test executed successfully
Totals per operation:
Operation seconds usr sys cpu tests
alter_table_add 1228.00 0.55 0.17 0.00 992
alter_table_drop 1033.00 0.17 0.08 0.00 496
connect 33.00 11.69 10.25 0.00 10000
connect+select_1_row 39.00 11.72 12.45 0.00 10000
connect+select_simple 36.00 12.89 11.09 0.00 10000
count 39.00 0.14 0.03 0.00 100
count_distinct 75.00 1.13 0.31 0.00 1000
count_distinct_big 1223.00 223.30 83.02 0.00 1020
count_distinct_group 157.00 2.50 1.09 0.00 1000
count_distinct_group_on_key 40.00 0.81 0.23 0.00 1000
count_distinct_group_on_key_parts 158.00 2.78 1.14 0.00 1000
count_group_on_key_parts 40.00 2.53 0.92 0.00 1000
count_on_key 345.00 22.07 8.56 0.00 50100
create+drop 128.00 3.75 2.59 0.00 10000
create_MANY_tables 219.00 2.70 1.36 0.00 10000
create_index 25.00 0.00 0.00 0.00 8
create_key+drop 161.00 5.14 2.31 0.00 10000
create_table 0.00 0.00 0.00 0.00 31
delete_big 22.00 0.00 0.02 0.00 13
delete_big_many_keys 412.00 0.00 0.00 0.00 2
delete_key 7.00 0.73 1.13 0.00 10000
drop_index 27.00 0.00 0.00 0.00 8
drop_table 0.00 0.00 0.00 0.00 28
drop_table_when_MANY_tables 153.00 1.09 1.41 0.00 10000
insert 236.00 34.70 45.91 0.00 350768
insert_duplicates 59.00 8.80 11.75 0.00 300000
insert_key 1434.00 14.73 12.73 0.00 100000
insert_many_fields 21.00 0.82 0.31 0.00 2000
min_max 18.00 0.03 0.02 0.00 60
min_max_on_key 180.00 36.53 14.18 0.00 85000
multiple_value_insert 9.00 2.48 0.19 0.00 100000
order_by 98.00 62.34 25.09 0.00 10
order_by_key 88.00 63.17 24.64 0.00 10
outer_join 118.00 0.01 0.00 0.00 10
outer_join_found 104.00 0.02 0.00 0.00 10
outer_join_not_found 59.00 0.02 0.00 0.00 500
outer_join_on_key 40.00 0.00 0.01 0.00 10
select_1_row 5.00 0.95 2.00 0.00 10000
select_2_rows 5.00 1.30 1.92 0.00 10000
select_big 145.00 81.09 35.81 0.00 10080
select_column+column 6.00 1.11 1.64 0.00 10000
select_diff_key 124.00 0.48 0.05 0.00 500
select_distinct 17.00 4.75 1.70 0.00 800
select_group 52.00 3.45 0.98 0.00 2911
select_group_when_MANY_tables 191.00 1.67 1.97 0.00 10000
select_join 22.00 13.20 5.34 0.00 200
select_key 201.00 92.67 41.23 0.00 200000
select_key_prefix 200.00 92.94 38.81 0.00 200000
select_many_fields 56.00 17.60 18.74 0.00 2000
select_range 219.00 37.55 12.72 0.00 25420
select_range_prefix 27.00 9.96 4.16 0.00 25010
select_simple 4.00 1.03 1.67 0.00 10000
select_simple_join 4.00 1.47 0.69 0.00 500
update_big 68.00 0.02 0.00 0.00 500
update_of_key 490.00 4.80 6.55 0.00 756
update_of_key_big 34.00 0.05 0.06 0.00 501
update_with_key 188.00 26.88 40.59 0.00 100000
wisc_benchmark 9.00 5.69 1.53 0.00 114
TOTALS 10131.00 928.00 491.15 0.00 1695468
Testing server 'MySQL 3.23.17a alpha' at 2000-06-02 16:59:02
Testing of ALTER TABLE
Testing with 1000 columns and 1000 rows in 20 steps
Insert data into the table
Time for insert (1000) 0 wallclock secs ( 0.13 usr 0.13 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for alter_table_add (992): 1201 wallclock secs ( 0.53 usr 0.19 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for create_index (8): 25 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for drop_index (8): 25 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for alter_table_drop (496): 1009 wallclock secs ( 0.23 usr 0.09 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 2260 wallclock secs ( 0.89 usr 0.42 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.23 beta' at 2000-09-01 0:45:18
Testing of ALTER TABLE
Testing with 1000 columns and 1000 rows in 20 steps
Insert data into the table
Time for insert (1000) 0 wallclock secs ( 0.13 usr 0.09 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for alter_table_add (992): 1228 wallclock secs ( 0.55 usr 0.17 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for create_index (8): 25 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for drop_index (8): 27 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for alter_table_drop (496): 1033 wallclock secs ( 0.17 usr 0.08 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 2313 wallclock secs ( 0.84 usr 0.34 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.17a alpha' at 2000-06-02 17:37:50
Testing of some unusual tables
All tests are done 1000 times with 1000 fields
Testing table with 1000 fields
Testing select * from table with 1 record
Time to select_many_fields(1000): 20 wallclock secs ( 8.56 usr 9.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing select all_fields from table with 1 record
Time to select_many_fields(1000): 35 wallclock secs ( 8.77 usr 9.11 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing insert VALUES()
Time to insert_many_fields(1000): 3 wallclock secs ( 0.39 usr 0.30 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing insert (all_fields) VALUES()
Time to insert_many_fields(1000): 19 wallclock secs ( 0.19 usr 0.19 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 80 wallclock secs (17.91 usr 18.64 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.23 beta' at 2000-09-01 1:25:00
Testing of some unusual tables
All tests are done 1000 times with 1000 fields
Testing table with 1000 fields
Testing select * from table with 1 record
Time to select_many_fields(1000): 20 wallclock secs ( 8.72 usr 9.24 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing select all_fields from table with 1 record
Time to select_many_fields(1000): 36 wallclock secs ( 8.88 usr 9.50 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing insert VALUES()
Time to insert_many_fields(1000): 3 wallclock secs ( 0.66 usr 0.17 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing insert (all_fields) VALUES()
Time to insert_many_fields(1000): 18 wallclock secs ( 0.16 usr 0.14 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 79 wallclock secs (18.42 usr 19.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.17a alpha' at 2000-06-02 22:55:01
Testing the speed of connecting to the server and sending of data
All tests are done 10000 times
Testing connection/disconnect
Time to connect (10000): 34 wallclock secs (11.53 usr 10.31 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Test connect/simple select/disconnect
Time for connect+select_simple (10000): 37 wallclock secs (12.56 usr 11.92 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Test simple select
Time for select_simple (10000): 4 wallclock secs ( 0.94 usr 1.67 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing connect/select 1 row from table/disconnect
Time to connect+select_1_row (10000): 39 wallclock secs (12.75 usr 13.53 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing select 1 row from table
Time to select_1_row (10000): 5 wallclock secs ( 1.11 usr 1.91 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing select 2 rows from table
Time to select_2_rows (10000): 7 wallclock secs ( 1.23 usr 1.58 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Test select with aritmetic (+)
Time for select_column+column (10000): 6 wallclock secs ( 1.05 usr 1.86 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing retrieval of big records (65000 bytes)
Time to select_big (10000): 54 wallclock secs (15.66 usr 8.23 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 186 wallclock secs (56.84 usr 51.02 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.23 beta' at 2000-09-01 1:26:20
Testing the speed of connecting to the server and sending of data
All tests are done 10000 times
Testing connection/disconnect
Time to connect (10000): 33 wallclock secs (11.69 usr 10.25 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Test connect/simple select/disconnect
Time for connect+select_simple (10000): 36 wallclock secs (12.89 usr 11.09 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Test simple select
Time for select_simple (10000): 4 wallclock secs ( 1.03 usr 1.67 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing connect/select 1 row from table/disconnect
Time to connect+select_1_row (10000): 39 wallclock secs (11.72 usr 12.45 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing select 1 row from table
Time to select_1_row (10000): 5 wallclock secs ( 0.95 usr 2.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing select 2 rows from table
Time to select_2_rows (10000): 5 wallclock secs ( 1.30 usr 1.92 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Test select with aritmetic (+)
Time for select_column+column (10000): 6 wallclock secs ( 1.11 usr 1.64 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing retrieval of big records (65000 bytes)
Time to select_big (10000): 57 wallclock secs (18.77 usr 10.03 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 185 wallclock secs (59.45 usr 51.06 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.17a alpha' at 2000-06-02 17:41:14
Testing the speed of creating and droping tables
Testing with 10000 tables and 10000 loop count
Testing create of tables
Time for create_MANY_tables (10000): 232 wallclock secs ( 2.97 usr 1.23 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Accessing tables
Time to select_group_when_MANY_tables (10000): 306 wallclock secs ( 1.09 usr 1.50 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing drop
Time for drop_table_when_MANY_tables (10000): 223 wallclock secs ( 0.80 usr 1.34 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing create+drop
Time for create+drop (10000): 123 wallclock secs ( 3.36 usr 2.61 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for create_key+drop (10000): 156 wallclock secs ( 5.13 usr 2.78 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 1040 wallclock secs (13.34 usr 9.47 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.23 beta' at 2000-09-01 1:29:26
Testing the speed of creating and droping tables
Testing with 10000 tables and 10000 loop count
Testing create of tables
Time for create_MANY_tables (10000): 219 wallclock secs ( 2.70 usr 1.36 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Accessing tables
Time to select_group_when_MANY_tables (10000): 191 wallclock secs ( 1.67 usr 1.97 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing drop
Time for drop_table_when_MANY_tables (10000): 153 wallclock secs ( 1.09 usr 1.41 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing create+drop
Time for create+drop (10000): 128 wallclock secs ( 3.75 usr 2.59 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for create_key+drop (10000): 161 wallclock secs ( 5.14 usr 2.31 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 852 wallclock secs (14.36 usr 9.64 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.17a alpha' at 2000-06-02 17:58:36
Testing the speed of inserting data into 1 table and do some selects on it.
The tests are done with a table that has 100000 rows.
Generating random keys
Creating tables
Inserting 100000 rows in order
Inserting 100000 rows in reverse order
Inserting 100000 rows in random order
Time for insert (300000): 204 wallclock secs (29.41 usr 41.03 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing insert of duplicates
Time for insert_duplicates (300000): 38 wallclock secs ( 8.48 usr 12.98 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Retrieving data from the table
Time for select_big (10:3000000): 87 wallclock secs (62.05 usr 25.47 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for order_by_key (10:3000000): 88 wallclock secs (62.23 usr 25.44 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for order_by (10:3000000): 98 wallclock secs (62.59 usr 25.67 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_diff_key (500:1000): 138 wallclock secs ( 0.52 usr 0.16 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range_prefix (5010:42084): 15 wallclock secs ( 4.33 usr 1.58 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range (5010:42084): 15 wallclock secs ( 4.53 usr 1.78 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_key_prefix (200000): 198 wallclock secs (93.94 usr 37.94 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_key (200000): 201 wallclock secs (92.41 usr 38.77 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Test of compares with simple ranges
Time for select_range_prefix (20000:43500): 13 wallclock secs ( 5.61 usr 2.42 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range (20000:43500): 13 wallclock secs ( 5.55 usr 2.27 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_group (111): 31 wallclock secs ( 0.09 usr 0.02 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for min_max_on_key (15000): 14 wallclock secs ( 6.27 usr 2.73 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for min_max (60): 18 wallclock secs ( 0.05 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_on_key (100): 26 wallclock secs ( 0.06 usr 0.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count (100): 40 wallclock secs ( 0.11 usr 0.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_big (20): 95 wallclock secs ( 0.05 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing update of keys with functions
Time for update_of_key (500): 62 wallclock secs ( 4.58 usr 6.73 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for update_of_key_big (501): 33 wallclock secs ( 0.05 usr 0.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing update with key
Time for update_with_key (100000): 185 wallclock secs (25.34 usr 40.66 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing update of all rows
Time for update_big (500): 64 wallclock secs ( 0.00 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing left outer join
Time for outer_join_on_key (10:10): 37 wallclock secs ( 0.05 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for outer_join (10:10): 115 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for outer_join_found (10:10): 102 wallclock secs ( 0.01 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for outer_join_not_found (500:10): 54 wallclock secs ( 0.02 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing delete
Time for delete_key (10000): 6 wallclock secs ( 0.84 usr 1.30 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for delete_big (12): 21 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Insert into table with 16 keys and with a primary key with 16 parts
Time for insert_key (100000): 1418 wallclock secs (13.78 usr 12.97 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing update of keys
Time for update_of_key (256): 406 wallclock secs ( 0.03 usr 0.02 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Deleting everything from table
Time for delete_big_many_keys (2): 438 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Inserting 100000 rows with multiple values
Time for multiple_value_insert (100000): 10 wallclock secs ( 2.59 usr 0.14 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for drop table(1): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 4284 wallclock secs (485.59 usr 280.22 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.23 beta' at 2000-09-01 1:43:39
Testing the speed of inserting data into 1 table and do some selects on it.
The tests are done with a table that has 100000 rows.
Generating random keys
Creating tables
Inserting 100000 rows in order
Inserting 100000 rows in reverse order
Inserting 100000 rows in random order
Time for insert (300000): 206 wallclock secs (30.56 usr 39.33 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing insert of duplicates
Time for insert_duplicates (300000): 59 wallclock secs ( 8.80 usr 11.75 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Retrieving data from the table
Time for select_big (10:3000000): 87 wallclock secs (61.98 usr 25.58 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for order_by_key (10:3000000): 88 wallclock secs (63.17 usr 24.64 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for order_by (10:3000000): 98 wallclock secs (62.34 usr 25.09 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_diff_key (500:1000): 124 wallclock secs ( 0.48 usr 0.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range_prefix (5010:42084): 14 wallclock secs ( 4.63 usr 1.80 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range (5010:42084): 16 wallclock secs ( 4.67 usr 1.58 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_key_prefix (200000): 200 wallclock secs (92.94 usr 38.81 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_key (200000): 201 wallclock secs (92.67 usr 41.23 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Test of compares with simple ranges
Time for select_range_prefix (20000:43500): 13 wallclock secs ( 5.33 usr 2.36 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range (20000:43500): 14 wallclock secs ( 5.75 usr 2.14 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_group (111): 33 wallclock secs ( 0.14 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for min_max_on_key (15000): 14 wallclock secs ( 6.51 usr 2.45 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for min_max (60): 18 wallclock secs ( 0.03 usr 0.02 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_on_key (100): 25 wallclock secs ( 0.01 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count (100): 39 wallclock secs ( 0.14 usr 0.03 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_big (20): 98 wallclock secs ( 0.03 usr 0.02 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing update of keys with functions
Time for update_of_key (500): 63 wallclock secs ( 4.78 usr 6.47 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for update_of_key_big (501): 34 wallclock secs ( 0.05 usr 0.06 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing update with key
Time for update_with_key (100000): 188 wallclock secs (26.88 usr 40.59 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing update of all rows
Time for update_big (500): 68 wallclock secs ( 0.02 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing left outer join
Time for outer_join_on_key (10:10): 40 wallclock secs ( 0.00 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for outer_join (10:10): 118 wallclock secs ( 0.01 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for outer_join_found (10:10): 104 wallclock secs ( 0.02 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for outer_join_not_found (500:10): 59 wallclock secs ( 0.02 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing delete
Time for delete_key (10000): 7 wallclock secs ( 0.73 usr 1.13 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for delete_big (12): 21 wallclock secs ( 0.00 usr 0.02 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Insert into table with 16 keys and with a primary key with 16 parts
Time for insert_key (100000): 1434 wallclock secs (14.73 usr 12.73 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing update of keys
Time for update_of_key (256): 427 wallclock secs ( 0.02 usr 0.08 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Deleting everything from table
Time for delete_big_many_keys (2): 412 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Inserting 100000 rows with multiple values
Time for multiple_value_insert (100000): 9 wallclock secs ( 2.48 usr 0.19 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for drop table(1): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 4332 wallclock secs (490.00 usr 278.16 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.17a alpha' at 2000-06-02 19:10:01
Testing the speed of selecting on keys that consist of many parts
The test-table has 10000 rows and the test is done with 500 ranges.
Creating table
Inserting 10000 rows
Time to insert (10000): 7 wallclock secs ( 1.27 usr 1.42 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing big selects on the table
Time for select_big (70:17207): 1 wallclock secs ( 0.39 usr 0.11 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range (410:1057904): 185 wallclock secs (27.20 usr 8.77 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for min_max_on_key (70000): 161 wallclock secs (31.55 usr 12.17 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_on_key (50000): 321 wallclock secs (21.41 usr 8.33 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_group_on_key_parts (1000:0): 34 wallclock secs ( 2.64 usr 1.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing count(distinct) on the table
Time for count_distinct (1000:2000): 69 wallclock secs ( 1.17 usr 0.41 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group_on_key (1000:6000): 38 wallclock secs ( 0.70 usr 0.17 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group_on_key_parts (1000:100000): 153 wallclock secs ( 2.61 usr 1.03 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group (1000:100000): 152 wallclock secs ( 2.81 usr 0.92 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_big (1000:10000000): 1134 wallclock secs (224.20 usr 81.19 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 2255 wallclock secs (315.95 usr 115.52 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.23 beta' at 2000-09-01 2:55:53
Testing the speed of selecting on keys that consist of many parts
The test-table has 10000 rows and the test is done with 500 ranges.
Creating table
Inserting 10000 rows
Time to insert (10000): 7 wallclock secs ( 1.23 usr 1.14 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing big selects on the table
Time for select_big (70:17207): 1 wallclock secs ( 0.34 usr 0.20 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range (410:1057904): 189 wallclock secs (27.13 usr 9.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for min_max_on_key (70000): 166 wallclock secs (30.02 usr 11.73 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_on_key (50000): 320 wallclock secs (22.06 usr 8.56 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_group_on_key_parts (1000:0): 40 wallclock secs ( 2.53 usr 0.92 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing count(distinct) on the table
Time for count_distinct (1000:2000): 75 wallclock secs ( 1.13 usr 0.31 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group_on_key (1000:6000): 40 wallclock secs ( 0.81 usr 0.23 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group_on_key_parts (1000:100000): 158 wallclock secs ( 2.78 usr 1.14 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group (1000:100000): 157 wallclock secs ( 2.50 usr 1.09 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_big (1000:10000000): 1125 wallclock secs (223.27 usr 83.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 2278 wallclock secs (313.80 usr 117.34 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.17a alpha' at 2000-06-02 19:47:36
Wisconsin benchmark test
Time for create_table (3): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Inserting data
Time to insert (31000): 19 wallclock secs ( 2.52 usr 3.91 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to delete_big (1): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Running actual benchmark
Time for wisc_benchmark (114): 9 wallclock secs ( 5.66 usr 1.53 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 29 wallclock secs ( 8.19 usr 5.44 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.23 beta' at 2000-09-01 3:33:51
Wisconsin benchmark test
Time for create_table (3): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Inserting data
Time to insert (31000): 18 wallclock secs ( 2.22 usr 3.97 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to delete_big (1): 1 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Running actual benchmark
Time for wisc_benchmark (114): 9 wallclock secs ( 5.69 usr 1.53 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 28 wallclock secs ( 7.91 usr 5.50 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
2000-09-01 Michael Widenius <monty@mysql.com>
* Avoid allocation of "localhost" string.
* Changed that TIMESTAMP(X) is sometimes as string
* Release of 3.23.23
2000-08-21 Michael Widenius <monty@mysql.com>
* Added RENAME TABLE.
......
......@@ -514,7 +514,7 @@ public:
Field_timestamp(char *ptr_arg, uint32 len_arg,
enum utype unireg_check_arg, const char *field_name_arg,
struct st_table *table_arg);
enum Item_result result_type () const { return INT_RESULT; }
enum Item_result result_type () const { return field_length == 8 || field_length == 14 ? INT_RESULT : STRING_RESULT; }
enum_field_types type() const { return FIELD_TYPE_TIMESTAMP;}
enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONG_INT; }
void store(const char *to,uint length);
......
......@@ -426,7 +426,7 @@ void sql_print_error(const char *format,...)
extern char mysql_data_home[2],server_version[50],max_sort_char,
mysql_real_data_home[];
extern my_string mysql_unix_port,mysql_tmpdir;
extern const char *first_keyword;
extern const char *first_keyword, *localhost;
extern ulong refresh_version,flush_version, thread_id,query_id,opened_tables,
created_tmp_tables, aborted_threads,aborted_connects,
delayed_insert_timeout,
......
......@@ -191,6 +191,7 @@ volatile ulong cached_thread_count=0;
// replication parameters, if master_host is not NULL, we are slaving off the master
my_string master_user = (char*) "test", master_password = 0, master_host=0,
master_info_file = (char*) "master.info";
const char *localhost=LOCAL_HOST;
uint master_port = MYSQL_PORT, master_connect_retry = 60;
ulong max_tmp_tables,max_heap_table_size;
......@@ -1981,9 +1982,9 @@ pthread_handler_decl(handle_connections_sockets,arg __attribute__((unused)))
continue;
}
if (!(vio_tmp=vio_new(new_sock,
new_sock == unix_sock ? VIO_TYPE_SOCKET :
sock == unix_sock ? VIO_TYPE_SOCKET :
VIO_TYPE_TCPIP,
new_sock == unix_sock)) ||
sock == unix_sock)) ||
my_net_init(&thd->net,vio_tmp))
{
if (vio_tmp)
......@@ -1997,14 +1998,7 @@ pthread_handler_decl(handle_connections_sockets,arg __attribute__((unused)))
continue;
}
if (sock == unix_sock)
{
if (!(thd->host=my_strdup(LOCAL_HOST,MYF(0))))
{
close_connection(&thd->net,ER_OUT_OF_RESOURCES);
delete thd;
continue;
}
}
thd->host=(char*) localhost;
create_new_thread(thd);
}
......
......@@ -150,7 +150,8 @@ THD::~THD()
DBUG_PRINT("info", ("freeing host"));
safeFree(host);
if (host != localhost) // If not pointer to constant
safeFree(host);
safeFree(user);
safeFree(db);
safeFree(ip);
......
......@@ -180,10 +180,7 @@ check_connections(THD *thd)
#if !defined(HAVE_SYS_UN_H) || defined(HAVE_mit_thread)
/* Fast local hostname resolve for Win32 */
if (!strcmp(thd->ip,"127.0.0.1"))
{
if (!(thd->host=my_strdup("localhost",MYF(0))))
return (ER_OUT_OF_RESOURCES);
}
thd->host=(char*) localhost;
else
#endif
if (!(specialflag & SPECIAL_NO_RESOLVE))
......@@ -199,9 +196,9 @@ check_connections(THD *thd)
if (acl_check_host(thd->host,thd->ip))
return(ER_HOST_NOT_PRIVILEGED);
}
else /* No hostname means that the connection was on a socket */
else /* Hostname given means that the connection was on a socket */
{
DBUG_PRINT("general",("Host: localhost"));
DBUG_PRINT("general",("Host: %s",thd->host));
thd->ip=0;
bzero((char*) &thd->remote,sizeof(struct sockaddr));
}
......@@ -561,7 +558,7 @@ bool do_command(THD *thd)
{
packet=(char*) net->read_pos;
command = (enum enum_server_command) (uchar) packet[0];
DBUG_PRINT("general",("Command on socket %s = %d (%s)",
DBUG_PRINT("general",("Command on %s = %d (%s)",
vio_description(net->vio), command,
command_name[command]));
}
......
......@@ -97,7 +97,9 @@ Vio *vio_new(my_socket sd, enum enum_vio_type type, my_bool localhost)
if ((vio = (Vio*) my_malloc(sizeof(*vio),MYF(MY_WME))))
{
vio_reset(vio, type, sd, 0, localhost);
sprintf(vio->desc, "socket (%d)", vio->sd);
sprintf(vio->desc,
(vio->type == VIO_TYPE_SOCKET ? "socket (%d)" : "TCP/IP (%d)"),
vio->sd);
#if !defined(___WIN__) && !defined(__EMX__)
#if !defined(NO_FCNTL_NONBLOCK)
vio->fcntl_mode = fcntl(sd, F_GETFL);
......
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