Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
0c07817b
Commit
0c07817b
authored
Sep 02, 2000
by
monty@donna.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Abort patch
parents
c28988e7
4496d43f
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
496 additions
and
355 deletions
+496
-355
Build-tools/Do-compile
Build-tools/Do-compile
+5
-4
Docs/manual.texi
Docs/manual.texi
+41
-9
client/mysqldump.c
client/mysqldump.c
+134
-33
include/mysql.h
include/mysql.h
+2
-0
include/mysql_com.h
include/mysql_com.h
+1
-0
libmysql/libmysql.c
libmysql/libmysql.c
+2
-0
scripts/mysql_install_db.sh
scripts/mysql_install_db.sh
+1
-1
sql-bench/Results/ATIS-mysql-NT_4.0
sql-bench/Results/ATIS-mysql-NT_4.0
+19
-19
sql-bench/Results/RUN-mysql-NT_4.0
sql-bench/Results/RUN-mysql-NT_4.0
+80
-78
sql-bench/Results/alter-table-mysql-NT_4.0
sql-bench/Results/alter-table-mysql-NT_4.0
+16
-16
sql-bench/Results/big-tables-mysql-NT_4.0
sql-bench/Results/big-tables-mysql-NT_4.0
+19
-19
sql-bench/Results/connect-mysql-NT_4.0
sql-bench/Results/connect-mysql-NT_4.0
+30
-30
sql-bench/Results/create-mysql-NT_4.0
sql-bench/Results/create-mysql-NT_4.0
+18
-18
sql-bench/Results/insert-mysql-NT_4.0
sql-bench/Results/insert-mysql-NT_4.0
+70
-70
sql-bench/Results/select-mysql-NT_4.0
sql-bench/Results/select-mysql-NT_4.0
+23
-23
sql-bench/Results/wisconsin-mysql-NT_4.0
sql-bench/Results/wisconsin-mysql-NT_4.0
+14
-14
sql/ChangeLog
sql/ChangeLog
+6
-0
sql/field.h
sql/field.h
+1
-1
sql/mysql_priv.h
sql/mysql_priv.h
+1
-1
sql/mysqld.cc
sql/mysqld.cc
+4
-10
sql/sql_class.cc
sql/sql_class.cc
+2
-1
sql/sql_parse.cc
sql/sql_parse.cc
+4
-7
sql/violite.c
sql/violite.c
+3
-1
No files found.
Build-tools/Do-compile
View file @
0c07817b
...
@@ -4,8 +4,8 @@ use Getopt::Long;
...
@@ -4,8 +4,8 @@ use Getopt::Long;
$opt_distribution
=
$opt_user
=
$opt_result
=
$opt_config_options
=
$opt_config_env
=
"";
$opt_distribution
=
$opt_user
=
$opt_result
=
$opt_config_options
=
$opt_config_env
=
"";
$opt_dbd_options
=
$opt_perl_options
=
"";
$opt_dbd_options
=
$opt_perl_options
=
"";
$opt_tmp
=
"";
$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
;
$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
")
||
usage
();
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_help
||
$opt_Information
);
usage
()
if
(
!
$opt_distribution
);
usage
()
if
(
!
$opt_distribution
);
...
@@ -20,6 +20,7 @@ $log="$pwd/Logs/$host.log";
...
@@ -20,6 +20,7 @@ $log="$pwd/Logs/$host.log";
$opt_distribution
=~
/(mysql-[^\/]*)\.tar/
;
$opt_distribution
=~
/(mysql-[^\/]*)\.tar/
;
$ver
=
$1
;
$ver
=
$1
;
$gcc_version
=
which
("
gcc
");
$gcc_version
=
which
("
gcc
");
$connect_option
=
(
$opt_tcpip
?
"
--host=
$host
"
:
"");
if
(
defined
(
$gcc_version
)
&&
!
$opt_config_env
)
if
(
defined
(
$gcc_version
)
&&
!
$opt_config_env
)
{
{
$tmp
=
`
$gcc_version
-v 2>&1
`;
$tmp
=
`
$gcc_version
-v 2>&1
`;
...
@@ -186,7 +187,7 @@ if ($opt_stage <= 7 && !$opt_no_test)
...
@@ -186,7 +187,7 @@ if ($opt_stage <= 7 && !$opt_no_test)
{
{
safe_cd
("
$test_dir
/sql-bench
");
safe_cd
("
$test_dir
/sql-bench
");
log_system
("
rm -f limits/mysql.cfg
");
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
)
if
(
$opt_stage
<=
8
&&
!
$opt_no_test
)
...
@@ -194,7 +195,7 @@ if ($opt_stage <= 8 && !$opt_no_test)
...
@@ -194,7 +195,7 @@ if ($opt_stage <= 8 && !$opt_no_test)
safe_cd
("
$test_dir
/sql-bench
");
safe_cd
("
$test_dir
/sql-bench
");
log_system
("
rm -f output/*
");
log_system
("
rm -f output/*
");
$tmp
=
$opt_fast_benchmark
?
"
--fast --user root --small-test
"
:
"";
$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
)
if
(
$opt_stage
<=
9
&&
$opt_result
)
...
...
Docs/manual.texi
View file @
0c07817b
...
@@ -238,7 +238,7 @@ Linux notes (all Linux versions)
...
@@ -238,7 +238,7 @@ Linux notes (all Linux versions)
* Linux-Alpha:: Linux-Alpha notes
* Linux-Alpha:: Linux-Alpha notes
* MKLinux:: MkLinux notes
* MKLinux:: MkLinux notes
* Qube2:: Qube2 Linux notes
* Qube2:: Qube2 Linux notes
* Linux-Ia64::
IA64 Linux notes
* Linux-Ia64::
BSD/OS notes
BSD/OS notes
...
@@ -650,7 +650,7 @@ Some common errors when using MySQL
...
@@ -650,7 +650,7 @@ Some common errors when using MySQL
Solving some common problems with MySQL
Solving some common problems with MySQL
* Log Replication:: Database replication with update log
* Log Replication:: Database replication with
update log
* Backup:: Database backups
* Backup:: Database backups
* Update log:: The update log
* Update log:: The update log
* Slow query log:: Log of slow queries
* Slow query log:: Log of slow queries
...
@@ -766,6 +766,7 @@ MySQL change history
...
@@ -766,6 +766,7 @@ MySQL change history
Changes in release 3.23.x (Recommended; beta)
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.23:: Changes in release 3.23.23
* News-3.23.22:: Changes in release 3.23.22
* News-3.23.22:: Changes in release 3.23.22
* News-3.23.21:: Changes in release 3.23.21
* News-3.23.21:: Changes in release 3.23.21
...
@@ -9895,8 +9896,9 @@ unchecked values to @strong{MySQL} is very dangerous!
...
@@ -9895,8 +9896,9 @@ unchecked values to @strong{MySQL} is very dangerous!
Check data sizes before passing them to @strong{MySQL}.
Check data sizes before passing them to @strong{MySQL}.
@item
@item
Consider having your application connect to the database using a
Consider having your application connect to the database using a
different user name than the one you use for administrative purposes. Do not give
different user name than the one you use for administrative purposes. Do
your applications any more access privileges than what they need.
not give your applications any more access privileges than what they
need.
@end itemize
@end itemize
@item
@item
Users of PHP:
Users of PHP:
...
@@ -12302,6 +12304,11 @@ recent operation if you don't give it a value yourself. You can also set it
...
@@ -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
to the current date and time by assigning it a @code{NULL} value. @xref{Date
and time types}.
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
@tindex TIME
@item TIME
@item TIME
...
@@ -28281,17 +28288,32 @@ If you are using Access 2000, you should get and install the newest
...
@@ -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
Microsoft MDAC (@code{Microsoft Data Access Components}) from
@uref{http://www.microsoft.com/data}. This will fix the bug in Access
@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
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
@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
@item
You should have a timestamp in all tables you want to be able to update.
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}
For maximum portability @code{TIMESTAMP(14)} or simple @code{TIMESTAMP}
is recommended instead of other @code{TIMESTAMP(X)} variations.
is recommended instead of other @code{TIMESTAMP(X)} variations.
@item
@item
Only use double float fields. Access fails when comparing with single floats.
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
@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
@item
Access on NT will report @code{BLOB} columns as @code{OLE OBJECTS}. If
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
you want to have @code{MEMO} columns instead, you should change the
...
@@ -28303,8 +28325,8 @@ with these, change the columns to @code{DATETIME}.
...
@@ -28303,8 +28325,8 @@ with these, change the columns to @code{DATETIME}.
In some cases, Access may generate illegal SQL queries that
In some cases, Access may generate illegal SQL queries that
@strong{MySQL} can't understand. You can fix this by selecting
@strong{MySQL} can't understand. You can fix this by selecting
@code{"Query|SQLSpecific|Pass-Through"} from the Access menu.
@code{"Query|SQLSpecific|Pass-Through"} from the Access menu.
@end itemize
@end itemize
@item Borland Builder 4
@item Borland Builder 4
When you start a query you can use the property @code{Active} or use the
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
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,
...
@@ -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.
though, so 3.23 is not released as a stable version yet.
@menu
@menu
* News-3.23.24:: Changes in release 3.23.24
* News-3.23.23:: Changes in release 3.23.23
* News-3.23.23:: Changes in release 3.23.23
* News-3.23.22:: Changes in release 3.23.22
* News-3.23.22:: Changes in release 3.23.22
* News-3.23.21:: Changes in release 3.23.21
* 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.
...
@@ -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
* News-3.23.0:: Changes in release 3.23.0
@end menu
@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
@appendixsubsec Changes in release 3.23.23
@itemize @bullet
@itemize @bullet
@item
@item
client/mysqldump.c
View file @
0c07817b
...
@@ -604,6 +604,28 @@ static uint getTableStructure(char *table, char* db)
...
@@ -604,6 +604,28 @@ static uint getTableStructure(char *table, char* db)
DBUG_RETURN
(
0
);
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
)
if
(
cFlag
)
sprintf
(
insert_pat
,
"INSERT %sINTO %s ("
,
delayed
,
table_name
);
sprintf
(
insert_pat
,
"INSERT %sINTO %s ("
,
delayed
,
table_name
);
else
else
...
@@ -619,18 +641,32 @@ static uint getTableStructure(char *table, char* db)
...
@@ -619,18 +641,32 @@ static uint getTableStructure(char *table, char* db)
ulong
*
lengths
=
mysql_fetch_lengths
(
tableRes
);
ulong
*
lengths
=
mysql_fetch_lengths
(
tableRes
);
if
(
init
)
if
(
init
)
{
{
if
(
!
tFlag
)
fputs
(
",
\n
"
,
sql_file
);
if
(
cFlag
)
if
(
cFlag
)
strpos
=
strmov
(
strpos
,
", "
);
strpos
=
strmov
(
strpos
,
", "
);
}
}
init
=
1
;
init
=
1
;
if
(
cFlag
)
if
(
cFlag
)
strpos
=
strmov
(
strpos
,
quote_name
(
row
[
SHOW_FIELDNAME
],
name_buff
));
strpos
=
strmov
(
strpos
,
quote_name
(
row
[
SHOW_FIELDNAME
],
name_buff
));
}
if
(
!
tFlag
)
if
(
cFlag
)
{
{
if
(
opt_keywords
)
strpos
=
strmov
(
strpos
,
") VALUES "
);
fprintf
(
sql_file
,
" %s.%s %s"
,
table_name
,
if
(
!
extended_insert
)
quote_name
(
row
[
SHOW_FIELDNAME
],
name_buff
),
row
[
SHOW_TYPE
]);
strpos
=
strmov
(
strpos
,
"("
);
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
);
numFields
=
(
uint
)
mysql_num_rows
(
tableRes
);
mysql_free_result
(
tableRes
);
mysql_free_result
(
tableRes
);
...
@@ -638,37 +674,102 @@ static uint getTableStructure(char *table, char* db)
...
@@ -638,37 +674,102 @@ static uint getTableStructure(char *table, char* db)
{
{
/* Make an sql-file, if path was given iow. option -T was given */
/* Make an sql-file, if path was given iow. option -T was given */
char
buff
[
20
+
FN_REFLEN
];
char
buff
[
20
+
FN_REFLEN
];
uint
keynr
,
primary_key
;
sprintf
(
buff
,
"show
create table
%s"
,
table_name
);
sprintf
(
buff
,
"show
keys from
%s"
,
table_name
);
if
(
mysql_query
(
sock
,
buff
))
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
));
my_progname
,
table
,
mysql_error
(
sock
));
if
(
sql_file
!=
stdout
)
my_fclose
(
sql_file
,
MYF
(
MY_WME
));
safe_exit
(
EX_MYSQLERR
);
safe_exit
(
EX_MYSQLERR
);
DBUG_RETURN
(
0
);
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
];
if
(
atoi
(
row
[
3
])
==
1
)
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
);
keynr
++
;
DBUG_RETURN
(
0
);
#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
);
mysql_data_seek
(
tableRes
,
0
);
if
(
opt_drop
)
keynr
=
0
;
fprintf
(
sql_file
,
"DROP TABLE IF EXISTS %s;
\n
"
,
table_name
);
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
);
/* Get MySQL specific create options */
row
=
mysql_fetch_row
(
tableRes
);
if
(
create_options
)
fprintf
(
sql_file
,
"%s;
\n
"
,
row
[
1
]);
{
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
);
DBUG_RETURN
(
numFields
);
}
/* getTableStructure */
}
/* getTableStructure */
...
@@ -841,7 +942,7 @@ static void dumpTable(uint numFields, char *table)
...
@@ -841,7 +942,7 @@ static void dumpTable(uint numFields, char *table)
{
{
if
(
length
)
if
(
length
)
{
{
if
(
!
IS_NUM
(
field
->
type
))
if
(
!
IS_NUM
_FIELD
(
field
))
{
{
if
(
dynstr_realloc
(
&
extended_row
,
length
*
2
+
2
))
if
(
dynstr_realloc
(
&
extended_row
,
length
*
2
+
2
))
{
{
...
@@ -873,7 +974,7 @@ static void dumpTable(uint numFields, char *table)
...
@@ -873,7 +974,7 @@ static void dumpTable(uint numFields, char *table)
putchar
(
','
);
putchar
(
','
);
if
(
row
[
i
])
if
(
row
[
i
])
{
{
if
(
!
IS_NUM
(
field
->
type
))
if
(
!
IS_NUM
_FIELD
(
field
))
unescape
(
stdout
,
row
[
i
],
lengths
[
i
]);
unescape
(
stdout
,
row
[
i
],
lengths
[
i
]);
else
else
fputs
(
row
[
i
],
stdout
);
fputs
(
row
[
i
],
stdout
);
...
@@ -945,7 +1046,7 @@ static char *getTableName(int reset)
...
@@ -945,7 +1046,7 @@ static char *getTableName(int reset)
}
}
if
((
row
=
mysql_fetch_row
(
res
)))
if
((
row
=
mysql_fetch_row
(
res
)))
return
((
char
*
)
row
[
0
]);
return
((
char
*
)
row
[
0
]);
if
(
reset
)
if
(
reset
)
mysql_data_seek
(
res
,
0
);
/* We want to read again */
mysql_data_seek
(
res
,
0
);
/* We want to read again */
else
else
...
@@ -1033,14 +1134,14 @@ static int dump_all_tables_in_db(char *database)
...
@@ -1033,14 +1134,14 @@ static int dump_all_tables_in_db(char *database)
dynstr_append
(
&
query
,
" READ /*!32311 LOCAL */,"
);
dynstr_append
(
&
query
,
" READ /*!32311 LOCAL */,"
);
}
}
if
(
numrows
&&
mysql_real_query
(
sock
,
query
.
str
,
query
.
length
-
1
))
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 */
/* We shall continue here, if --force was given */
dynstr_free
(
&
query
);
dynstr_free
(
&
query
);
}
}
if
(
flush_logs
)
if
(
flush_logs
)
{
{
if
(
mysql_refresh
(
sock
,
REFRESH_LOG
))
if
(
mysql_refresh
(
sock
,
REFRESH_LOG
))
DBerror
(
sock
,
"when doing refresh"
);
DBerror
(
sock
,
"when doing refresh"
);
/* We shall continue here, if --force was given */
/* We shall continue here, if --force was given */
}
}
while
((
table
=
getTableName
(
0
)))
while
((
table
=
getTableName
(
0
)))
...
@@ -1074,14 +1175,14 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
...
@@ -1074,14 +1175,14 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
dynstr_append
(
&
query
,
" READ /*!32311 LOCAL */,"
);
dynstr_append
(
&
query
,
" READ /*!32311 LOCAL */,"
);
}
}
if
(
mysql_real_query
(
sock
,
query
.
str
,
query
.
length
-
1
))
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 */
/* We shall countinue here, if --force was given */
dynstr_free
(
&
query
);
dynstr_free
(
&
query
);
}
}
if
(
flush_logs
)
if
(
flush_logs
)
{
{
if
(
mysql_refresh
(
sock
,
REFRESH_LOG
))
if
(
mysql_refresh
(
sock
,
REFRESH_LOG
))
DBerror
(
sock
,
"when doing refresh"
);
DBerror
(
sock
,
"when doing refresh"
);
/* We shall countinue here, if --force was given */
/* We shall countinue here, if --force was given */
}
}
for
(;
tables
>
0
;
tables
--
,
table_names
++
)
for
(;
tables
>
0
;
tables
--
,
table_names
++
)
...
@@ -1157,7 +1258,7 @@ int main(int argc, char **argv)
...
@@ -1157,7 +1258,7 @@ int main(int argc, char **argv)
else
if
(
argc
>
1
&&
!
opt_databases
)
else
if
(
argc
>
1
&&
!
opt_databases
)
dump_selected_tables
(
*
argv
,
(
argv
+
1
),
(
argc
-
1
));
dump_selected_tables
(
*
argv
,
(
argv
+
1
),
(
argc
-
1
));
/* One or more databases, all tables */
/* One or more databases, all tables */
else
else
dump_databases
(
argv
);
dump_databases
(
argv
);
if
(
opt_first_slave
)
if
(
opt_first_slave
)
...
...
include/mysql.h
View file @
0c07817b
...
@@ -73,6 +73,8 @@ extern char *mysql_unix_port;
...
@@ -73,6 +73,8 @@ extern char *mysql_unix_port;
#define IS_NOT_NULL(n) ((n) & NOT_NULL_FLAG)
#define IS_NOT_NULL(n) ((n) & NOT_NULL_FLAG)
#define IS_BLOB(n) ((n) & BLOB_FLAG)
#define IS_BLOB(n) ((n) & BLOB_FLAG)
#define IS_NUM(t) ((t) <= FIELD_TYPE_INT24 || (t) == FIELD_TYPE_YEAR)
#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
{
typedef
struct
st_mysql_field
{
char
*
name
;
/* Name of column */
char
*
name
;
/* Name of column */
...
...
include/mysql_com.h
View file @
0c07817b
...
@@ -61,6 +61,7 @@ enum enum_server_command {COM_SLEEP,COM_QUIT,COM_INIT_DB,COM_QUERY,
...
@@ -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 AUTO_INCREMENT_FLAG 512
/* field is a autoincrement field */
#define TIMESTAMP_FLAG 1024
/* Field is a timestamp */
#define TIMESTAMP_FLAG 1024
/* Field is a timestamp */
#define SET_FLAG 2048
/* field is a set */
#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 PART_KEY_FLAG 16384
/* Intern; Part of some key */
#define GROUP_FLAG 32768
/* Intern: Group field */
#define GROUP_FLAG 32768
/* Intern: Group field */
#define UNIQUE_FLAG 65536
/* Intern: Used by sql_yacc */
#define UNIQUE_FLAG 65536
/* Intern: Used by sql_yacc */
...
...
libmysql/libmysql.c
View file @
0c07817b
...
@@ -852,6 +852,8 @@ unpack_fields(MYSQL_DATA *data,MEM_ROOT *alloc,uint fields,
...
@@ -852,6 +852,8 @@ unpack_fields(MYSQL_DATA *data,MEM_ROOT *alloc,uint fields,
field
->
flags
=
(
uint
)
(
uchar
)
row
->
data
[
4
][
0
];
field
->
flags
=
(
uint
)
(
uchar
)
row
->
data
[
4
][
0
];
field
->
decimals
=
(
uint
)
(
uchar
)
row
->
data
[
4
][
1
];
field
->
decimals
=
(
uint
)
(
uchar
)
row
->
data
[
4
][
1
];
}
}
if
(
INTERNAL_NUM_FIELD
(
field
))
field
->
flags
|=
NUM_FLAG
;
if
(
default_value
&&
row
->
data
[
5
])
if
(
default_value
&&
row
->
data
[
5
])
field
->
def
=
strdup_root
(
alloc
,(
char
*
)
row
->
data
[
5
]);
field
->
def
=
strdup_root
(
alloc
,(
char
*
)
row
->
data
[
5
]);
else
else
...
...
scripts/mysql_install_db.sh
View file @
0c07817b
...
@@ -310,7 +310,7 @@ then
...
@@ -310,7 +310,7 @@ then
echo
echo
echo
"The latest information about MySQL is available on the web at"
echo
"The latest information about MySQL is available on the web at"
echo
"http://www.mysql.com"
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 http
s://order.mysql.com
"
echo
echo
exit
0
exit
0
else
else
...
...
sql-bench/Results/ATIS-mysql-NT_4.0
View file @
0c07817b
Testing server 'MySQL 3.23.
17a alpha' at 2000-06-02 17:36:42
Testing server 'MySQL 3.23.
23 beta' at 2000-09-01 1:23:52
ATIS table test
ATIS table test
Creating tables
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)
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
Inserting data
Time to insert (9768): 5 wallclock secs ( 0.
88 usr 1.38 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to insert (9768): 5 wallclock secs ( 0.
69 usr 1.47 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Retrieving data
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_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 (1
2.86 usr 5.22 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_join (200): 22 wallclock secs (1
3.20 usr 5.34 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_distinct (800): 17 wallclock secs ( 4.7
8 usr 1.80 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_distinct (800): 17 wallclock secs ( 4.7
5 usr 1.70 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)
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
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)
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: 6
8 wallclock secs (23.67 usr 10.17 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 6
7 wallclock secs (23.42 usr 10.20 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
sql-bench/Results/RUN-mysql-NT_4.0
View file @
0c07817b
Benchmark DBD suite: 2.8
Benchmark DBD suite: 2.9
Date of test: 2000-06-02 23:00:05
Date of test: 2000-09-01 3:34:21
Running tests on: Windows NT Version 4.0
Running tests on: Windows NT Version 4.0
Arguments:
Arguments:
Comments: Pentium 2x550 xeon, 550 Mhz, IDE
Comments: Pentium 2x550 xeon, 550 Mhz, IDE
Limits from:
Limits from:
Server version: MySQL 3.23.17a alpha
Server version: MySQL 3.23.23 beta
alter-table: Total time: 2260 wallclock secs ( 0.89 usr 0.42 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
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: 68 wallclock secs (23.67 usr 10.17 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: 80 wallclock secs (17.91 usr 18.64 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: 186 wallclock secs (56.84 usr 51.02 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: 1040 wallclock secs (13.34 usr 9.47 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: 4284 wallclock secs (485.59 usr 280.22 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: 2255 wallclock secs (315.95 usr 115.52 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: 29 wallclock secs ( 8.19 usr 5.44 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)
Totals per operation:
All 8 test executed successfully
Operation seconds usr sys cpu tests
alter_table_add 1201.00 0.53 0.19 0.00 992
Totals per operation:
alter_table_drop 1009.00 0.23 0.09 0.00 496
Operation seconds usr sys cpu tests
connect 34.00 11.53 10.31 0.00 10000
alter_table_add 1228.00 0.55 0.17 0.00 992
connect+select_1_row 39.00 12.75 13.53 0.00 10000
alter_table_drop 1033.00 0.17 0.08 0.00 496
connect+select_simple 37.00 12.56 11.92 0.00 10000
connect 33.00 11.69 10.25 0.00 10000
count 40.00 0.11 0.05 0.00 100
connect+select_1_row 39.00 11.72 12.45 0.00 10000
count_distinct 69.00 1.17 0.41 0.00 1000
connect+select_simple 36.00 12.89 11.09 0.00 10000
count_distinct_big 1229.00 224.25 81.19 0.00 1020
count 39.00 0.14 0.03 0.00 100
count_distinct_group 152.00 2.81 0.92 0.00 1000
count_distinct 75.00 1.13 0.31 0.00 1000
count_distinct_group_on_key 38.00 0.70 0.17 0.00 1000
count_distinct_big 1223.00 223.30 83.02 0.00 1020
count_distinct_group_on_key_parts 153.00 2.61 1.03 0.00 1000
count_distinct_group 157.00 2.50 1.09 0.00 1000
count_group_on_key_parts 34.00 2.64 1.00 0.00 1000
count_distinct_group_on_key 40.00 0.81 0.23 0.00 1000
count_on_key 347.00 21.47 8.38 0.00 50100
count_distinct_group_on_key_parts 158.00 2.78 1.14 0.00 1000
create+drop 123.00 3.36 2.61 0.00 10000
count_group_on_key_parts 40.00 2.53 0.92 0.00 1000
create_MANY_tables 232.00 2.97 1.23 0.00 10000
count_on_key 345.00 22.07 8.56 0.00 50100
create_index 25.00 0.00 0.00 0.00 8
create+drop 128.00 3.75 2.59 0.00 10000
create_key+drop 156.00 5.13 2.78 0.00 10000
create_MANY_tables 219.00 2.70 1.36 0.00 10000
create_table 1.00 0.02 0.00 0.00 31
create_index 25.00 0.00 0.00 0.00 8
delete_big 21.00 0.00 0.00 0.00 13
create_key+drop 161.00 5.14 2.31 0.00 10000
delete_big_many_keys 438.00 0.00 0.00 0.00 2
create_table 0.00 0.00 0.00 0.00 31
delete_key 6.00 0.84 1.30 0.00 10000
delete_big 22.00 0.00 0.02 0.00 13
drop_index 25.00 0.00 0.00 0.00 8
delete_big_many_keys 412.00 0.00 0.00 0.00 2
drop_table 0.00 0.00 0.00 0.00 28
delete_key 7.00 0.73 1.13 0.00 10000
drop_table_when_MANY_tables 223.00 0.80 1.34 0.00 10000
drop_index 27.00 0.00 0.00 0.00 8
insert 235.00 34.08 47.74 0.00 350768
drop_table 0.00 0.00 0.00 0.00 28
insert_duplicates 38.00 8.48 12.98 0.00 300000
drop_table_when_MANY_tables 153.00 1.09 1.41 0.00 10000
insert_key 1418.00 13.78 12.97 0.00 100000
insert 236.00 34.70 45.91 0.00 350768
insert_many_fields 22.00 0.58 0.49 0.00 2000
insert_duplicates 59.00 8.80 11.75 0.00 300000
min_max 18.00 0.05 0.00 0.00 60
insert_key 1434.00 14.73 12.73 0.00 100000
min_max_on_key 175.00 37.82 14.90 0.00 85000
insert_many_fields 21.00 0.82 0.31 0.00 2000
multiple_value_insert 10.00 2.59 0.14 0.00 100000
min_max 18.00 0.03 0.02 0.00 60
order_by 98.00 62.59 25.67 0.00 10
min_max_on_key 180.00 36.53 14.18 0.00 85000
order_by_key 88.00 62.23 25.44 0.00 10
multiple_value_insert 9.00 2.48 0.19 0.00 100000
outer_join 115.00 0.00 0.00 0.00 10
order_by 98.00 62.34 25.09 0.00 10
outer_join_found 102.00 0.01 0.00 0.00 10
order_by_key 88.00 63.17 24.64 0.00 10
outer_join_not_found 54.00 0.02 0.00 0.00 500
outer_join 118.00 0.01 0.00 0.00 10
outer_join_on_key 37.00 0.05 0.00 0.00 10
outer_join_found 104.00 0.02 0.00 0.00 10
select_1_row 5.00 1.11 1.91 0.00 10000
outer_join_not_found 59.00 0.02 0.00 0.00 500
select_2_rows 7.00 1.23 1.58 0.00 10000
outer_join_on_key 40.00 0.00 0.01 0.00 10
select_big 142.00 78.10 33.81 0.00 10080
select_1_row 5.00 0.95 2.00 0.00 10000
select_column+column 6.00 1.05 1.86 0.00 10000
select_2_rows 5.00 1.30 1.92 0.00 10000
select_diff_key 138.00 0.52 0.16 0.00 500
select_big 145.00 81.09 35.81 0.00 10080
select_distinct 17.00 4.78 1.80 0.00 800
select_column+column 6.00 1.11 1.64 0.00 10000
select_group 51.00 3.64 1.15 0.00 2911
select_diff_key 124.00 0.48 0.05 0.00 500
select_group_when_MANY_tables 306.00 1.09 1.50 0.00 10000
select_distinct 17.00 4.75 1.70 0.00 800
select_join 22.00 12.86 5.22 0.00 200
select_group 52.00 3.45 0.98 0.00 2911
select_key 201.00 92.41 38.77 0.00 200000
select_group_when_MANY_tables 191.00 1.67 1.97 0.00 10000
select_key_prefix 198.00 93.94 37.94 0.00 200000
select_join 22.00 13.20 5.34 0.00 200
select_many_fields 55.00 17.33 18.16 0.00 2000
select_key 201.00 92.67 41.23 0.00 200000
select_range 213.00 37.28 12.82 0.00 25420
select_key_prefix 200.00 92.94 38.81 0.00 200000
select_range_prefix 28.00 9.94 4.00 0.00 25010
select_many_fields 56.00 17.60 18.74 0.00 2000
select_simple 4.00 0.94 1.67 0.00 10000
select_range 219.00 37.55 12.72 0.00 25420
select_simple_join 3.00 1.58 0.66 0.00 500
select_range_prefix 27.00 9.96 4.16 0.00 25010
update_big 64.00 0.00 0.01 0.00 500
select_simple 4.00 1.03 1.67 0.00 10000
update_of_key 468.00 4.61 6.75 0.00 756
select_simple_join 4.00 1.47 0.69 0.00 500
update_of_key_big 33.00 0.05 0.05 0.00 501
update_big 68.00 0.02 0.00 0.00 500
update_with_key 185.00 25.34 40.66 0.00 100000
update_of_key 490.00 4.80 6.55 0.00 756
wisc_benchmark 9.00 5.66 1.53 0.00 114
update_of_key_big 34.00 0.05 0.06 0.00 501
TOTALS 10191.00 921.17 488.93 0.00 1685468
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
sql-bench/Results/alter-table-mysql-NT_4.0
View file @
0c07817b
Testing server 'MySQL 3.23.
17a alpha' at 2000-06-02 16:59:02
Testing server 'MySQL 3.23.
23 beta' at 2000-09-01 0:45:18
Testing of ALTER TABLE
Testing of ALTER TABLE
Testing with 1000 columns and 1000 rows in 20 steps
Testing with 1000 columns and 1000 rows in 20 steps
Insert data into the table
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 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): 12
01 wallclock secs ( 0.53 usr 0.19 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for alter_table_add (992): 12
28 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 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): 2
5 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for drop_index (8): 2
7 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for alter_table_drop (496): 10
09 wallclock secs ( 0.23 usr 0.09 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for alter_table_drop (496): 10
33 wallclock secs ( 0.17 usr 0.08 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 2
260 wallclock secs ( 0.89 usr 0.42 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 2
313 wallclock secs ( 0.84 usr 0.34 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
sql-bench/Results/big-tables-mysql-NT_4.0
View file @
0c07817b
Testing server 'MySQL 3.23.
17a alpha' at 2000-06-02 17:37:50
Testing server 'MySQL 3.23.
23 beta' at 2000-09-01 1:25:00
Testing of some unusual tables
Testing of some unusual tables
All tests are done 1000 times with 1000 fields
All tests are done 1000 times with 1000 fields
Testing table with 1000 fields
Testing table with 1000 fields
Testing select * from table with 1 record
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)
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
Testing select all_fields from table with 1 record
Time to select_many_fields(1000): 3
5 wallclock secs ( 8.77 usr 9.11 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to select_many_fields(1000): 3
6 wallclock secs ( 8.88 usr 9.50 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing insert VALUES()
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)
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()
Testing insert (all_fields) VALUES()
Time to insert_many_fields(1000): 1
9 wallclock secs ( 0.19 usr 0.19 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to insert_many_fields(1000): 1
8 wallclock secs ( 0.16 usr 0.14 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)
Total time:
79 wallclock secs (18.42 usr 19.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
sql-bench/Results/connect-mysql-NT_4.0
View file @
0c07817b
Testing server 'MySQL 3.23.
17a alpha' at 2000-06-02 22:55:01
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
Testing the speed of connecting to the server and sending of data
All tests are done 10000 times
All tests are done 10000 times
Testing connection/disconnect
Testing connection/disconnect
Time to connect (10000): 3
4 wallclock secs (11.53 usr 10.31 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to connect (10000): 3
3 wallclock secs (11.69 usr 10.25 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Test connect/simple select/disconnect
Test connect/simple select/disconnect
Time for connect+select_simple (10000): 3
7 wallclock secs (12.56 usr 11.92 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for connect+select_simple (10000): 3
6 wallclock secs (12.89 usr 11.09 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Test simple select
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)
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
Testing connect/select 1 row from table/disconnect
Time to connect+select_1_row (10000): 39 wallclock secs (1
2.75 usr 13.53 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to connect+select_1_row (10000): 39 wallclock secs (1
1.72 usr 12.45 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing select 1 row from table
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)
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
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)
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 (+)
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)
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)
Testing retrieval of big records (65000 bytes)
Time to select_big (10000): 5
4 wallclock secs (15.66 usr 8.23 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to select_big (10000): 5
7 wallclock secs (18.77 usr 10.03 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 18
6 wallclock secs (56.84 usr 51.02 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 18
5 wallclock secs (59.45 usr 51.06 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
sql-bench/Results/create-mysql-NT_4.0
View file @
0c07817b
Testing server 'MySQL 3.23.
17a alpha' at 2000-06-02 17:41:14
Testing server 'MySQL 3.23.
23 beta' at 2000-09-01 1:29:26
Testing the speed of creating and droping tables
Testing the speed of creating and droping tables
Testing with 10000 tables and 10000 loop count
Testing with 10000 tables and 10000 loop count
Testing create of tables
Testing create of tables
Time for create_MANY_tables (10000): 2
32 wallclock secs ( 2.97 usr 1.23 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for create_MANY_tables (10000): 2
19 wallclock secs ( 2.70 usr 1.36 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Accessing tables
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)
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
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)
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
Testing create+drop
Time for create+drop (10000): 12
3 wallclock secs ( 3.36 usr 2.61 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for create+drop (10000): 12
8 wallclock secs ( 3.75 usr 2.59 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for create_key+drop (10000): 1
56 wallclock secs ( 5.13 usr 2.78 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for create_key+drop (10000): 1
61 wallclock secs ( 5.14 usr 2.31 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)
Total time:
852 wallclock secs (14.36 usr 9.64 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
sql-bench/Results/insert-mysql-NT_4.0
View file @
0c07817b
Testing server 'MySQL 3.23.
17a alpha' at 2000-06-02 17:58:36
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.
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.
The tests are done with a table that has 100000 rows.
Generating random keys
Generating random keys
Creating tables
Creating tables
Inserting 100000 rows in order
Inserting 100000 rows in order
Inserting 100000 rows in reverse order
Inserting 100000 rows in reverse order
Inserting 100000 rows in random order
Inserting 100000 rows in random order
Time for insert (300000): 20
4 wallclock secs (29.41 usr 41.03 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for insert (300000): 20
6 wallclock secs (30.56 usr 39.33 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing insert of duplicates
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)
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
Retrieving data from the table
Time for select_big (10:3000000): 87 wallclock secs (6
2.05 usr 25.47 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_big (10:3000000): 87 wallclock secs (6
1.98 usr 25.58 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for order_by_key (10:3000000): 88 wallclock secs (6
2.23 usr 25.44 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for order_by_key (10:3000000): 88 wallclock secs (6
3.17 usr 24.64 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 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): 1
38 wallclock secs ( 0.52 usr 0.16 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_diff_key (500:1000): 1
24 wallclock secs ( 0.48 usr 0.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range_prefix (5010:42084): 1
5 wallclock secs ( 4.33 usr 1.58 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range_prefix (5010:42084): 1
4 wallclock secs ( 4.63 usr 1.80 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range (5010:42084): 1
5 wallclock secs ( 4.53 usr 1.78 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range (5010:42084): 1
6 wallclock secs ( 4.67 usr 1.58 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_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.
41 usr 38.77 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
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_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): 1
3 wallclock secs ( 5.55 usr 2.27 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range (20000:43500): 1
4 wallclock secs ( 5.75 usr 2.14 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_group (111): 3
1 wallclock secs ( 0.09 usr 0.02 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_group (111): 3
3 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.
27 usr 2.73 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.0
5 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for min_max (60): 18 wallclock secs ( 0.0
3 usr 0.02 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_on_key (100): 2
6 wallclock secs ( 0.06 usr 0.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_on_key (100): 2
5 wallclock secs ( 0.01 usr 0.00 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 (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): 9
5 wallclock secs ( 0.05 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_big (20): 9
8 wallclock secs ( 0.03 usr 0.02 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing update of keys with functions
Testing update of keys with functions
Time for update_of_key (500): 6
2 wallclock secs ( 4.58 usr 6.73 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for update_of_key (500): 6
3 wallclock secs ( 4.78 usr 6.47 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for update_of_key_big (501): 3
3 wallclock secs ( 0.05 usr 0.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for update_of_key_big (501): 3
4 wallclock secs ( 0.05 usr 0.06 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing update with key
Testing update with key
Time for update_with_key (100000): 18
5 wallclock secs (25.34 usr 40.66 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for update_with_key (100000): 18
8 wallclock secs (26.88 usr 40.59 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing update of all rows
Testing update of all rows
Time for update_big (500): 6
4 wallclock secs ( 0.00 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for update_big (500): 6
8 wallclock secs ( 0.02 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing left outer join
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_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): 11
5 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for outer_join (10:10): 11
8 wallclock secs ( 0.01 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for outer_join_found (10:10): 10
2 wallclock secs ( 0.01 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for outer_join_found (10:10): 10
4 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): 5
4 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): 5
9 wallclock secs ( 0.02 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing delete
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_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.0
0 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for delete_big (12): 21 wallclock secs ( 0.00 usr 0.0
2 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Insert into table with 16 keys and with a primary key with 16 parts
Insert into table with 16 keys and with a primary key with 16 parts
Time for insert_key (100000): 14
18 wallclock secs (13.78 usr 12.97 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for insert_key (100000): 14
34 wallclock secs (14.73 usr 12.73 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing update of keys
Testing update of keys
Time for update_of_key (256): 4
06 wallclock secs ( 0.03 usr 0.02 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for update_of_key (256): 4
27 wallclock secs ( 0.02 usr 0.08 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Deleting everything from table
Deleting everything from table
Time for delete_big_many_keys (2): 4
38 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for delete_big_many_keys (2): 4
12 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Inserting 100000 rows with multiple values
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 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)
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: 4
284 wallclock secs (485.59 usr 280.22 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 4
332 wallclock secs (490.00 usr 278.16 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
sql-bench/Results/select-mysql-NT_4.0
View file @
0c07817b
Testing server 'MySQL 3.23.
17a alpha' at 2000-06-02 19:10:01
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
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.
The test-table has 10000 rows and the test is done with 500 ranges.
Creating table
Creating table
Inserting 10000 rows
Inserting 10000 rows
Time to insert (10000): 7 wallclock secs ( 1.2
7 usr 1.42 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to insert (10000): 7 wallclock secs ( 1.2
3 usr 1.14 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing big selects on the table
Testing big selects on the table
Time for select_big (70:17207): 1 wallclock secs ( 0.3
9 usr 0.11 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_big (70:17207): 1 wallclock secs ( 0.3
4 usr 0.20 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range (410:1057904): 18
5 wallclock secs (27.20 usr 8.77 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range (410:1057904): 18
9 wallclock secs (27.13 usr 9.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for min_max_on_key (70000): 16
1 wallclock secs (31.55 usr 12.17 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for min_max_on_key (70000): 16
6 wallclock secs (30.02 usr 11.73 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_on_key (50000): 32
1 wallclock secs (21.41 usr 8.33 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_on_key (50000): 32
0 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):
34 wallclock secs ( 2.64 usr 1.00 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
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 (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):
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 (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): 15
3 wallclock secs ( 2.61 usr 1.03 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group_on_key_parts (1000:100000): 15
8 wallclock secs ( 2.78 usr 1.14 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group (1000:100000): 15
2 wallclock secs ( 2.81 usr 0.92 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group (1000:100000): 15
7 wallclock secs ( 2.50 usr 1.09 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_big (1000:10000000): 11
34 wallclock secs (224.20 usr 81.19 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_big (1000:10000000): 11
25 wallclock secs (223.27 usr 83.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 22
55 wallclock secs (315.95 usr 115.52 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 22
78 wallclock secs (313.80 usr 117.34 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
sql-bench/Results/wisconsin-mysql-NT_4.0
View file @
0c07817b
Testing server 'MySQL 3.23.
17a alpha' at 2000-06-02 19:47:36
Testing server 'MySQL 3.23.
23 beta' at 2000-09-01 3:33:51
Wisconsin benchmark test
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)
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
Inserting data
Time to insert (31000): 1
9 wallclock secs ( 2.52 usr 3.91 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to insert (31000): 1
8 wallclock secs ( 2.22 usr 3.97 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)
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
Running actual benchmark
Time for wisc_benchmark (114): 9 wallclock secs ( 5.6
6 usr 1.53 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for wisc_benchmark (114): 9 wallclock secs ( 5.6
9 usr 1.53 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 2
9 wallclock secs ( 8.19 usr 5.44 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 2
8 wallclock secs ( 7.91 usr 5.50 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
sql/ChangeLog
View file @
0c07817b
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>
2000-08-21 Michael Widenius <monty@mysql.com>
* Added RENAME TABLE.
* Added RENAME TABLE.
...
...
sql/field.h
View file @
0c07817b
...
@@ -514,7 +514,7 @@ public:
...
@@ -514,7 +514,7 @@ public:
Field_timestamp
(
char
*
ptr_arg
,
uint32
len_arg
,
Field_timestamp
(
char
*
ptr_arg
,
uint32
len_arg
,
enum
utype
unireg_check_arg
,
const
char
*
field_name_arg
,
enum
utype
unireg_check_arg
,
const
char
*
field_name_arg
,
struct
st_table
*
table_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_field_types
type
()
const
{
return
FIELD_TYPE_TIMESTAMP
;}
enum
ha_base_keytype
key_type
()
const
{
return
HA_KEYTYPE_ULONG_INT
;
}
enum
ha_base_keytype
key_type
()
const
{
return
HA_KEYTYPE_ULONG_INT
;
}
void
store
(
const
char
*
to
,
uint
length
);
void
store
(
const
char
*
to
,
uint
length
);
...
...
sql/mysql_priv.h
View file @
0c07817b
...
@@ -426,7 +426,7 @@ void sql_print_error(const char *format,...)
...
@@ -426,7 +426,7 @@ void sql_print_error(const char *format,...)
extern
char
mysql_data_home
[
2
],
server_version
[
50
],
max_sort_char
,
extern
char
mysql_data_home
[
2
],
server_version
[
50
],
max_sort_char
,
mysql_real_data_home
[];
mysql_real_data_home
[];
extern
my_string
mysql_unix_port
,
mysql_tmpdir
;
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
,
extern
ulong
refresh_version
,
flush_version
,
thread_id
,
query_id
,
opened_tables
,
created_tmp_tables
,
aborted_threads
,
aborted_connects
,
created_tmp_tables
,
aborted_threads
,
aborted_connects
,
delayed_insert_timeout
,
delayed_insert_timeout
,
...
...
sql/mysqld.cc
View file @
0c07817b
...
@@ -191,6 +191,7 @@ volatile ulong cached_thread_count=0;
...
@@ -191,6 +191,7 @@ volatile ulong cached_thread_count=0;
// replication parameters, if master_host is not NULL, we are slaving off the master
// 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
,
my_string
master_user
=
(
char
*
)
"test"
,
master_password
=
0
,
master_host
=
0
,
master_info_file
=
(
char
*
)
"master.info"
;
master_info_file
=
(
char
*
)
"master.info"
;
const
char
*
localhost
=
LOCAL_HOST
;
uint
master_port
=
MYSQL_PORT
,
master_connect_retry
=
60
;
uint
master_port
=
MYSQL_PORT
,
master_connect_retry
=
60
;
ulong
max_tmp_tables
,
max_heap_table_size
;
ulong
max_tmp_tables
,
max_heap_table_size
;
...
@@ -1981,9 +1982,9 @@ pthread_handler_decl(handle_connections_sockets,arg __attribute__((unused)))
...
@@ -1981,9 +1982,9 @@ pthread_handler_decl(handle_connections_sockets,arg __attribute__((unused)))
continue
;
continue
;
}
}
if
(
!
(
vio_tmp
=
vio_new
(
new_sock
,
if
(
!
(
vio_tmp
=
vio_new
(
new_sock
,
new_
sock
==
unix_sock
?
VIO_TYPE_SOCKET
:
sock
==
unix_sock
?
VIO_TYPE_SOCKET
:
VIO_TYPE_TCPIP
,
VIO_TYPE_TCPIP
,
new_
sock
==
unix_sock
))
||
sock
==
unix_sock
))
||
my_net_init
(
&
thd
->
net
,
vio_tmp
))
my_net_init
(
&
thd
->
net
,
vio_tmp
))
{
{
if
(
vio_tmp
)
if
(
vio_tmp
)
...
@@ -1997,14 +1998,7 @@ pthread_handler_decl(handle_connections_sockets,arg __attribute__((unused)))
...
@@ -1997,14 +1998,7 @@ pthread_handler_decl(handle_connections_sockets,arg __attribute__((unused)))
continue
;
continue
;
}
}
if
(
sock
==
unix_sock
)
if
(
sock
==
unix_sock
)
{
thd
->
host
=
(
char
*
)
localhost
;
if
(
!
(
thd
->
host
=
my_strdup
(
LOCAL_HOST
,
MYF
(
0
))))
{
close_connection
(
&
thd
->
net
,
ER_OUT_OF_RESOURCES
);
delete
thd
;
continue
;
}
}
create_new_thread
(
thd
);
create_new_thread
(
thd
);
}
}
...
...
sql/sql_class.cc
View file @
0c07817b
...
@@ -150,7 +150,8 @@ THD::~THD()
...
@@ -150,7 +150,8 @@ THD::~THD()
DBUG_PRINT
(
"info"
,
(
"freeing host"
));
DBUG_PRINT
(
"info"
,
(
"freeing host"
));
safeFree
(
host
);
if
(
host
!=
localhost
)
// If not pointer to constant
safeFree
(
host
);
safeFree
(
user
);
safeFree
(
user
);
safeFree
(
db
);
safeFree
(
db
);
safeFree
(
ip
);
safeFree
(
ip
);
...
...
sql/sql_parse.cc
View file @
0c07817b
...
@@ -180,10 +180,7 @@ check_connections(THD *thd)
...
@@ -180,10 +180,7 @@ check_connections(THD *thd)
#if !defined(HAVE_SYS_UN_H) || defined(HAVE_mit_thread)
#if !defined(HAVE_SYS_UN_H) || defined(HAVE_mit_thread)
/* Fast local hostname resolve for Win32 */
/* Fast local hostname resolve for Win32 */
if
(
!
strcmp
(
thd
->
ip
,
"127.0.0.1"
))
if
(
!
strcmp
(
thd
->
ip
,
"127.0.0.1"
))
{
thd
->
host
=
(
char
*
)
localhost
;
if
(
!
(
thd
->
host
=
my_strdup
(
"localhost"
,
MYF
(
0
))))
return
(
ER_OUT_OF_RESOURCES
);
}
else
else
#endif
#endif
if
(
!
(
specialflag
&
SPECIAL_NO_RESOLVE
))
if
(
!
(
specialflag
&
SPECIAL_NO_RESOLVE
))
...
@@ -199,9 +196,9 @@ check_connections(THD *thd)
...
@@ -199,9 +196,9 @@ check_connections(THD *thd)
if
(
acl_check_host
(
thd
->
host
,
thd
->
ip
))
if
(
acl_check_host
(
thd
->
host
,
thd
->
ip
))
return
(
ER_HOST_NOT_PRIVILEGED
);
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
;
thd
->
ip
=
0
;
bzero
((
char
*
)
&
thd
->
remote
,
sizeof
(
struct
sockaddr
));
bzero
((
char
*
)
&
thd
->
remote
,
sizeof
(
struct
sockaddr
));
}
}
...
@@ -561,7 +558,7 @@ bool do_command(THD *thd)
...
@@ -561,7 +558,7 @@ bool do_command(THD *thd)
{
{
packet
=
(
char
*
)
net
->
read_pos
;
packet
=
(
char
*
)
net
->
read_pos
;
command
=
(
enum
enum_server_command
)
(
uchar
)
packet
[
0
];
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
,
vio_description
(
net
->
vio
),
command
,
command_name
[
command
]));
command_name
[
command
]));
}
}
...
...
sql/violite.c
View file @
0c07817b
...
@@ -97,7 +97,9 @@ Vio *vio_new(my_socket sd, enum enum_vio_type type, my_bool localhost)
...
@@ -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
))))
if
((
vio
=
(
Vio
*
)
my_malloc
(
sizeof
(
*
vio
),
MYF
(
MY_WME
))))
{
{
vio_reset
(
vio
,
type
,
sd
,
0
,
localhost
);
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(___WIN__) && !defined(__EMX__)
#if !defined(NO_FCNTL_NONBLOCK)
#if !defined(NO_FCNTL_NONBLOCK)
vio
->
fcntl_mode
=
fcntl
(
sd
,
F_GETFL
);
vio
->
fcntl_mode
=
fcntl
(
sd
,
F_GETFL
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment