Commit 967c1b04 authored by unknown's avatar unknown

merge


configure.in:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
parents 25e911fa 78cf07c8
This diff is collapsed.
......@@ -505,10 +505,12 @@ static void usage(int version)
log.\n");
#ifndef __WIN__
printf("\
--pager[=...] Output type. Default is your ENV variable PAGER.\n\
--pager[=...] Pager to use to display results. If you don't supply\n\
an option the default pager is taken from your ENV\n\
variable PAGER (%s).\n\
Valid pagers are less, more, cat [> filename], etc.\n\
See interactive help (\\h) also. This option does\n\
not work in batch mode.\n");
not work in batch mode.\n", getenv("PAGER") ? getenv("PAGER") : "");
#endif
printf("\
-p[password], --password[=...]\n\
......
......@@ -489,7 +489,8 @@ AC_CHECK_HEADERS(fcntl.h float.h floatingpoint.h ieeefp.h limits.h \
stdlib.h stddef.h \
strings.h string.h synch.h sys/mman.h sys/socket.h netinet/in.h arpa/inet.h \
sys/timeb.h sys/types.h sys/un.h sys/vadvise.h sys/wait.h term.h \
unistd.h utime.h sys/utime.h termio.h termios.h sched.h crypt.h alloca.h)
unistd.h utime.h sys/utime.h termio.h termios.h sched.h crypt.h alloca.h \
sys/ioctl.h)
#--------------------------------------------------------------------
# Check for system libraries. Adds the library to $LIBS
......
......@@ -37,7 +37,7 @@ int heap_rkey(HP_INFO *info, byte *record, int inx, const byte *key)
}
memcpy(record,pos,(size_t) share->reclength);
info->update=HA_STATE_AKTIV;
if (!(share->keydef->flag & HA_NOSAME))
if (!(share->keydef[inx].flag & HA_NOSAME))
memcpy(info->lastkey,key,(size_t) share->keydef[inx].length);
DBUG_RETURN(0);
}
......
......@@ -88,7 +88,9 @@ enum ha_extra_function {
HA_EXTRA_FORCE_REOPEN=21, /* Datafile have changed on disk */
HA_EXTRA_FLUSH, /* Flush tables to disk */
HA_EXTRA_NO_ROWS, /* Don't write rows */
HA_EXTRA_RESET_STATE /* Reset positions */
HA_EXTRA_RESET_STATE, /* Reset positions */
HA_EXTRA_IGNORE_DUP_KEY, /* Dup keys don't rollback everything*/
HA_EXTRA_NO_IGNORE_DUP_KEY
};
/* The following is parameter to ha_panic() */
......
.TH ISAMCHK 1 "19 December 2000"
.SH NAME
.BR isamchk
\- Description, check and repair of ISAM tables.
Used without options all tables on the command will be checked for errors
.SH USAGE
isamchk [OPTIONS] tables[.ISM]
.SH SYNOPSIS
.B isamchk
.RB [ \-a | \-\-analyze ]
.RB [ \-# | \-\-debug=... ]
.RB [ \-\-character\-sets\-dir=...]
.RB [ \-C | \-\-default\-character\-set=...]
.RB [ \-d | \-\-description ]
.RB [ \-e | \-\-extend\-check ]
.RB [ \-f | \-\-force ]
.RB [ \-? | \-\-help ]
.RB [ \-i | \-\-information ]
.RB [ \-k | \-\-keys\-used=# ]
.RB [ \-l | \-\-no\-symlinks]
.RB [ \-q | \-\-quick ]
.RB [ \-r | \-\-recover ]
.RB [ \-o | \-\-safe\-recover ]
.RB [ \-O | "\-\-set\-variable var=option"]
.RB [ \-s | \-\-silent ]
.RB [ \-S | \-\-sort\-index ]
.RB [ \-R | \-\-sort\-records=#]
.RB [ \-u | \-\-unpack ]
.RB [ \-v | \-\-verbose ]
.RB [ \-V | \-\-version ]
.RB [ \-w | \-\-wait ]
.SH DESCRIPTION
.TP
.BR \-a | \-\-analyze
Analyze distribution of keys. Will make some joins in
MySQL faster.
.TP
.BR \-# | \-\-debug=...
Output debug log. Often this is 'd:t:o ,filename`
.TP
.BR \-\-character\-sets\-dir=...
Directory where character sets are
.TP
.BR \-C | \-\-default\-character\-set=...
Set the default character set
.TP
.BR \-d | \-\-description
Prints some information about table.
.TP
.BR \-e | \-\-extend\-check
Check the table VERY thoroughly. One need use this
only in extreme cases as isamchk should normally find
all errors even without this switch
.TP
.BR \-f | \-\-force
Overwrite old temporary files.
If one uses \-f when checking tables (running isamchk
without \-r), isamchk will automatically restart with
\-r on any wrong table.
.TP
.BR \-? | \-\-help
Display help and exit.
.TP
.BR \-i | \-\-information
Print statistics information about the table
.TP
.BR \-k | \-\-keys\-used=#
Used with '\-r'. Tell ISAM to update only the first
# keys. This can be used to get faster inserts!
.TP
.BR \-l | \-\-no\-symlinks
Do not follow symbolic links when repairing. Normally
isamchk repairs the table a symlink points at.
.TP
.BR \-q | \-\-quick
Used with \-r to get a faster repair. (The data file
isn't touched.) One can give a second '\-q' to force
isamchk to modify the original datafile.
.TP
.BR \-r | \-\-recover
Can fix almost anything except unique keys that aren't
unique.
.TP
.BR \-o | \-\-safe\-recover
Uses old recovery method; slower than '\-r' but can
handle a couple of cases that '\-r' cannot handle.
.TP
.BR \-O | " \-\-set\-variable var=option "
Change the value of a variable.
.TP
.BR \-s | \-\-silent
Only print errors. One can use two \-s to make isamchk
very silent
.TP
.BR \-S | \-\-sort\-index
Sort index blocks. This speeds up 'read\-next' in
applications
.TP
.BR \-R | \-\-sort\-records=#
Sort records according to an index. This makes your
data much more localized and may speed up things
(It may be VERY slow to do a sort the first time!)
.TP
.BR \-u | \-\-unpack
Unpack file packed with pack_isam.
.TP
.BR \-v | \-\-verbose
Print more information. This can be used with
\-d and \-e. Use many \-v for more verbosity!
.TP
.BR \-V | \-\-version
Print version and exit.
.TP
.BR \-w | \-\-wait
Wait if table is locked.
.SH "SEE ALSO"
isamchk (1),
isamlog (1),
mysqlaccess (1),
mysqladmin (1),
mysqlbug (1),
mysqld (1),
mysqldump (1),
mysqlshow (1),
msql2mysql (1),
perror (1),
replace (1),
safe_mysqld (1),
which1 (1),
zap (1),
.SH AUTHOR
Ver 1.0, distribution 3.23.29a
Michael (Monty) Widenius (monty@tcx.se),
TCX Datakonsult AB (http://www.tcx.se).
This software comes with no warranty.
Manual page by L. (Kill-9) Pedersen
(kill-9@kill\-9.dk), Mercurmedia Data Model Architect /
system developer (http://www.mercurmedia.com)
.\" end of man page
.TH ISAMLOG 1 "20 December 2000"
.SH NAME
isamlog - Write info about whats in a nisam log file.
.SH USAGE
isamlog [-?iruvIV] [-c #] [-f #] [-F filepath/] [-o #] [-R file recordpos] [-w write_file] [log-filename [table ...]]
.SH SYNOPSIS
.B isamlog
.RB [ -? | -I ]
.RB [ -V ]
.RB [ -c ]
.RB [ -f ]
.RB [ -F ]
.RB [ -i ]
.RB [ -o ]
.RB [ "-p #" ]
.RB [ -r ]
.RB [ -R ]
.RB [ -u ]
.RB [ -v ]
.RB [ -w ]
.SH DESCRIPTION
.TP
.BR isamlog
.TP
.BR -? | -I
info
.TP
.BR -V
version
.TP
.BR -c
do only # commands
.TP
.BR -f
max open files
.TP
.BR -F
file path
.TP
.BR -i
extra info
.TP
.BR -o
offset
.TP
.BR "-p #"
remove # components from path
.TP
.BR -r
recover
.TP
.BR -R
file recordposition
.TP
.BR -u
update
.TP
.BR -v
verbose
.TP
.BR -w
write file
.SH NOTE
If no file name is given isam.log is used
One can give a second and a third '-v' for more verbose.
Normaly one does a update (-u).
If a recover is done all writes and all possibly updates and deletes is done
and errors are only counted.
If one gives table names as arguments only these tables will be updated
.SH "SEE ALSO"
isamchk (1),
isamlog (1),
mysqlaccess (1),
mysqladmin (1),
mysqlbug (1),
mysqld (1),
mysqldump (1),
mysqlshow (1),
msql2mysql (1),
perror (1),
replace (1),
safe_mysqld (1),
which1 (1),
zap (1),
.SH AUTHOR
Ver 1.0, distribution 3.23.29a
Michael (Monty) Widenius (monty@tcx.se),
TCX Datakonsult AB (http://www.tcx.se).
This software comes with no warranty.
Manual page by L. (Kill-9) Pedersen
(kill-9@kill-9.dk), Mercurmedia Data Model Architect /
system developer (http://www.mercurmedia.com)
.\" end of man page
......@@ -116,6 +116,13 @@ executable shell script for starting mysqld safely
.TP
.I /site/var/mysql/data
location of database files
.SH EXAMPLE
You can also read a backup dump file back into MySQL with:
.TP
.BR mysql
\fP\fIdatabase\fP
.BR <
backup-file.sql
.SH "SEE ALSO"
isamchk (1),
isamlog (1),
......
.TH ZAP 1 "20 December 2000"
.SH NAME
zap - a perl script used to kill processes
.SH USAGE
/usr/bin/mysql_zap [-signal] [-?Ift] pattern
.SH SYNOPSIS
.B zap
.RB [ \-I | \-? ]
.RB [ \-f ]
.RB [ \-t ]
.SH DESCRIPTION
.TP
.BR zap
supports by executing
.TP
.BR \-I | \-?
info
.TP
.BR \-f
force
.TP
.BR \-t
test
.SH NOTE
If
.BR -f
isn't given, ask user for confirmation for each process to kill. If signal isn't given, try first with signal 15 and after that with signal 9. If
.BR -t
is given the processes is only shown on stdout.
.SH "SEE ALSO"
isamchk (1), isamlog (1), mysqlaccess (1), mysqladmin (1), mysqlbug (1), mysqld (1), mysqldump (1), mysqlshow (1), msql2mysql (1), perror (1), replace (1), safe_mysqld (1), which1 (1), zap (1),
.SH AUTHOR
Ver 1.0, distribution 3.23.29a Michael (Monty) Widenius (monty@tcx.se), TCX Datakonsult AB (http://www.tcx.se). This software comes with no warranty. Manual page by L. (Kill-9) Pedersen (kill-9@kill-9.dk), Mercurmedia Data Model Architect / system developer (http://www.mercurmedia.com)
.\" end of man page
\ No newline at end of file
.TH MYSQLACCESS 1 "19 December 2000"
.SH NAME
.BR mysqlaccess
\- Create new users to mysql.
.SH USAGE
mysqlaccess [host [user [db]]] OPTIONS
.SH SYNOPSIS
.B mysqlaccess
.RB [ \-? | \-\-help ]
.RB [ \-v | \-\-version ]
.RB [ \-p | \-\-password=# ]
.RB [ \-h | \-\-host=# ]
.RB [ \-d | \-\-db=# ]
.RB [ \-U | \-\-superuser=# ]
.RB [ \-P | \-\-spassword=# ]
.RB [ \-H | \-\-rhost=# ]
.RB [ \-\-old_server ]
.RB [ \-b | \-\-brief ]
.RB [ \-t | \-\-table ]
.RB [ \-\-relnotes]
.RB [ \-\-plan ]
.RB [ \-\-howto ]
.RB [ \-\-debug=N ]
.RB [ \-\-copy ]
.RB [ \-\-preview ]
.RB [ \-\-commit ]
.RB [ \-\-rollback ]
.SH DESCRIPTION
.TP
.BR \-? | \-\-help
display this helpscreen and exit
.TP
.BR \-v | \-\-version
print information on the program `mysqlaccess'
.TP
.BR \-u | \-\-user=#
username for logging in to the db
.TP
.BR \-p | \-\-password=#
validate password for user
.TP
.BR \-h | \-\-host=#
name or IP\-number of the host
.TP
.BR \-d | \-\-db=#
name of the database
.TP
.BR \-U | \-\-superuser=#
connect as superuser
.TP
.BR \-P | \-\-spassword=#
password for superuser
.TP
.BR \-H | \-\-rhost=#
remote MySQL\-server to connect to
.TP
.BR \-\-old_server
connect to old MySQL\-server (before v3.21) which
does not yet know how to handle full where clauses.
.TP
.BR \-b | \-\-brief
single\-line tabular report
.TP
.BR \-t | \-\-table
report in table\-format
.TP
.BR \-\-relnotes
print release\-notes
.TP
.BR \-\-plan
print suggestions/ideas for future releases
.TP
.BR \-\-howto
some examples of how to run `mysqlaccess'
.TP
.BR \-\-debug=N
enter debuglevel N (0..3)
.TP
.BR \-\-copy
reload temporary grant\-tables from original ones
.TP
.BR \-\-preview
show differences in privileges after making
changes in (temporary) grant\-tables
.TP
.BR \-\-commit
copy grant\-rules from temporary tables to grant\-tables
(!don't forget to do an mysqladmin reload)
.TP
.BR \-\-rollback
undo the last changes to the grant\-tables.
.SH NOTE
+ At least the user and the db must be given (even with wildcards)
+ If no host is given, `localhost' is assumed
+ Wilcards (*,?,%,_) are allowed for host, user and db, but be sure
to escape them from your shell!! (ie type \* or '*')
.SH "SEE ALSO"
isamchk (1),
isamlog (1),
mysqlaccess (1),
mysqladmin (1),
mysqlbug (1),
mysqld (1),
mysqldump (1),
mysqlshow (1),
msql2mysql (1),
perror (1),
replace (1),
safe_mysqld (1),
which1 (1),
zap (1),
.SH AUTHOR
Ver 1.0, distribution 3.23.29a
Michael (Monty) Widenius (monty@tcx.se),
TCX Datakonsult AB (http://www.tcx.se).
This software comes with no warranty.
Manual page by L. (Kill-9) Pedersen
(kill-9@kill\-9.dk), Mercurmedia Data Model Architect /
system developer (http://www.mercurmedia.com)
.\" end of man page
.TH MYSQLADMIN 1 "18 December 2000"
.SH NAME
mysqladmin [OPTIONS] command command.... \- A utility for performing administrative operations
.SH OPTION SYNOPSIS
.B mysqladmin
.RB [ \-# | \-\-debug=
.IR logfile ]
.RB [ \-f | \-\-force ]
.RB [ \-? | \-\-help ]
.BR [ --character-sets-dir=\fP\fIdirectory\fP ]
.RB [ \-C | \-\-compress ]
.RB [ \-h | \-\-host=[#] ]
.RB [ \-p[pwd] ]
.RI [ \-\-password=[pwd] ]
.RB [ \-P | \-\-port=
.IR pnum ]
.RB [ \-i | \-\-sleep=
.IR sec ]
.RB [ \-E | \-\-vertical ]
.RB [ \-s | \-\-silent ]
.RB [ \-S | \-\-socket=
.IR # ]
.RB [ \-r | \-\-relative ]
.RB [ \-t | \-\-timeout=
.IR # ]
.RB [ \-u | \-\-user=
.IR uname ]
.RB [ \-v | \-\-verbose ]
.RB [ \-V | \-\-version ]
.RB [ \-w | \-\-wait[=retries] ]
.SH OPTION DESCRIPTION
You can get a list of the options your version of
.IR mysqladmin
supports by executing
.BR "mysqladmin \-\-help"
.SH OPTIONS
.TP
.BR \-# | \-\-debug=\fP\fIlogfile\fP
Output debug log. Often this is 'd:t:o,filename`
.TP
.BR \-f | \-\-force
Don't ask for confirmation on drop database; with
multiple commands, continue even if an error occurs
.TP
.BR \-? | \-\-help
Display help and exit
.TP
.BR --character-sets-dir=\fP\fIdirectory\fP
Set the character set directory
.TP
.BR \-C | \-\-compress
Use compression in server/client protocol
.TP
\fB\-h\fP|\fP\-\-host=\fP\fIhostname\fP
Connect to host
.TP
\fB\-p\fP|\fB\-\-password\fP[\fB=\fP\fIpwd\fP]
Password to use when connecting to server
If password is not given it's asked from the tty
.TP
\fB\-P\fR|\fB\-\-port=\fP\fIpnum\fP
Port number to use for connection
.TP
\fB\-i\fR|\fB\-\-sleep=\fP\fIsec\fP
Execute commands again and again with a sleep between
.TP
.BR \-r | \-\-relative
Show difference between current and previous values
when used with
.BR -i
. Currently works only with
extended-status
.TP
.BR \-E | \-\-vertical
Print output vertically. Is similar to
.BR --relative,
but prints output vertically.
.TP
.BR \-s | \-\-silent
Silently exit if one can't connect to server
.TP
\fB\-S\fR|\fB\-\-socket=\fP\fIfile\fP
Socket file to use for connection
.TP
\fB\-t\fR|\fB\-\-timeout=\fP\fIsec\fP
Timeout for connection to the mysqld server
.TP
\fB\-u\fP|\fB\-\-user=\fP\fIuname\fP
User for login if not current user
.TP
.BR \-v | \-\-verbose
Write more information
.TP
.BR \-V | \-\-version
Output version information and exit
.TP
.BR \-w | \-\-wait
Wait and retry if connection is down
.SH COMMAND SYNOPSIS
.B MySQLADMIN
.RB [ "create \fP\fIdatabasename\fP "]
.RB [ "drop \fP\fIdatabasename\fP" ]
.RB [ extended-status ]
.RB [ flush-hosts ]
.RB [ flush-logs ]
.RB [ flush-tables ]
.RB [ flush-privileges ]
.RB [ " kill id,id,... " ]
.RB [ "password \fP\fInew-password\fP "]
.RB [ ping ]
.RB [ processlist ]
.RB [ reload ]
.RB [ refresh ]
.RB [ shutdown ]
.RB [ slave-start ]
.RB [ slave-stop ]
.RB [ status ]
.RB [ variables ]
.RB [ version ]
.SH COMMANDS
Where command is a one or more of: (Commands may be shortened)
.TP
.BR "create databasename"
Create a new database
.TP
.BR "drop databasename"
Delete a database and all its tables
.TP
.BR extended-status
Gives an extended status message from the server
.TP
.BR flush-hosts
Flush all cached hosts
.TP
.BR flush-logs
Flush all logs
.TP
.BR flush-status
Clear status variables
.TP
.BR flush-tables
Flush all tables
.TP
.BR flush-threads
Flush the thread cache
.TP
.BR flush-privileges
Reload grant tables (same as reload)
.TP
.BR "kill id,id,..."
Kill mysql threads
.TP
.BR "password \fP\fInew-password\fP"
Change old password to new-password
.TP
.BR ping
Check if mysqld is alive
.TP
.BR processlist
Show list of active threads in server
.TP
.BR reload
Reload grant tables
.TP
.BR refresh
Flush all tables and close and open logfiles
.TP
.BR shutdown
Take server down
.TP
.BR status
Gives a short status message from the server
.TP
.BR variables
Prints variables available
.TP
.BR version
Get version info from server
.SH "SEE ALSO"
isamchk (1),
isamlog (1),
mysqlaccess (1),
mysqladmin (1),
mysqlbug (1),
mysqld (1),
mysqldump (1),
mysqlshow (1),
msql2mysql (1),
perror (1),
replace (1),
safe_mysqld (1),
which1 (1),
zap (1),
.SH AUTHOR
Ver 1.0, distribution 3.23.29a
Michael (Monty) Widenius (monty@tcx.se),
TCX Datakonsult AB (http://www.tcx.se).
This software comes with no warranty.
Manual page by L. (Kill-9) Pedersen
(kill-9@kill-9.dk), Mercurmedia Data Model Architect /
system developer (http://www.mercurmedia.com)
.\" end of man page
This diff is collapsed.
.TH MYSQLD_MULTI 1 "20 December 2000"
.SH NAME
mysqld_multi - is meant for managing several mysqld processes running in different UNIX sockets and TCP/IP ports.
.SH USAGE
mysqld_multi [OPTIONS] {start|stop|report} [GNR,GNR,GNR...]
.SH SYNOPSIS
.B mysqld_multi
.RB [ --config-file=... ]
.RB [ --example ]
.RB [ --help ]
.RB [ --log=... ]
.RB [ --mysqladmin=... ]
.RB [ --mysqld=... ]
.RB [ --no-log ]
.RB [ --password=... ]
.RB [ --tcp-ip ]
.RB [ --user=... ]
.RB [ --version ]
.SH DESCRIPTION
.TP
.BR mysqld_multi
.TP
.BR --config-file=...
Alternative config file. NOTE: This will not affect this program\'s own options (group [mysqld_multi]), but only groups [mysqld#]. Without this option everything will be searched from the ordinary my.cnf file.
.TP
.BR --example
Give an example of a config file.
.TP
.BR --help
Print this help and exit.
.TP
.BR --log=...
Log file. Full path to and the name for the log file. NOTE: If the file exists, everything will be appended.
.TP
.BR --mysqladmin=...
mysqladmin binary to be used for a server shutdown.
.TP
.BR --mysqld=...
mysqld binary to be used. Note that you can give safe_mysqld to this option also. The options are passed to mysqld. Just make sure you have mysqld in your environment variable PATH or fix safe_mysqld.
.TP
.BR --no-log
Print to stdout instead of the log file. By default the log file is turned on.
.TP
.BR --password=...
Password for user for mysqladmin.
.TP
.BR --tcp-ip
Connect to the MySQL server(s) via the TCP/IP port instead of the UNIX socket. This affects stopping and reporting. If a socket file is missing, the server may still be running, but can be accessed only via the TCP/IP port. By default connecting is done via the UNIX socket.
.TP
.BR --user=...
MySQL user for mysqladmin.
.TP
.BR --version
Print the version number and exit.
.SH NOTE
Please see the mysql manual for more detailed information on this.
.SH "SEE ALSO"
isamchk (1),
isamlog (1),
mysqlaccess (1),
mysqladmin (1),
mysqlbug (1),
mysqld (1),
mysqldump (1),
mysqlshow (1),
msql2mysql (1),
perror (1),
replace (1),
safe_mysqld (1),
which1 (1),
zap (1),
.SH AUTHOR
Ver 1.0, distribution 3.23.29a
Michael (Monty) Widenius (monty@tcx.se),
TCX Datakonsult AB (http://www.tcx.se).
This software comes with no warranty.
Manual page by L. (Kill-9) Pedersen
(kill-9@kill-9.dk), Mercurmedia Data Model Architect /
system developer (http://www.mercurmedia.com)
.\" end of man page
.TH MYSQLDUMP 1 "19 December 2000"
.SH NAME
mysqldump \- text-based client for dumping or backing up mysql databases , tables and or data.
.SH USAGE
.BR "mysqldump [\fP\fIOPTIONS\fP] database [\fP\fItables\fP]"
.TP
OR
.BR "mysqldump [\fP\fIOPTIONS\fP] \-\-databases [\fP\fIOPTIONS\fP] DB1 [\fP\fIDB2 DB3...\fP]"
.TP
OR
.BR "mysqldump [\fP\fIOPTIONS\fP] \-\-all-databases [\fP\fIOPTIONS\fP]"
.SH OPTION SYNOPSIS
.B mysqldump
.RB [ \-A | \-\-all-databases ]
.RB [ \-a | \-\-all ]
.RB [ \-# | \-\-debug=... ]
.RB [ \-\-character-sets-dir=...]
.RB [ \-? | \-\-help ]
.RB [ \-B | \-\-databases ]
.RB [ \-c | \-\-complete-insert ]
.RB [ \-C | \-\-compress ]
.RB [ \-\-default-character-set=...]
.RB [ \-e | \-\-extended-insert ]
.RB [ \-\-add-drop-table ]
.RB [ \-\-add-locks ]
.RB [ \-\-allow-keywords ]
.RB [ \-\-delayed-insert ]
.RB [ \-F | \-\-flush-logs ]
.RB [ \-f | \-\-force ]
.RB [ \-h | \-\-host=... ]
.RB [ \-l | \-\-lock-tables ]
.RB [ \-n | \-\-no-create-db ]
.RB [ \-t | \-\-no-create-info ]
.RB [ \-d | \-\-no-data ]
.RB [ \-O | \-\-set-variable var=\fP\fIoption\fP ]
.RB [ \-\-opt ]
.RB [ \-p | \-\-password\fP\fI[=...]\fP ]
.RB [ \-P | \-\-port=... ]
.RB [ \-q | \-\-quick ]
.RB [ \-Q | \-\-quote-names ]
.RB [ \-S | \-\-socket=... ]
.RB [ \-\-tables ]
.RB [ \-T | \-\-tab=... ]
.RB [ \-u | \-\-user=# ]
.RB [ \-v | \-\-verbose ]
.RB [ \-V | \-\-version ]
.RB [ \-w | \-\-where= ]
.RB [ \-\-delayed ]
.RB [ \-e | \-\-extended-insert ]
.RB [ \-\-fields\-terminated\-by=... ]
.RB [ \-\-fields\-enclosed\-by=... ]
.RB [ \-\-fields-optionally\-enclosed\-by=... ]
.RB [ \-\-fields\-escaped\-by=... ]
.RB [ \-\-lines\-terminated\-by=... ]
.RB [ \-v | \-\-verbose ]
.RB [ \-V | \-\-version ]
.RB [ "\-O net_buffer_length=#, where # < 16M" ]
.SH DESCRIPTION
Dumping definition and data mysql database or table
.IR mysqldump
supports by executing
.TP
.BR \-A | \-\-all\-databases
Dump all the databases. This will be same as
.BR\-\-databases
with all databases selected.
.TP
.BR \-a | \-\-all
Include all MySQL specific create options.
.TP
.BR \-# | \-\-debug=...
Output debug log. Often this is 'd:t:o,filename`.
.TP
.BR \-\-character\-sets\-dir=...
Directory where character sets are
.TP
.BR \-? | \-\-help
Display this help message and exit.
.TP
.BR \-B | \-\-databases
To dump several databases. Note the difference in
usage; In this case no tables are given. All name
arguments are regarded as databasenames.
'USE db_name;' will be included in the output
.TP
.BR \-c | \-\-complete\-insert
Use complete insert statements.
.TP
.BR \-C | \-\-compress
Use compression in server/client protocol.
.TP
.BR \-\-default\-character\-set=...
Set the default character set
.TP
.BR \-e | \-\-extended\-insert
Allows utilization of the new, much faster
INSERT syntax.
.TP
.BR \-\-add\-drop\-table
Add a 'drop table' before each create.
.TP
.BR \-\-add\-locks
Add locks around insert statements.
.TP
.BR \-\-allow\-keywords
Allow creation of column names that are keywords.
.TP
.BR \-\-delayed\-insert
Insert rows with INSERT DELAYED.
.TP
.BR \-F | \-\-flush\-logs
Flush logs file in server before starting dump.
.TP
.BR \-f | \-\-force
Continue even if we get an sql\-error.
.TP
.BR \-h | \-\-host=...
Connect to host.
.TP
.BR \-l | \-\-lock\-tables
Lock all tables for read.
.TP
.BR \-n | \-\-no\-create\-db
'CREATE DATABASE /*!32312 IF NOT EXISTS*/ db_name;'
will not be put in the output. The above line will
be added otherwise, if
.BR \-\-databases
or
.BR \-\-all\-databases
option was given.
.TP
.BR \-t | \-\-no\-create\-info
Don't write table creation info.
.TP
.BR \-d | \-\-no\-data
No row information.
.TP
.BR \-O | "\-\-set\-variable var=option"
give a variable a value.
.BR \-\-help
lists variables
.TP
.BR \-\-opt
Same as
.BR " \-\-add\-drop\-table \-\-add\-locks \-\-all \-\-extended\-insert \-\-quick \-\-lock\-tables "
.TP
.BR \-p | \-\-password[=...]
Password to use when connecting to server.
If password is not given it's solicited on the tty.
.TP
.BR \-P | \-\-port=...
Port number to use for connection.
.TP
.BR \-q | \-\-quick
Don't buffer query, dump directly to stdout.
.TP
.BR \-Q | \-\-quote\-names
Quote table and column names with `
.TP
.BR \-S | \-\-socket=...
Socket file to use for connection.
.TP
.BR \-\-tables
\fP\fIOverrides \fPoption
.BR \-\-databases (\-B).
.TP
.BR \-T | \-\-tab=...
Creates tab separated textfile for each table to
given path. (creates .sql and .txt files).
NOTE: This only works if mysqldump is run on
the same machine as the mysqld daemon.
.TP
.BR \-u | \-\-user=#
User for login if not current user.
.TP
.BR \-v | \-\-verbose
Print info about the various stages.
.TP
.BR \-V | \-\-version
Output version information and exit.
.TP
.BR \-w | \-\-where=
dump only selected records; QUOTES mandatory!
.TP
.BR \-\-delayed
Insert rows with the INSERT DELAYED command.
.TP
.BR \-e | \-\-extended-insert
Use the new multiline INSERT syntax. (Gives more compact and faster inserts statements.)
.TP
.BR \-\-fields\-terminated\-by=...
.TP
.BR \-\-fields\-enclosed\-by=...
.TP
.TP
.BR \-\-fields-optionally\-enclosed\-by=...
.TP
.BR \-\-fields\-escaped\-by=...
.TP
.BR \-\-lines\-terminated\-by=...
These options are used with the
.BR -T
option and have the same meaning as the corresponding clauses for LOAD DATA INFILE. See Mysql manual section 7.23 LOAD DATA INFILE Syntax.
.TP
.BR \-v | \-\-verbose
Verbose mode. Print out more information on what the program does.
.TP
.BR \-V | \-\-version
Print version information and exit.
.TP
.BR "\-O net_buffer_length=#, where # < 16M "
When creating multi-row-insert statements (as with option
.BR --extended-insert
or
.BR --opt
), mysqldump will create rows up to net_buffer_length length. If you increase this variable, you should also ensure that the max_allowed_packet variable in the MySQL server is bigger than the net_buffer_length.
.SH EXAMPLES
.TP
The most normal use of mysqldump is probably for making a backup of whole databases. See Mysql Manual section 21.2 Database Backups.
.TP
mysqldump \-\-opt \fP\fIdatabase\fP > backup-file.sql
.TP
You can read this back into MySQL with:
.TP
.BR mysql
\fP\fIdatabase\fP
.BR <
backup-file.sql
.TP
or
.TP
.BR mysql
\-e 'source /patch\-to\-backup/backup\-file.sql' database
.TP
However, it's also very useful to populate another MySQL server with information from a database:
.TP
mysqldump \-\-opt \fP\fIdatabase\fP | mysql \-\-host=\fP\fIremote\-host\fP \-C database
.TP
It is possible to dump several databases with one command:
.TP
mysqldump \-\-databases database1 [ database2 database3... ] > my_databases.sql
.TP
If all the databases are wanted, one can use:
.TP
mysqldump \fP\fI\-\-all\-databases\fP > all_databases.sql
.SH "SEE ALSO"
isamchk (1),
isamlog (1),
mysqlaccess (1),
mysqladmin (1),
mysqlbug (1),
mysqld (1),
mysqldump (1),
mysqlshow (1),
msql2mysql (1),
perror (1),
replace (1),
safe_mysqld (1),
which1 (1),
zap (1),
.SH AUTHOR
Ver 1.0, distribution 3.23.29a
Michael (Monty) Widenius (monty@tcx.se),
TCX Datakonsult AB (http://www.tcx.se).
This software comes with no warranty.
Manual page by L. (Kill-9) Pedersen
(kill-9@kill-9.dk), Mercurmedia Data Model Architect /
system developer (http://www.mercurmedia.com)
.\" end of man page
\ No newline at end of file
.TH MYSQLSHOW 1 "19 December 2000"
.SH NAME
.BR mysqlshow
\- Shows the structure of a mysql database (databases,tables and columns)
.SH USAGE
shell> mysqlshow [\fP\fIOPTIONS\fP] [\fP\fIdatabase [table [column]]\fP]
.SH SYNOPSIS
.B mysqlshow
.RB [ \-# | \-\-debug=...]
.RB [ \-? | \-\-help ]
.RB [ \-c | \-\-character\-sets\-dir=...]
.RB [ \-C | \-\-compress ]
.RB [ \-h | \-\-host=... ]
.RB [ \-i | \-\-status ]
.RB [ \-k | \-\-keys ]
.RB [ \-p | \-\-password\fP\fI[=...]\fP ]
.RB [ \-P | \-\-port=... ]
.RB [ \-S | \-\-socket=... ]
.RB [ \-u | \-\-user=# ]
.RB [ \-V | \-\-version ]
.SH DESCRIPTION
.TP
.BR \-# | \-\-debug=...
output debug log. Often this is 'd:t:o,filename`
.TP
.BR \-? | \-\-help
display help and exit
.TP
.BR \-c | \-\-character\-sets\-dir=...
Directory where character sets are
.TP
.BR \-C | \-\-compress
Use compression in server/client protocol
.TP
.BR \-h | \-\-host=...
connect to host
.TP
.BR \-i | \-\-status
Shows a lot of extra information about each table
.TP
.BR \-k | \-\-keys
show keys for table
.TP
.BR \-p | \-\-password \fP\fI[=...] \fP
password to use when connecting to server
If password is not given it's asked from the tty.
.TP
.BR \-P | \-\-port=...
Port number to use for connection
.TP
.BR \-S | \-\-socket=...
Socket file to use for connection
.TP
.BR \-u | \-\-user=#
user for login if not current user
.TP
.BR \-V | \-\-version
output version information and exit
.SH NOTE
If last argument contains a shell or SQL wildcard (*,?,% or _) then only
what's matched by the wildcard is shown.
If no database is given then all matching databases are shown.
If no table is given then all matching tables in database are shown
If no column is given then all matching columns and columntypes in table
are shown
.SH "SEE ALSO"
isamchk (1),
isamlog (1),
mysqlaccess (1),
mysqladmin (1),
mysqlbug (1),
mysqld (1),
mysqldump (1),
mysqlshow (1),
msql2mysql (1),
perror (1),
replace (1),
safe_mysqld (1),
which1 (1),
zap (1),
.SH AUTHOR
Ver 1.0, distribution 3.23.29a
Michael (Monty) Widenius (monty@tcx.se),
TCX Datakonsult AB (http://www.tcx.se).
This software comes with no warranty.
Manual page by L. (Kill-9) Pedersen
(kill-9@kill\-9.dk), Mercurmedia Data Model Architect /
system developer (http://www.mercurmedia.com)
.\" end of man page
.TH PERROR 1 "19 December 2000"
.SH NAME
.BR perror
can be used to display a description for a system error code, or an MyISAM/ISAM table handler error code. The error messages are mostly system dependent.
.SH USAGE
perror [OPTIONS] [ERRORCODE [ERRORCODE...]]
.SH SYNOPSIS
.B perror
.RB [ \-? | \-\-help ]
.RB [ \-I | \-\-info ]
.RB [ \-s | \-\-silent ]
.RB [ \-v | \-\-verbose ]
.RB [ \-V | \-\-version ]
.SH DESCRIPTION
.TP
.BR \-? | \-\-help
Displays this help and exits.
.TP
.BR \-I | \-\-info
Synonym for the above.
.TP
.BR \-s | \-\-silent
Only print the error message
.TP
.BR \-v | \-\-verbose
Print error code and message (default).
.TP
.BR \-V | \-\-version
Displays version information and exits.
.SH EXAMPLE
shell> perror 64 79
Error code 64: Machine is not on the network
Error code 79: Can not access a needed shared library
.SH "SEE ALSO"
isamchk (1),
isamlog (1),
mysqlaccess (1),
mysqladmin (1),
mysqlbug (1),
mysqld (1),
mysqldump (1),
mysqlshow (1),
msql2mysql (1),
perror (1),
replace (1),
safe_mysqld (1),
which1 (1),
zap (1),
.SH AUTHOR
Ver 1.0, distribution 3.23.29a
Michael (Monty) Widenius (monty@tcx.se),
TCX Datakonsult AB (http://www.tcx.se).
This software comes with no warranty.
Manual page by L. (Kill-9) Pedersen
(kill-9@kill\-9.dk), Mercurmedia Data Model Architect /
system developer (http://www.mercurmedia.com)
.\" end of man page
.TH REPLACE 1 "20 December 2000"
.SH NAME
.TP
replace - A utility program that is used by msql2mysql, but that has more general applicability as well. replace changes strings in place in files or on the standard input. Uses a finite state machine to match longer strings first. Can be used to swap strings.
.SH USAGE
replace [-?svIV] from to from to ... -- [files]
.TP
or
.TP
replace [-?svIV] from to from to ... < fromfile > tofile
.SH SYNOPSIS
.B replace
.RB [ -? | -I ]
.RB [ -s ]
.RB [ -v ]
.SH DESCRIPTION
.TP
.BR replace
.TP
.BR -? | -I
info
.TP
.BR -s
silent
.TP
.BR -v
verbose
.SH EXTRA INFO
.B Special characters in from string:
.TP
\\^
Match start of line.
.TP
\\$
Match end of line.
.TP
\\b
Match space-character, start of line or end of line. For a end \\b the next replace starts locking at the end space-character. A \\b alone in a string matches only a space-character.
.SH EXAMPLE
this command swaps a and b in the given files:
.TP
shell> replace a b b a -- file1 file2 ...
.SH "SEE ALSO"
isamchk (1),
isamlog (1),
mysqlaccess (1),
mysqladmin (1),
mysqlbug (1),
mysqld (1),
mysqldump (1),
mysqlshow (1),
msql2mysql (1),
perror (1),
replace (1),
safe_mysqld (1),
which1 (1),
zap (1),
.SH AUTHOR
Ver 1.0, distribution 3.23.29a
Michael (Monty) Widenius (monty@tcx.se),
TCX Datakonsult AB (http://www.tcx.se).
This software comes with no warranty.
Manual page by L. (Kill-9) Pedersen
(kill-9@kill-9.dk), Mercurmedia Data Model Architect /
system developer (http://www.mercurmedia.com)
.\" end of man page
.TH SAFE_MYSQLD 1 "19 December 2000"
.SH NAME
.BR safe_mysqld
is the recommended way to start a mysqld daemon on Unix. safe_mysqld adds some safety features such as restarting the server when an error occurs and logging run-time information to a log file.
.SH SYNOPSIS
.B safe_mysqld
.RB [ \-\-basedir=\fP\fIpath\fP ]
.RB [ \-\-core\-file\-size=# ]
.RB [ \-\-defaults\-extra\-file=\fP\fIpath\fP ]
.RB [ \-\-defaults\-file=\fP\fIpath\fP ]
.RB [ \-\-open\-files=# ]
.RB [ \-\-datadir=\fP\fIpath\fP ]
.RB [ \-\-err\-log=\fP\fIpath \fP]
.RB [ \-\-ledir=path ]
.RB [ \-\-log=\fP\fIpath\fP ]
.RB [ \-\-no\-defaults ]
.RB [ \-\-open\-files=# ]
.RB [ \-\-pid\-file=\fP\fIpath\fP ]
.RB [ \-\-port=# ]
.RB [ \-\-socket=\fP\fIpath\fP ]
.RB [ \-\-timezone=# ]
.RB [ \-\-user=# ]
.SH DESCRIPTION
.TP
.BR \-\-basedir=\fP\fIpath \fP
.TP
.BR \-\-core\-file\-size=#
.TP
.BR \-\-defaults\-extra\-file=\fP\fIpath \fP
.TP
.BR \-\-defaults\-file=\fP\fIpath \fP
.TP
.BR \-\-open\-files=#
Size of the core file mysqld should be able to create. Passed to ulimit \-c.
.TP
.BR \-\-datadir=\fP\fIpath \fP
.TP
.BR \-\-err\-log=\fP\fIpath \fP
.TP
.BR \-\-ledir=\fP\fIpath \fP
Path to mysqld
.TP
.BR \-\-log=\fP\fIpath \fP
.TP
.BR \-\-no\-defaults
.TP
.BR \-\-open\-files=#
Number of files mysqld should be able to open. Passed to ulimit \-n.
.TP
.BR \-\-pid\-file=\fP\fIpath \fP
.TP
.BR \-\-port=#
.TP
.BR \-\-socket=\fP\fIpath \fP
.TP
.BR \-\-timezone=#
Set the timezone (the TZ) variable to the value of this parameter.
.TP
.BR \-\-user=#
.SH NOTE
Note that all options on the command line to safe_mysqld are passed to mysqld. If you wants to use any options in safe_mysqld that mysqld doesn't support, you must specify these in the option file.
.SH "SEE ALSO"
isamchk (1),
isamlog (1),
mysqlaccess (1),
mysqladmin (1),
mysqlbug (1),
mysqld (1),
mysqldump (1),
mysqlshow (1),
msql2mysql (1),
perror (1),
replace (1),
safe_mysqld (1),
which1 (1),
zap (1),
.SH AUTHOR
Ver 1.0, distribution 3.23.29a
Michael (Monty) Widenius (monty@tcx.se),
TCX Datakonsult AB (http://www.tcx.se).
This software comes with no warranty.
Manual page by L. (Kill-9) Pedersen
(kill-9@kill\-9.dk), Mercurmedia Data Model Architect /
system developer (http://www.mercurmedia.com)
.\" end of man page
.TH WHICH 1 "20 December 2000"
.SH NAME
which - Jani please supply one.
.SH USAGE
which [options] [--] programname [...]
.SH SYNOPSIS
.B which
.RB [ \-\-version | \-[vV] ]
.RB [ \-\-skip\-dot ]
.RB [ \-\-skip\-tilde ]
.RB [ \-\-show\-dot ]
.RB [ \-\-show\-tilde ]
.RB [ \-\-tty\-only ]
.RB [ \-\-all | \-a ]
.RB [ \-\-read\-alias | \-i ]
.RB [ \-\-skip\-alias ]
.SH DESCRIPTION
.TP
.BR which
supports by executing
.TP
.BR \-\-version | \-[vV]
Print version and exit successfully.
.TP
.BR \-\-skip\-dot
Skip directories in PATH that start with a dot.
.TP
.BR \-\-skip\-tilde
Skip directories in PATH that start with a tilde.
.TP
.BR \-\-show\-dot
Don\'t expand a dot to current directory in output.
.TP
.BR \-\-show\-tilde
Output a tilde for HOME directory for non-root.
.TP
.BR \-\-tty\-only
Stop processing options on the right if not on tty.
.TP
.BR \-\-all | \-a
Print all matches in PATH, not just the first
.TP
.BR \-\-read\-alias | \-i
Read list of aliases from stdin.
.TP
.BR \-\-skip\-alias
Ignore option
.BR --read-alias;
don\'t read stdin.
.SH "SEE ALSO"
isamchk (1), isamlog (1), mysqlaccess (1), mysqladmin (1), mysqlbug (1), mysqld (1), mysqldump (1), mysqlshow (1), msql2mysql (1), perror (1), replace (1), safe_mysqld (1), which1 (1), zap (1),
.SH AUTHOR
Ver 1.0, distribution 3.23.29a Michael (Monty) Widenius (monty@tcx.se), TCX Datakonsult AB (http://www.tcx.se). This software comes with no warranty. Manual page by L. (Kill-9) Pedersen (kill-9@kill-9.dk), Mercurmedia Data Model Architect / system developer (http://www.mercurmedia.com)
.\" end of man page
\ No newline at end of file
......@@ -47,7 +47,8 @@ uint my_write(int Filedes, const byte *Buffer, uint Count, myf MyFlags)
if (my_thread_var->abort)
MyFlags&= ~ MY_WAIT_IF_FULL; /* End if aborted by user */
#endif
if (my_errno == ENOSPC && (MyFlags & MY_WAIT_IF_FULL))
if (my_errno == ENOSPC && (MyFlags & MY_WAIT_IF_FULL) &&
(uint) writenbytes != (uint) -1)
{
if (!(errors++ % MY_WAIT_GIVE_USER_A_MESSAGE))
my_error(EE_DISK_FULL,MYF(ME_BELL | ME_NOREFRESH),
......
......@@ -8,7 +8,7 @@ use Fcntl;
BEGIN {
# ****************************
# static information...
$VERSION = "2.05, 17 Feb 2000";
$VERSION = "2.06, 20 Dec 2000";
$0 =~ m%/([^/]+)$%o;
$script = $1;
$script = 'MySQLAccess' unless $script;
......@@ -302,6 +302,8 @@ Release Notes:
2.05: (2000-02-17) Monty
Moved the log file from /tmp to ~
2.06: Don't print '+++USING FULL WHERE CLAUSE+++'
_RELEASE
$TODO = <<_TODO;
......@@ -1468,7 +1470,7 @@ sub Sort_table {
# server version 3.21 has a full where clause :-)
if ($MySQLaccess::Host::SERVER >= '3.21') {
print "+++USING FULL WHERE CLAUSE+++\n";
# print "+++USING FULL WHERE CLAUSE+++\n";
$start = "SELECT *,UCASE(host) as ucase_host FROM $tbl WHERE ";
$end = ' ORDER BY ' . join(',', @order) . ";\n";
}
......
......@@ -46,7 +46,9 @@ parse_arguments() {
# safe_mysqld-specific options - must be set in my.cnf ([safe_mysqld])!
--ledir=*) ledir=`echo "$arg" | sed -e "s;--ledir=;;"` ;;
--err-log=*) err_log=`echo "$arg" | sed -e "s;--err-log=;;"` ;;
# QQ The --open-files should be removed
--open-files=*) open_files=`echo "$arg" | sed -e "s;--open-files=;;"` ;;
--open-files-limit=*) open_files=`echo "$arg" | sed -e "s;--open-files-limit=;;"` ;;
--core-file-size=*) core_file_size=`echo "$arg" | sed -e "s;--core_file_size=;;"` ;;
--timezone=*) TZ=`echo "$arg" | sed -e "s;--timezone=;;"` ; export TZ; ;;
*)
......
Testing server 'MySQL 3.23.29a gamma' at 2000-12-17 21:48:32
Testing server 'MySQL 3.23.29a gamma' at 2000-12-24 6:39:08
ATIS table test
......@@ -6,14 +6,15 @@ 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): 3 wallclock secs ( 0.49 usr 0.45 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to insert (9768): 3 wallclock secs ( 0.38 usr 0.42 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Retrieving data
Time for select_simple_join (500): 2 wallclock secs ( 0.65 usr 0.26 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_join (200): 16 wallclock secs ( 4.55 usr 2.23 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_distinct (800): 12 wallclock secs ( 1.64 usr 0.81 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_group (2800): 14 wallclock secs ( 1.86 usr 0.40 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_simple_join (500): 2 wallclock secs ( 0.68 usr 0.19 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_join (100): 2 wallclock secs ( 0.57 usr 0.28 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_key_prefix_join (100): 13 wallclock secs ( 4.13 usr 1.96 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_distinct (800): 11 wallclock secs ( 1.84 usr 0.70 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_group (2800): 13 wallclock secs ( 1.55 usr 0.51 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: 47 wallclock secs ( 9.20 usr 4.15 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to drop_table (28): 0 wallclock secs ( 0.01 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 44 wallclock secs ( 9.18 usr 4.06 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.29a gamma' at 2000-12-17 21:49:19
Testing server 'MySQL 3.23.29a gamma' at 2000-12-24 6:39:53
Testing of ALTER TABLE
Testing with 1000 columns and 1000 rows in 20 steps
Insert data into the table
Time for insert (1000) 1 wallclock secs ( 0.06 usr 0.07 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for insert (1000) 0 wallclock secs ( 0.09 usr 0.03 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for alter_table_add (992): 258 wallclock secs ( 0.26 usr 0.07 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for alter_table_add (992): 263 wallclock secs ( 0.10 usr 0.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for create_index (8): 4 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for drop_index (8): 4 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for alter_table_drop (496): 196 wallclock secs ( 0.07 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for alter_table_drop (496): 197 wallclock secs ( 0.05 usr 0.03 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 463 wallclock secs ( 0.39 usr 0.15 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 468 wallclock secs ( 0.25 usr 0.12 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.29a gamma' at 2000-12-17 21:57:03
Testing server 'MySQL 3.23.29a gamma' at 2000-12-24 6:47:42
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): 9 wallclock secs ( 4.22 usr 3.26 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to select_many_fields(1000): 9 wallclock secs ( 4.02 usr 3.44 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): 13 wallclock secs ( 4.09 usr 3.47 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to select_many_fields(1000): 13 wallclock secs ( 4.20 usr 3.36 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing insert VALUES()
Time to insert_many_fields(1000): 3 wallclock secs ( 0.34 usr 0.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to insert_many_fields(1000): 3 wallclock secs ( 0.37 usr 0.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing insert (all_fields) VALUES()
Time to insert_many_fields(1000): 6 wallclock secs ( 0.05 usr 0.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to insert_many_fields(1000): 6 wallclock secs ( 0.07 usr 0.02 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 32 wallclock secs ( 8.71 usr 6.83 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 31 wallclock secs ( 8.67 usr 6.87 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.29a gamma' at 2000-12-17 21:57:35
Testing server 'MySQL 3.23.29a gamma' at 2000-12-24 6:48:14
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): 13 wallclock secs ( 7.93 usr 2.58 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to connect (10000): 12 wallclock secs ( 7.18 usr 2.61 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Test connect/simple select/disconnect
Time for connect+select_simple (10000): 14 wallclock secs ( 7.69 usr 3.24 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for connect+select_simple (10000): 14 wallclock secs ( 7.39 usr 3.61 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Test simple select
Time for select_simple (10000): 2 wallclock secs ( 0.53 usr 0.51 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_simple (10000): 2 wallclock secs ( 0.47 usr 0.71 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): 15 wallclock secs ( 7.98 usr 3.18 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to connect+select_1_row (10000): 15 wallclock secs ( 7.75 usr 3.29 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing select 1 row from table
Time to select_1_row (10000): 3 wallclock secs ( 0.71 usr 0.67 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to select_1_row (10000): 2 wallclock secs ( 0.45 usr 0.57 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing select 2 rows from table
Time to select_2_rows (10000): 3 wallclock secs ( 0.65 usr 0.68 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to select_2_rows (10000): 3 wallclock secs ( 0.59 usr 0.61 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Test select with aritmetic (+)
Time for select_column+column (10000): 4 wallclock secs ( 0.48 usr 0.60 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_column+column (10000): 3 wallclock secs ( 0.58 usr 0.68 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing retrieval of big records (65000 bytes)
Time to select_big (10000): 25 wallclock secs ( 9.05 usr 6.81 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to select_big (10000): 28 wallclock secs ( 9.97 usr 5.76 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 79 wallclock secs (35.02 usr 18.29 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 79 wallclock secs (34.39 usr 17.84 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.29a gamma' at 2000-12-17 21:58:54
Testing server 'MySQL 3.23.29a gamma' at 2000-12-24 15:28:12
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): 28 wallclock secs ( 1.87 usr 0.47 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for create_MANY_tables (10000): 29 wallclock secs ( 2.27 usr 0.46 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Accessing tables
Time to select_group_when_MANY_tables (10000): 11 wallclock secs ( 0.81 usr 0.61 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to select_group_when_MANY_tables (10000): 16 wallclock secs ( 0.79 usr 0.62 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing drop
Time for drop_table_when_MANY_tables (10000): 14 wallclock secs ( 0.60 usr 0.60 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for drop_table_when_MANY_tables (10000): 12 wallclock secs ( 0.63 usr 0.43 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing create+drop
Time for create+drop (10000): 36 wallclock secs ( 2.52 usr 0.89 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for create_key+drop (10000): 46 wallclock secs ( 4.05 usr 0.70 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 135 wallclock secs ( 9.85 usr 3.27 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for create+drop (10000): 29 wallclock secs ( 2.43 usr 0.82 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for create_key+drop (10000): 40 wallclock secs ( 3.97 usr 0.87 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 126 wallclock secs (10.09 usr 3.20 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.29a gamma' at 2000-12-17 22:38:07
Testing server 'MySQL 3.23.29a gamma' at 2000-12-24 7:26:42
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): 4 wallclock secs ( 0.88 usr 0.39 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to insert (10000): 5 wallclock secs ( 1.03 usr 0.48 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.16 usr 0.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range (410:1057904): 201 wallclock secs ( 9.29 usr 3.51 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for min_max_on_key (70000): 198 wallclock secs (22.86 usr 4.08 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_on_key (50000): 467 wallclock secs (17.82 usr 3.19 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_big (70:17207): 1 wallclock secs ( 0.14 usr 0.04 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range (410:1057904): 194 wallclock secs ( 9.08 usr 3.79 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for min_max_on_key (70000): 230 wallclock secs (22.79 usr 4.24 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_on_key (50000): 508 wallclock secs (16.98 usr 2.98 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_group_on_key_parts (1000:100000): 62 wallclock secs ( 1.13 usr 0.43 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_group_on_key_parts (1000:100000): 54 wallclock secs ( 1.00 usr 0.47 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing count(distinct) on the table
Time for count_distinct (2000:2000): 124 wallclock secs ( 0.68 usr 0.16 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group_on_key (1000:6000): 61 wallclock secs ( 0.43 usr 0.08 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group_on_key_parts (1000:100000): 73 wallclock secs ( 1.27 usr 0.42 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group (1000:100000): 74 wallclock secs ( 1.26 usr 0.40 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_big (100:1000000): 47 wallclock secs ( 7.79 usr 5.58 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 1312 wallclock secs (63.58 usr 18.29 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct (2000:2000): 119 wallclock secs ( 0.66 usr 0.17 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group_on_key (1000:6000): 60 wallclock secs ( 0.40 usr 0.08 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group_on_key_parts (1000:100000): 81 wallclock secs ( 0.79 usr 0.41 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group (1000:100000): 80 wallclock secs ( 1.02 usr 0.43 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_big (100:1000000): 47 wallclock secs ( 7.46 usr 5.86 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 1379 wallclock secs (61.35 usr 18.95 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.29a gamma' at 2000-12-17 22:59:59
Testing server 'MySQL 3.23.29a gamma' at 2000-12-24 7:49:42
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): 13 wallclock secs ( 1.64 usr 1.14 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to insert (31000): 12 wallclock secs ( 1.45 usr 1.03 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): 4 wallclock secs ( 1.92 usr 0.66 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for wisc_benchmark (114): 4 wallclock secs ( 1.80 usr 0.69 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 17 wallclock secs ( 3.57 usr 1.80 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 16 wallclock secs ( 3.25 usr 1.72 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
......@@ -31,7 +31,7 @@
# $server Object for current server
# $limits Hash reference to limits for benchmark
$benchmark_version="2.10";
$benchmark_version="2.11";
use Getopt::Long;
require "$pwd/server-cfg" || die "Can't read Configuration file: $!\n";
......
......@@ -188,6 +188,13 @@ sub new
$smds{'q16'} = 'a';
$smds{'q17'} = 'c';
# Some fixes that depends on the environment
if (defined($main::opt_create_options) &&
$main::opt_create_options =~ /type=heap/i)
{
$limits{'working_blobs'} = 0; # HEAP tables can't handle BLOB's
}
return $self;
}
......
......@@ -167,7 +167,9 @@ print "Retrieving data\n";
);
@Q2=("select_join",
"select airline.airline_name,aircraft.aircraft_type from aircraft,airline,flight where flight.aircraft_code=aircraft.aircraft_code and flight.airline_code=airline.airline_code",579,1,
"select airline.airline_name,aircraft.aircraft_type from aircraft,airline,flight where flight.aircraft_code=aircraft.aircraft_code and flight.airline_code=airline.airline_code",579,1);
@Q21=("select_key_prefix_join",
"select fare.fare_code from restrict_carrier,airline,fare where restrict_carrier.airline_code=airline.airline_code and fare.restrict_code=restrict_carrier.restrict_code",5692,1,
);
......@@ -214,7 +216,7 @@ print "Retrieving data\n";
"select engines,category,cruising_speed,from_airport,to_airport FROM aircraft,flight WHERE category='JET' AND ENGINES >= 1 AND aircraft.aircraft_code=flight.aircraft_code AND to_airport NOT LIKE from_airport AND stops>0 GROUP BY engines,category,cruising_speed,from_airport,to_airport ORDER BY engines DESC",29,$limits->{'group_functions'} && $limits->{'like_with_column'},
);
@Q=(\@Q1,\@Q2,\@Q3,\@Q4);
@Q=(\@Q1,\@Q2,\@Q21,\@Q3,\@Q4);
foreach $Q (@Q)
......
......@@ -291,7 +291,7 @@ $loop_time=new Benchmark;
$estimated=$rows=0;
for ($i=1 ; $i <= $small_loop_count ; $i++)
{
$rows+=fetch_all_rows($dbh,"select id from bench1 order by id",1);
$rows+=fetch_all_rows($dbh,"select id,id2 from bench1 order by id,id2",1);
$end_time=new Benchmark;
last if ($estimated=predict_query_time($loop_time,$end_time,\$i,$i,
$small_loop_count));
......@@ -303,11 +303,12 @@ else
print " for order_by_big_key ($small_loop_count:$rows): " .
timestr(timediff($end_time, $loop_time),"all") . "\n";
$loop_time=new Benchmark;
$estimated=$rows=0;
for ($i=1 ; $i <= $small_loop_count ; $i++)
{
$rows+=fetch_all_rows($dbh,"select id from bench1 order by id desc",1);
$rows+=fetch_all_rows($dbh,"select id,id2 from bench1 order by id desc, id2 desc",1);
$end_time=new Benchmark;
last if ($estimated=predict_query_time($loop_time,$end_time,\$i,$i,
$small_loop_count));
......@@ -319,6 +320,24 @@ else
print " for order_by_big_key_desc ($small_loop_count:$rows): " .
timestr(timediff($end_time, $loop_time),"all") . "\n";
$loop_time=new Benchmark;
$estimated=$rows=0;
for ($i=1 ; $i <= $small_loop_count ; $i++)
{
$rows+=fetch_all_rows($dbh,"select id from bench1 order by id desc",1);
$end_time=new Benchmark;
last if ($estimated=predict_query_time($loop_time,$end_time,\$i,$i,
$small_loop_count));
}
if ($estimated)
{ print "Estimated time"; }
else
{ print "Time"; }
print " for order_by_big_key_prefix ($small_loop_count:$rows): " .
timestr(timediff($end_time, $loop_time),"all") . "\n";
$loop_time=new Benchmark;
$estimated=$rows=0;
for ($i=1 ; $i <= $small_loop_count ; $i++)
......@@ -407,7 +426,7 @@ if ($estimated)
{ print "Estimated time"; }
else
{ print "Time"; }
print " for order_by_key ($range_loop_count:$rows): " .
print " for order_by_key_prefix ($range_loop_count:$rows): " .
timestr(timediff($end_time, $loop_time),"all") . "\n";
$sel=$limits->{'order_by_unused'} ? "id2" : "id2,id3";
......@@ -889,13 +908,23 @@ print "Testing update with key\n";
$loop_time=new Benchmark;
for ($i=0 ; $i < $opt_loop_count*3 ; $i++)
{
$sth = $dbh->do("update bench1 set dummy1='updated' where id=$i") or die $DBI::errstr;
$sth = $dbh->do("update bench1 set dummy1='updated' where id=$i and id2=$i") or die $DBI::errstr;
}
$end_time=new Benchmark;
print "Time for update_with_key (" . ($opt_loop_count*3) . "): " .
timestr(timediff($end_time, $loop_time),"all") . "\n";
$loop_time=new Benchmark;
for ($i=0 ; $i < $opt_loop_count*3 ; $i+=3)
{
$sth = $dbh->do("update bench1 set dummy1='updated' where id=$i") or die $DBI::errstr;
}
$end_time=new Benchmark;
print "Time for update_with_key_prefix (" . ($opt_loop_count) . "): " .
timestr(timediff($end_time, $loop_time),"all") . "\n";
print "\nTesting update of all rows\n";
$loop_time=new Benchmark;
for ($i=0 ; $i < $small_loop_count ; $i++)
......@@ -1530,7 +1559,12 @@ sub check_or_range
$estimated=0;
$loop_time=new Benchmark;
$found=0;
$loop_count=$range_loop_count*10;
# The number of tests must be divisible by the following
$tmp= $limits->{'func_extra_in_num'} ? 15 : 10;
# We need to calculate the exact number of test to make 'Estimated' right
$loop_count=$range_loop_count*10+$tmp-1;
$loop_count=$loop_count- ($loop_count % $tmp);
for ($count=0 ; $count < $loop_count ; )
{
for ($rowcnt=0; $rowcnt <= $columns; $rowcnt+= $columns/4)
......
......@@ -76,7 +76,8 @@
const char *ha_berkeley_ext=".db";
bool berkeley_skip=0,berkeley_shared_data=0;
u_int32_t berkeley_init_flags= DB_PRIVATE, berkeley_lock_type=DB_LOCK_DEFAULT;
u_int32_t berkeley_init_flags= DB_PRIVATE | DB_RECOVER, berkeley_env_flags=0,
berkeley_lock_type=DB_LOCK_DEFAULT;
ulong berkeley_cache_size;
char *berkeley_home, *berkeley_tmpdir, *berkeley_logdir;
long berkeley_lock_scan_time=0;
......@@ -125,6 +126,7 @@ bool berkeley_init(void)
db_env->set_noticecall(db_env, berkeley_noticecall);
db_env->set_tmp_dir(db_env, berkeley_tmpdir);
db_env->set_data_dir(db_env, mysql_data_home);
db_env->set_flags(db_env, berkeley_env_flags, 1);
if (berkeley_logdir)
db_env->set_lg_dir(db_env, berkeley_logdir);
......@@ -790,6 +792,7 @@ int ha_berkeley::write_row(byte * record)
error=file->put(file, transaction, create_key(&prim_key, primary_key,
key_buff, record),
&row, key_type[primary_key]);
last_dup_key=primary_key;
}
else
{
......@@ -818,6 +821,8 @@ int ha_berkeley::write_row(byte * record)
}
}
}
else
last_dup_key=primary_key;
if (!error)
{
DBUG_PRINT("trans",("committing subtransaction"));
......
......@@ -53,7 +53,8 @@ class ha_berkeley: public handler
ulong alloced_rec_buff_length;
ulong changed_rows;
uint primary_key,last_dup_key, hidden_primary_key, version;
bool fixed_length_row, fixed_length_primary_key, key_read;
u_int32_t lock_on_read;
bool fixed_length_row, fixed_length_primary_key, key_read, using_ignore;
bool fix_rec_buff_for_blob(ulong length);
byte current_ident[BDB_HIDDEN_PRIMARY_KEY_LENGTH];
......@@ -157,7 +158,8 @@ class ha_berkeley: public handler
};
extern bool berkeley_skip, berkeley_shared_data;
extern u_int32_t berkeley_init_flags,berkeley_lock_type,berkeley_lock_types[];
extern u_int32_t berkeley_init_flags,berkeley_env_flags, berkeley_lock_type,
berkeley_lock_types[];
extern ulong berkeley_cache_size, berkeley_max_lock;
extern char *berkeley_home, *berkeley_tmpdir, *berkeley_logdir;
extern long berkeley_lock_scan_time;
......
......@@ -125,7 +125,7 @@ void kill_one_thread(THD *thd, ulong id);
#define QUERY_PRIOR 6
#endif /* __WIN92__ */
/* Bits fro testflag */
/* Bits from testflag */
#define TEST_PRINT_CACHED_TABLES 1
#define TEST_NO_KEY_GROUP 2
#define TEST_MIT_THREAD 4
......@@ -161,6 +161,7 @@ void kill_one_thread(THD *thd, ulong id);
#define OPTION_BEGIN OPTION_NOT_AUTO_COMMIT*2
#define OPTION_QUICK OPTION_BEGIN*2
#define OPTION_QUOTE_SHOW_CREATE OPTION_QUICK*2
#define OPTION_INTERNAL_SUBTRANSACTIONS OPTION_QUOTE_SHOW_CREATE*2
/* Set if we are updating a non-transaction safe table */
#define OPTION_STATUS_NO_TRANS_UPDATE OPTION_QUOTE_SHOW_CREATE*2
......
......@@ -204,7 +204,8 @@ ulong keybuff_size,sortbuff_size,max_item_sort_length,table_cache_size,
thread_stack_min,net_wait_timeout,what_to_log= ~ (1L << (uint) COM_TIME),
query_buff_size, lower_case_table_names, mysqld_net_retry_count,
net_interactive_timeout, slow_launch_time = 2L,
net_read_timeout,net_write_timeout,slave_open_temp_tables=0;
net_read_timeout,net_write_timeout,slave_open_temp_tables=0,
open_files_limit=0;
ulong thread_cache_size=0, binlog_cache_size=0, max_binlog_cache_size=0;
volatile ulong cached_thread_count=0;
......@@ -1538,8 +1539,10 @@ int main(int argc, char **argv)
{
uint wanted_files=10+(uint) max(max_connections*5,
max_connections+table_cache_size*2);
set_if_bigger(wanted_files, open_files_limit);
// Note that some system returns 0 if we succeed here:
uint files=set_maximum_open_files(wanted_files);
if (files && files < wanted_files) // Some systems return 0
if (files && files < wanted_files && ! open_files_limit)
{
max_connections= (ulong) min((files-10),max_connections);
table_cache_size= (ulong) max((files-10-max_connections)/2,64);
......@@ -2302,7 +2305,7 @@ enum options {
OPT_BDB_HOME, OPT_BDB_LOG,
OPT_BDB_TMP, OPT_BDB_NOSYNC,
OPT_BDB_LOCK, OPT_BDB_SKIP,
OPT_BDB_RECOVER, OPT_BDB_SHARED,
OPT_BDB_NO_RECOVER, OPT_BDB_SHARED,
OPT_MASTER_HOST,
OPT_MASTER_USER, OPT_MASTER_PASSWORD,
OPT_MASTER_PORT, OPT_MASTER_INFO_FILE,
......@@ -2329,7 +2332,7 @@ static struct option long_options[] = {
{"bdb-home", required_argument, 0, (int) OPT_BDB_HOME},
{"bdb-lock-detect", required_argument, 0, (int) OPT_BDB_LOCK},
{"bdb-logdir", required_argument, 0, (int) OPT_BDB_LOG},
{"bdb-recover", no_argument, 0, (int) OPT_BDB_RECOVER},
{"bdb-no-recover", no_argument, 0, (int) OPT_BDB_NO_RECOVER},
{"bdb-no-sync", no_argument, 0, (int) OPT_BDB_NOSYNC},
{"bdb-shared-data", no_argument, 0, (int) OPT_BDB_SHARED},
{"bdb-tmpdir", required_argument, 0, (int) OPT_BDB_TMP},
......@@ -2540,6 +2543,8 @@ CHANGEABLE_VAR changeable_vars[] = {
NET_READ_TIMEOUT, 1, 65535, 0, 1 },
{ "net_write_timeout", (long*) &net_write_timeout,
NET_WRITE_TIMEOUT, 1, 65535, 0, 1 },
{ "open_files_limit", (long*) &open_files_limit,
0, 0, 65535, 0, 1},
{ "query_buffer_size", (long*) &query_buff_size,
0, MALLOC_OVERHEAD, (long) ~0, MALLOC_OVERHEAD, IO_SIZE },
{ "record_buffer", (long*) &my_default_record_cache_size,
......@@ -2620,6 +2625,7 @@ struct show_var_st init_vars[]= {
{"net_read_timeout", (char*) &net_read_timeout, SHOW_LONG},
{"net_retry_count", (char*) &mysqld_net_retry_count, SHOW_LONG},
{"net_write_timeout", (char*) &net_write_timeout, SHOW_LONG},
{"open_files_limit", (char*) &open_files_limit, SHOW_LONG},
{"pid_file", (char*) pidfile_name, SHOW_CHAR},
{"port", (char*) &mysql_port, SHOW_INT},
{"protocol_version", (char*) &protocol_version, SHOW_INT},
......@@ -2821,7 +2827,7 @@ static void usage(void)
(DEFAULT, OLDEST, RANDOM or YOUNGEST, # sec)\n\
--bdb-logdir=directory Berkeley DB log file directory\n\
--bdb-no-sync Don't synchronously flush logs\n\
--bdb-recover Start Berkeley DB in recover mode\n\
--bdb-no-recover Don't try to recover Berkeley DB tables on start\n\
--bdb-shared-data Start Berkeley DB in multi-process mode\n\
--bdb-tmpdir=directory Berkeley DB tempfile name\n\
--skip-bdb Don't use berkeley db (will save memory)\n\
......@@ -3310,10 +3316,10 @@ static void get_options(int argc,char **argv)
berkeley_home=optarg;
break;
case OPT_BDB_NOSYNC:
berkeley_init_flags|=DB_TXN_NOSYNC;
berkeley_env_flags|=DB_TXN_NOSYNC;
break;
case OPT_BDB_RECOVER:
berkeley_init_flags|=DB_RECOVER;
case OPT_BDB_NO_RECOVER:
berkeley_init_flags&= ~(DB_RECOVER);
break;
case OPT_BDB_TMP:
berkeley_tmpdir=optarg;
......
......@@ -190,6 +190,8 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields,
error=0;
id=0;
thd->proc_info="update";
if (duplic == DUP_IGNORE || duplic == DUP_REPLACE)
table->file->extra(HA_EXTRA_IGNORE_DUP_KEY);
while ((values = its++))
{
if (fields.elements || !value_count)
......@@ -281,6 +283,8 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields,
table->next_number_field=0;
thd->count_cuted_fields=0;
thd->next_insert_id=0; // Reset this if wrongly used
if (duplic == DUP_IGNORE || duplic == DUP_REPLACE)
table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
if (error)
goto abort;
......@@ -1057,6 +1061,7 @@ bool delayed_insert::handle_inserts(void)
{
int error;
uint max_rows;
bool using_ignore=0;
DBUG_ENTER("handle_inserts");
/* Allow client to insert new rows */
......@@ -1097,6 +1102,12 @@ bool delayed_insert::handle_inserts(void)
table->time_stamp=row->time_stamp;
info.handle_duplicates= row->dup;
if (info.handle_duplicates == DUP_IGNORE ||
info.handle_duplicates == DUP_REPLACE)
{
table->file->extra(HA_EXTRA_IGNORE_DUP_KEY);
using_ignore=1;
}
thd.net.last_errno = 0; // reset error for binlog
if (write_record(table,&info))
{
......@@ -1106,6 +1117,11 @@ bool delayed_insert::handle_inserts(void)
pthread_mutex_unlock(&LOCK_delayed_status);
row->log_query = 0;
}
if (using_ignore)
{
using_ignore=0;
table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
}
if (row->query && row->log_query)
{
mysql_update_log.write(&thd,row->query, row->query_length);
......@@ -1193,6 +1209,9 @@ select_insert::prepare(List<Item> &values)
thd->cuted_fields=0;
if (info.handle_duplicates != DUP_REPLACE)
table->file->extra(HA_EXTRA_WRITE_CACHE);
if (info.handle_duplicates == DUP_IGNORE ||
info.handle_duplicates == DUP_REPLACE)
table->file->extra(HA_EXTRA_IGNORE_DUP_KEY);
table->file->deactivate_non_unique_index((ha_rows) 0);
DBUG_RETURN(0);
}
......@@ -1204,6 +1223,7 @@ select_insert::~select_insert()
if (save_time_stamp)
table->time_stamp=save_time_stamp;
table->next_number_field=0;
table->file->extra(HA_EXTRA_RESET);
}
thd->count_cuted_fields=0;
}
......@@ -1246,6 +1266,7 @@ bool select_insert::send_eof()
int error,error2;
if (!(error=table->file->extra(HA_EXTRA_NO_CACHE)))
error=table->file->activate_all_index(thd);
table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
if ((error2=ha_autocommit_or_rollback(thd,error)) && ! error)
error=error2;
......@@ -1307,6 +1328,9 @@ select_create::prepare(List<Item> &values)
restore_record(table,2); // Get empty record
thd->count_cuted_fields=1; // count warnings
thd->cuted_fields=0;
if (info.handle_duplicates == DUP_IGNORE ||
info.handle_duplicates == DUP_REPLACE)
table->file->extra(HA_EXTRA_IGNORE_DUP_KEY);
DBUG_RETURN(0);
}
......@@ -1339,6 +1363,7 @@ bool select_create::send_eof()
abort();
else
{
table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
VOID(pthread_mutex_lock(&LOCK_open));
mysql_unlock_tables(thd, lock);
if (!table->tmp_table)
......@@ -1359,6 +1384,7 @@ void select_create::abort()
}
if (table)
{
table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
enum db_type table_type=table->db_type;
if (!table->tmp_table)
hash_delete(&open_cache,(byte*) table);
......
......@@ -214,6 +214,9 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
table->time_stamp=0;
table->next_number_field=table->found_next_number_field;
VOID(table->file->extra(HA_EXTRA_WRITE_CACHE));
if (handle_duplicates == DUP_IGNORE ||
handle_duplicates == DUP_REPLACE)
table->file->extra(HA_EXTRA_IGNORE_DUP_KEY);
table->file->deactivate_non_unique_index((ha_rows) 0);
table->copy_blobs=1;
if (!field_term->length() && !enclosed->length())
......@@ -223,7 +226,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
if (table->file->extra(HA_EXTRA_NO_CACHE) ||
table->file->activate_all_index(thd))
error=1; /* purecov: inspected */
table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
table->time_stamp=save_time_stamp;
table->next_number_field=0;
if (thd->lock)
......
......@@ -73,14 +73,15 @@ static void init_signals(void)
static inline bool end_active_trans(THD *thd)
{
int error=0;
if (thd->options & (OPTION_NOT_AUTO_COMMIT | OPTION_BEGIN))
{
thd->options&= ~(ulong) (OPTION_BEGIN | OPTION_STATUS_NO_TRANS_UPDATE);
thd->server_status&= ~SERVER_STATUS_IN_TRANS;
if (ha_commit(thd))
return 1;
error=1;
}
return 0;
return error;
}
......
......@@ -889,6 +889,12 @@ store_create_info(THD *thd, TABLE *table, String *packet)
packet->append(" CHECKSUM=1", 11);
if (table->db_create_options & HA_OPTION_DELAY_KEY_WRITE)
packet->append(" DELAY_KEY_WRITE=1",18);
if (table->comment && table->comment[0])
{
packet->append(" COMMENT='", 10);
append_unescaped(packet, table->comment);
packet->append('\'');
}
if (file->raid_type)
{
char buff[100];
......@@ -896,13 +902,6 @@ store_create_info(THD *thd, TABLE *table, String *packet)
my_raid_type(file->raid_type), file->raid_chunks, file->raid_chunksize/RAID_BLOCK_SIZE);
packet->append(buff);
}
if(table->comment)
{
packet->append(" COMMENT='", 10);
append_unescaped(packet, table->comment);
packet->append('\'');
}
DBUG_RETURN(0);
}
......
......@@ -1658,7 +1658,8 @@ copy_data_between_tables(TABLE *from,TABLE *to,
};
init_read_record(&info, thd, from, (SQL_SELECT *) 0, 1,1);
if (handle_duplicates == DUP_IGNORE)
to->file->extra(HA_EXTRA_IGNORE_DUP_KEY);
next_field=to->next_number_field;
while (!(error=info.read_record(&info)))
{
......@@ -1694,6 +1695,7 @@ copy_data_between_tables(TABLE *from,TABLE *to,
to->file->print_error(tmp_error,MYF(0));
error=1;
}
to->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
if (to->file->activate_all_index(thd))
error=1;
......
......@@ -210,6 +210,8 @@ int mysql_update(THD *thd,TABLE_LIST *table_list,List<Item> &fields,
if (!(test_flags & TEST_READCHECK)) /* For debugging */
VOID(table->file->extra(HA_EXTRA_NO_READCHECK));
if (handle_duplicates == DUP_IGNORE)
table->file->extra(HA_EXTRA_IGNORE_DUP_KEY);
init_read_record(&info,thd,table,select,0,1);
ha_rows updated=0L,found=0L;
......@@ -250,6 +252,7 @@ int mysql_update(THD *thd,TABLE_LIST *table_list,List<Item> &fields,
end_read_record(&info);
thd->proc_info="end";
VOID(table->file->extra(HA_EXTRA_READCHECK));
VOID(table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY));
table->time_stamp=save_time_stamp; // Restore auto timestamp pointer
using_transactions=table->file->has_transactions();
if (updated && (error <= 0 || !using_transactions))
......
......@@ -6,6 +6,14 @@ then
exit 1;
fi
echo "NOTE: This is a MySQL binary distribution. It's ready to run, you don't"
echo "need to configure it!"
echo ""
echo "To help you a bit, I am now going to create the needed MySQL databases"
echo "and start the MySQL server for you. If you run into any trouble, please"
echo "consult the MySQL manual, that you can find in the Docs directory."
echo ""
./scripts/mysql_install_db
if [ $? = 0 ]
then
......
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