Commit fe116472 authored by unknown's avatar unknown

Merge pgalbraith@bk-internal.mysql.com:/home/bk/mysql-5.0

into  krsna.patg.net:/home/patg/mysql-build/mysql-5.0.test2

parents 81aa2a35 45feb666
......@@ -2272,10 +2272,14 @@ AC_ARG_WITH(man,
if test "$with_man" = "yes"
then
man_dirs="man"
man1_files=`ls -1 $srcdir/man/*.1 | sed -e 's;^.*man/;;'`
man1_files=`echo $man1_files`
else
man_dirs=""
man1_files=""
fi
AC_SUBST(man_dirs)
AC_SUBST(man1_files)
# Shall we build the bench code?
AC_ARG_WITH(bench,
......
......@@ -17,30 +17,8 @@
## Process this file with automake to create Makefile.in
man_MANS = mysql.1 mysql_zap.1 mysqlaccess.1 \
mysqladmin.1 mysqld.1 mysqld_multi.1 mysqldump.1 mysqlshow.1 \
perror.1 replace.1 mysqld_safe.1 mysql_fix_privilege_tables.1
EXTRA_DIST = mysql.1.in mysql_zap.1.in \
mysqlaccess.1.in mysqladmin.1.in mysqld.1.in mysqld_multi.1.in \
mysqldump.1.in mysqlshow.1.in perror.1.in replace.1.in mysqlman.1.in \
mysqld_safe.1.in mysql_fix_privilege_tables.1.in
CLEANFILES = $(man_MANS)
SUFFIXES = .in
.in:
@RM@ -f $@ $@-t
@SED@ \
-e 's!@''MYSQL_BASE_VERSION''@!@MYSQL_BASE_VERSION@!' \
-e 's!@''sysconfdir''@!@sysconfdir@!' \
-e 's!@''bindir''@!$(bindir)!g' \
-e 's!@''libexecdir''@!$(libexecdir)!g' \
-e 's!@''localstatedir''@!$(localstatedir)!g' \
-e 's!@''MYSQL_NO_DASH_VERSION''@!@MYSQL_NO_DASH_VERSION@!' \
$< > $@-t
@MV@ $@-t $@
man1_MANS = @man1_files@
EXTRA_DIST = $(man1_MANS)
# Don't update the files from bitkeeper
%::SCCS/s.%
.TH mysql 1 "19 December 2000" "MySQL @MYSQL_BASE_VERSION@" "MySQL database"
.SH NAME
mysql \- text-based client for mysqld, a SQL-based relational database daemon
.SH USAGE
mysql [OPTIONS] [Database]
.SH SYNOPSIS
.B mysql
.RB [ \-B | \-\-batch ]
.RB [ \-# | \-\-debug=
.IR logfile ]
.RB [ \-T | \-\-debug-info ]
.RB [ \-e | \-\-exec=
.IR command ]
.RB [ \-f | \-\-force ]
.RB [ \-? | \-\-help ]
.RB [ \-h | \-\-host=
.IR hostname ]
.RB [ \-n | \-\-unbuffered ]
.RB [ \-p[pwd] ]
.RI [ \-\-password=[pwd] ]
.RB [ \-P | \-\-port=
.IR pnum ]
.RB [ \-q | \-\-quick ]
.RB [ \-r | \-\-raw ]
.RB [ \-s | \-\-silent ]
.RB [ \-S | \-\-socket=
.IR snum ]
.RB [ \-u | \-\-user=
.IR uname ]
.RB [ \-v | \-\-verbose ]
.RB [ \-V | \-\-version ]
.RB [ \-w | \-\-wait ]
.SH DESCRIPTION
The
.IR mysql
program provides a curses-based interface to the SQL-based database
server daemon,
.IR mysqld (1).
Full fuller documentation, refer to the HTML documents installed with
the package.
.SH OPTIONS
.TP
.BR \-B | \-\-batch
Print results with a tab as separator,
each row on a new line.
.TP
\fB\-#\fP|\fB\-\-debug=\fP\fIlogfile\fP
Employ the specified debug log.
.TP
.BR \-T | \-\-debug-info
Print debug information upon exiting.
.TP
\fB\-e | \-\-exec=\fP\fPcommand\fP
Execute the specified command and quit
.BR ( \-\-batch
is implicit).
.TP
.BR \-f | \-\-force
Continue even if the face of a SQL error.
.TP
.BR \-? | \-\-help
Display a help message and exit.
.TP
\fB\-h\fP|\fP\-\-host=\fP\fIhostname\fP
Connect to the specified host.
.TP
.BR \-n | \-\-unbuffered
Flush the buffer after each query.
.TP
\fB\-p\fP|\fB\-\-password\fP[\fB=\fP\fIpwd\fP]
Employ the specified password when connecting to the database server.
If a password is not supplied, it will be requested interactively.
.TP
\fB\-P\fR|\fB\-\-port=\fP\fIpnum\fP
Employ the specified port number for connecting to the database server.
.TP
.BR \-q | \-\-quick
Do not cache the result; print it row by row.
This may slow down the server if the output is suspended.
.TP
.BR \-r | \-\-raw
Write fields without conversion.
(used with
.BR \-\-batch ).
.TP
.BR \-s | \-\-silent
Silent mode: reduce the amount of output.
.TP
\fB\-S\fP|\fB\-\-socket=\fP\fIsnum\fP
Employ the specified socket file for connecting to the database server.
.TP
\fB\-u\fP|\fB\-\-user=\fP\fIuname\fP
Employ the specified user name for logging in to the server.
.TP
.BR \-v | \-\-verbose
Verbose mode: write more
Specifying this option
.I twice
produces a tabular output format.
.TP
.BR \-V | \-\-version
Print the
.I mysql
version number and exit.
.TP
.BR \-w | \-\-wait
Wait and retry if the database server connection is down.
.SH FILES
.TP 2.2i
.I /etc/my.cnf
MySQL configuration file
.TP
.I @bindir@/mysql
Client executable
.TP
.I @libexecdir@/mysqld
Server executable
.TP
.I @bindir@/mysqld_safe
executable shell script for starting mysqld safely
.TP
.I @localstatedir@
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),
mysqlaccess(1),
mysqladmin(1),
mysqld(1),
mysqld_multi(1),
mysqld_safe(1),
mysqldump(1),
mysql_fix_privilege_tables(1),
mysqlshow(1),
mysql_zap(1),
perror(1),
replace(1)
.P
For more information please refer to the MySQL reference
manual, which may already be installed locally and which
is also available online at http://dev.mysql.com/doc/mysql/en
.SH BUGS
Please refer to http://bugs.mysql.com/ to report bugs.
.SH AUTHOR
Ver 6.3, distribution @MYSQL_NO_DASH_VERSION@
Michael (Monty) Widenius (monty@mysql.com),
MySQL AB (http://www.mysql.com/)
This software comes with no warranty.
Manual page by R. P. C. Rodgers,
Lister Hill National Center for Biomedical Communication,
U.S. National Library of Medicine
(rodgers@nlm.nih.gov).
.\" end of man page
.TH mysql 1 "17 March 2003" "MySQL @MYSQL_BASE_VERSION@" "MySQL database"
.SH NAME
mysql_fix_privilege_tables \- Fixes MySQL privilege tables.
.SH SYNOPSIS
mysql_fix_privilege_tables [mysql_root_password]
.SH DESCRIPTION
This scripts updates the mysql.user, mysql.db, mysql.host and the
mysql.func tables to MySQL 3.22.14 and above.
This is needed if you want to use the new GRANT functions,
CREATE AGGREGATE FUNCTION or want to use the more secure passwords in 3.23
If you get 'Access denied' errors, run the script again
and give the MySQL root user password as an argument.
.SH "SEE ALSO"
isamchk(1),
isamlog(1),
mysql(1),
mysqlaccess(1),
mysqladmin(1),
mysqld(1),
mysqld_multi(1),
mysqld_safe(1),
mysqldump(1),
mysqlshow(1),
mysql_zap(1),
perror(1),
replace(1)
.P
For more information please refer to the MySQL reference
manual, which may already be installed locally and which
is also available online at http://dev.mysql.com/doc/mysql/en
.SH BUGS
Please refer to http://bugs.mysql.com/ to report bugs.
.SH AUTHOR
This manpage was written by Christian Hammers <ch@debian.org>.
MySQL is available at http://www.mysql.com/.
.\" end of man page
.TH zap 1 "19 December 2000" "MySQL @MYSQL_BASE_VERSION@" "MySQL database"
.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),
mysql(1),
mysqlaccess(1),
mysqladmin(1),
mysqld(1),
mysqld_multi(1),
mysqld_safe(1),
mysqldump(1),
mysql_fix_privilege_tables(1),
mysqlshow(1),
perror(1),
replace(1)
.P
For more information please refer to the MySQL reference
manual, which may already be installed locally and which
is also available online at http://dev.mysql.com/doc/mysql/en
.SH BUGS
Please refer to http://bugs.mysql.com/ to report bugs.
.SH AUTHOR
Ver 1.0, distribution @MYSQL_NO_DASH_VERSION@ Michael (Monty) Widenius (monty@mysql.com), MySQL AB (http://www.mysql.com/). 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 mysqlaccess 1 "19 December 2000" "MySQL @MYSQL_BASE_VERSION@" "MySQL database"
.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
Wildcards (*,?,%,_) are allowed for host, user and db, but be sure
to escape them from your shell!! (i.e., type \\* or '*')
.SH "SEE ALSO"
isamchk(1),
isamlog(1),
mysql(1),
mysqladmin(1),
mysqld(1),
mysqld_multi(1),
mysqld_safe(1),
mysqldump(1),
mysql_fix_privilege_tables(1),
mysqlshow(1),
mysql_zap(1),
perror(1),
replace(1)
.P
For more information please refer to the MySQL reference
manual, which may already be installed locally and which
is also available online at http://dev.mysql.com/doc/mysql/en
.SH BUGS
Please refer to http://bugs.mysql.com/ to report bugs.
.SH AUTHOR
Ver 1.0, distribution @MYSQL_NO_DASH_VERSION@
Michael (Monty) Widenius (monty@mysql.com),
MySQL AB (http://www.mysql.com/).
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 "19 December 2000" "MySQL @MYSQL_BASE_VERSION@" "MySQL database"
.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),
mysql(1),
mysqlaccess(1),
mysqld(1),
mysqld_multi(1),
mysqld_safe(1),
mysqldump(1),
mysql_fix_privilege_tables(1),
mysqlshow(1),
mysql_zap(1),
perror(1),
replace(1)
.P
For more information please refer to the MySQL reference
manual, which may already be installed locally and which
is also available online at http://dev.mysql.com/doc/mysql/en
.SH BUGS
Please refer to http://bugs.mysql.com/ to report bugs.
.SH AUTHOR
Ver 1.0, distribution @MYSQL_NO_DASH_VERSION@
Michael (Monty) Widenius (monty@mysql.com),
MySQL AB (http://www.mysql.com/).
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 "19 December 2000" "MySQL @MYSQL_BASE_VERSION@" "MySQL database"
.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 mysqld_safe to this option also. The options are passed to mysqld. Just make sure you have mysqld in your environment variable PATH or fix mysqld_safe.
.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),
mysql(1),
mysqlaccess(1),
mysqladmin(1),
mysqld(1),
mysqld_safe(1),
mysqldump(1),
mysql_fix_privilege_tables(1),
mysqlshow(1),
mysql_zap(1),
perror(1),
replace(1)
.P
For more information please refer to the MySQL reference
manual, which may already be installed locally and which
is also available online at http://dev.mysql.com/doc/mysql/en
.SH BUGS
Please refer to http://bugs.mysql.com/ to report bugs.
.SH AUTHOR
Ver 1.0, distribution @MYSQL_NO_DASH_VERSION@
Michael (Monty) Widenius (monty@mysql.com),
MySQL AB (http://www.mysql.com/).
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" "MySQL @MYSQL_BASE_VERSION@" "MySQL database"
.SH NAME
mysqld_safe \- start the mysqld daemon on Unix.
.SH SYNOPSIS
.B mysqld_safe
.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
mysqld_safe adds some safety features such as restarting the server when an
error occurs and logging run-time information to a log file.
.BR
.TP
.BR \-\-basedir=\fP\fIpath \fP
.TP
.BR \-\-core\-file\-size=#
Size of the core file mysqld should be able to create. Passed to ulimit \-c.
.TP
.BR \-\-defaults\-extra\-file=\fP\fIpath \fP
.TP
.BR \-\-defaults\-file=\fP\fIpath \fP
.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 mysqld_safe are passed to mysqld. If you wants to use any options in mysqld_safe that mysqld doesn't support, you must specify these in the option file.
.SH "SEE ALSO"
isamchk(1),
isamlog(1),
mysql(1),
mysqlaccess(1),
mysqladmin(1),
mysqld(1),
mysqld_multi(1),
mysqldump(1),
mysql_fix_privilege_tables(1),
mysqlshow(1),
mysql_zap(1),
perror(1),
replace(1)
.P
For more information please refer to the MySQL reference
manual, which may already be installed locally and which
is also available online at http://dev.mysql.com/doc/mysql/en
.SH BUGS
Please refer to http://bugs.mysql.com/ to report bugs.
.SH AUTHOR
Ver 1.0, distribution @MYSQL_NO_DASH_VERSION@
Michael (Monty) Widenius (monty@mysql.com),
MySQL AB (http://www.mysql.com).
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" "MySQL @MYSQL_BASE_VERSION@" "MySQL database"
.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 the section on Database Backups in the MySQL Reference Manual.
.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),
mysql(1),
mysqlaccess(1),
mysqladmin(1),
mysqld(1),
mysqld_multi(1),
mysqld_safe(1),
mysql_fix_privilege_tables(1),
mysqlshow(1),
mysql_zap(1),
perror(1),
replace(1)
.P
For more information please refer to the MySQL reference
manual, which may already be installed locally and which
is also available online at http://dev.mysql.com/doc/mysql/en
.SH BUGS
Please refer to http://bugs.mysql.com/ to report bugs.
.SH AUTHOR
Ver 1.0, distribution @MYSQL_NO_DASH_VERSION@
Michael (Monty) Widenius (monty@mysql.com),
MySQL AB (http://www.mysql.com/).
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 mysqlman 1 "20 July 2004" "MySQL @MYSQL_BASE_VERSION@" "MySQL database"
.TH mysqlman 1 "20 July 2004" "MySQL" "MySQL database"
.SH NAME
mysqlman \- default man page for mysql
.SH "DESCRIPTION"
......
.TH mysqlshow 1 "19 December 2000" "MySQL @MYSQL_BASE_VERSION@" "MySQL database"
.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),
mysql(1),
mysqlaccess(1),
mysqladmin(1),
mysqld(1),
mysqld_multi(1),
mysqld_safe(1),
mysqldump(1),
mysql_fix_privilege_tables(1),
mysql_zap(1),
perror(1),
replace(1)
.P
For more information please refer to the MySQL reference
manual, which may already be installed locally and which
is also available online at http://dev.mysql.com/doc/mysql/en
.SH BUGS
Please refer to http://bugs.mysql.com/ to report bugs.
.SH AUTHOR
Ver 1.0, distribution @MYSQL_NO_DASH_VERSION@
Michael (Monty) Widenius (monty@mysql.com),
MySQL AB (http://www.mysql.com/).
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" "MySQL @MYSQL_BASE_VERSION@" "MySQL database"
.SH NAME
perror \- describes a system or MySQL error code.
.SH SYNOPSIS
perror [OPTIONS] [ERRORCODE [ERRORCODE...]]
.SH DESCRIPTION
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 OPTIONS
.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),
mysql(1),
mysqlaccess(1),
mysqladmin(1),
mysqld(1),
mysqld_multi(1),
mysqld_safe(1),
mysqldump(1),
mysql_fix_privilege_tables(1),
mysqlshow(1),
mysql_zap(1),
replace(1)
.P
For more information please refer to the MySQL reference
manual, which may already be installed locally and which
is also available online at http://dev.mysql.com/doc/mysql/en
.SH BUGS
Please refer to http://bugs.mysql.com/ to report bugs.
.SH AUTHOR
Ver 1.0, distribution @MYSQL_NO_DASH_VERSION@
Michael (Monty) Widenius (monty@mysql.com),
MySQL AB (http://www.mysql.com/).
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 "19 December 2000" "MySQL @MYSQL_BASE_VERSION@" "MySQL database"
.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),
mysql(1),
mysqlaccess(1),
mysqladmin(1),
mysqld(1),
mysqld_multi(1),
mysqld_safe(1),
mysqldump(1),
mysql_fix_privilege_tables(1),
mysqlshow(1),
mysql_zap(1),
perror(1),
.P
For more information please refer to the MySQL reference
manual, which may already be installed locally and which
is also available online at http://dev.mysql.com/doc/mysql/en
.SH BUGS
Please refer to http://bugs.mysql.com/ to report bugs.
.SH AUTHOR
Ver 1.0, distribution @MYSQL_NO_DASH_VERSION@
Michael (Monty) Widenius (monty@mysql.com),
MySQL AB (http://www.mysql.com/).
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
......@@ -107,7 +107,7 @@ insert into t1 values(1.1);
insert into t1 values(2.2);
select * from t1 procedure analyse();
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
test.t1.df 1.1 2.2 8 8 0 0 1.650000000 0.302500000 ENUM('1.1','2.2') NOT NULL
test.t1.df 1.1 2.2 13 13 0 0 1.65000 0.55000 ENUM('1.1','2.2') NOT NULL
drop table t1;
create table t1 (d double);
insert into t1 values (100000);
......@@ -138,6 +138,6 @@ insert into t2 values (1, 'USA'),(2,'India'), (3,'Finland');
select product, sum(profit),avg(profit) from t1 group by product with rollup procedure analyse();
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
test.t1.product Computer TV 2 8 0 0 4.2500 NULL ENUM('Computer','Phone','TV') NOT NULL
sum(profit) 10 6900 2 4 0 0 1946 2868 ENUM('10','275','600','6900') NOT NULL
avg(profit) 10.0000 1380.0000 7 9 0 0 394.6875 570.2003 ENUM('10.0000','68.7500','120.0000','1380.0000') NOT NULL
sum(profit) 10 6900 11 11 0 0 1946.2500 2867.6719 ENUM('10','275','600','6900') NOT NULL
avg(profit) 10.0000 1380.0000 16 16 0 0 394.68750000 570.20033144 ENUM('10.0000','68.7500','120.0000','1380.0000') NOT NULL
drop table t1,t2;
......@@ -180,8 +180,8 @@ Field Type Null Key Default Extra
f1 date NO 0000-00-00
f2 datetime YES NULL
f3 time YES NULL
f4 time NO 00:00:00
f5 time NO 00:00:00
f4 time YES NULL
f5 time YES NULL
f6 time NO 00:00:00
f7 datetime YES NULL
f8 date YES NULL
......
......@@ -665,6 +665,12 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 values (pointfromtext('point(1,1)'));
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
drop table t1;
select (asWKT(geomfromwkb((0x000000000140240000000000004024000000000000))));
(asWKT(geomfromwkb((0x000000000140240000000000004024000000000000))))
POINT(10 10)
select (asWKT(geomfromwkb((0x010100000000000000000024400000000000002440))));
(asWKT(geomfromwkb((0x010100000000000000000024400000000000002440))))
POINT(10 10)
create table t1 (s1 geometry not null,s2 char(100));
create trigger t1_bu before update on t1 for each row set new.s1 = null;
insert into t1 values (null,null);
......@@ -688,9 +694,3 @@ alter table t1 add primary key pti(pt);
ERROR 42000: BLOB/TEXT column 'pt' used in key specification without a key length
alter table t1 add primary key pti(pt(20));
drop table t1;
select (asWKT(geomfromwkb((0x000000000140240000000000004024000000000000))));
(asWKT(geomfromwkb((0x000000000140240000000000004024000000000000))))
POINT(10 10)
select (asWKT(geomfromwkb((0x010100000000000000000024400000000000002440))));
(asWKT(geomfromwkb((0x010100000000000000000024400000000000002440))))
POINT(10 10)
......@@ -176,7 +176,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`round(15.4,-1)` decimal(3,0) unsigned NOT NULL default '0',
`truncate(-5678.123451,-3)` decimal(4,0) NOT NULL default '0',
`abs(-1.1)` decimal(2,1) default NULL,
`abs(-1.1)` decimal(2,1) NOT NULL default '0.0',
`-(-1.1)` decimal(2,1) NOT NULL default '0.0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
......
......@@ -123,6 +123,17 @@ select @a+0, @a:=@a+0+count(*), count(*), @a+0 from t1 group by i;
0 1 1 0
1 3 2 0
3 6 3 0
set @a=0;
select @a,@a:="hello",@a,@a:=3,@a,@a:="hello again" from t1 group by i;
@a @a:="hello" @a @a:=3 @a @a:="hello again"
0 hello 0 3 0 hello again
0 hello 0 3 0 hello again
0 hello 0 3 0 hello again
select @a,@a:="hello",@a,@a:=3,@a,@a:="hello again" from t1 group by i;
@a @a:="hello" @a @a:=3 @a @a:="hello again"
hello again hello hello again 3 hello again hello again
hello again hello hello again 3 hello again hello again
hello again hello hello again 3 hello again hello again
drop table t1;
set @a=_latin2'test';
select charset(@a),collation(@a),coercibility(@a);
......
......@@ -70,6 +70,10 @@ create table t1 (i int not null);
insert t1 values (1),(2),(2),(3),(3),(3);
select @a:=0; select @a, @a:=@a+count(*), count(*), @a from t1 group by i;
select @a:=0; select @a+0, @a:=@a+0+count(*), count(*), @a+0 from t1 group by i;
set @a=0;
select @a,@a:="hello",@a,@a:=3,@a,@a:="hello again" from t1 group by i;
select @a,@a:="hello",@a,@a:=3,@a,@a:="hello again" from t1 group by i;
drop table t1;
#
......
......@@ -18,7 +18,6 @@ path=`dirname $0`
if test -e "Makefile"; then make -k clean; fi
# remove files
rm -f NEW-RPMS/*
rm -f */.deps/*.P
rm -f */*.linux
......
......@@ -12,7 +12,6 @@ path=`dirname $0`
if test -e "Makefile"; then make -k clean; fi
# remove files
rm -f NEW-RPMS/*
rm -f */.deps/*.P
rm -rf Makefile.in.bk
......
......@@ -21,7 +21,6 @@ if test -e "Makefile"; then
fi
# remove other files
rm -f NEW-RPMS/*
rm -f */.deps/*.P
rm -rf Makefile.in.bk
......
......@@ -5082,14 +5082,16 @@ bool Item_insert_value::fix_fields(THD *thd, Item **items)
{
DBUG_ASSERT(fixed == 0);
/* We should only check that arg is in first table */
if (!arg->fixed)
{
bool res;
st_table_list *orig_next_table= context->last_name_resolution_table;
context->last_name_resolution_table= context->first_name_resolution_table;
if (!arg->fixed && arg->fix_fields(thd, &arg))
{
res= arg->fix_fields(thd, &arg);
context->last_name_resolution_table= orig_next_table;
if (res)
return TRUE;
}
context->last_name_resolution_table= orig_next_table;
if (arg->type() == REF_ITEM)
{
......
......@@ -636,7 +636,6 @@ void Item_func_num1::fix_num_length_and_dec()
{
decimals= args[0]->decimals;
max_length= args[0]->max_length;
maybe_null= 1;
}
......
......@@ -845,6 +845,7 @@ class Item_func_timediff :public Item_str_func
{
decimals=0;
max_length=MAX_TIME_WIDTH*MY_CHARSET_BIN_MB_MAXLEN;
maybe_null= 1;
}
Field *tmp_table_field(TABLE *t_arg)
{
......
......@@ -466,7 +466,9 @@ void field_real::add()
void field_decimal::add()
{
/*TODO - remove rounding stuff after decimal_div returns proper frac */
my_decimal dec_buf, *dec= item->val_decimal(&dec_buf);
my_decimal rounded;
uint length;
TREE_ELEMENT *element;
......@@ -476,6 +478,9 @@ void field_decimal::add()
return;
}
my_decimal_round(E_DEC_FATAL_ERROR, dec, item->decimals, FALSE,&rounded);
dec= &rounded;
length= my_decimal_string_length(dec);
if (decimal_is_zero(dec))
......@@ -1021,10 +1026,16 @@ String *field_decimal::avg(String *s, ha_rows rows)
s->set((double) 0.0, 1,my_thd_charset);
return s;
}
my_decimal num, avg_val;
my_decimal num, avg_val, rounded_avg;
int prec_increment= current_thd->variables.div_precincrement;
int2my_decimal(E_DEC_FATAL_ERROR, rows - nulls, FALSE, &num);
my_decimal_div(E_DEC_FATAL_ERROR, &avg_val, sum+cur_sum, &num, 0);
my_decimal2string(E_DEC_FATAL_ERROR, &avg_val, 0, 0, '0', s);
my_decimal_div(E_DEC_FATAL_ERROR, &avg_val, sum+cur_sum, &num, prec_increment);
/* TODO remove this after decimal_div returns proper frac */
my_decimal_round(E_DEC_FATAL_ERROR, &avg_val,
min(sum[cur_sum].frac + prec_increment, DECIMAL_MAX_SCALE),
FALSE,&rounded_avg);
my_decimal2string(E_DEC_FATAL_ERROR, &rounded_avg, 0, 0, '0', s);
return s;
}
......@@ -1036,13 +1047,19 @@ String *field_decimal::std(String *s, ha_rows rows)
s->set((double) 0.0, 1,my_thd_charset);
return s;
}
my_decimal num, std_val, sum2, sum2d;
my_decimal num, tmp, sum2, sum2d;
double std_sqr;
int prec_increment= current_thd->variables.div_precincrement;
int2my_decimal(E_DEC_FATAL_ERROR, rows - nulls, FALSE, &num);
my_decimal_mul(E_DEC_FATAL_ERROR, &sum2, sum+cur_sum, sum+cur_sum);
my_decimal_div(E_DEC_FATAL_ERROR, &std_val, &sum2, &num, 0);
my_decimal_sub(E_DEC_FATAL_ERROR, &sum2, sum_sqr+cur_sum, &std_val);
my_decimal_div(E_DEC_FATAL_ERROR, &std_val, &sum2, &num, 0);
my_decimal2string(E_DEC_FATAL_ERROR, &std_val, 0, 0, '0', s);
my_decimal_div(E_DEC_FATAL_ERROR, &tmp, &sum2, &num, prec_increment);
my_decimal_sub(E_DEC_FATAL_ERROR, &sum2, sum_sqr+cur_sum, &tmp);
my_decimal_div(E_DEC_FATAL_ERROR, &tmp, &sum2, &num, prec_increment);
my_decimal2double(E_DEC_FATAL_ERROR, &tmp, &std_sqr);
s->set(((double) std_sqr <= 0.0 ? 0.0 : sqrt(std_sqr)),
min(item->decimals + prec_increment, NOT_FIXED_DEC), my_thd_charset);
return s;
}
......
......@@ -37,7 +37,7 @@ static int open_unireg_entry(THD *thd, TABLE *entry, const char *db,
TABLE_LIST *table_list, MEM_ROOT *mem_root);
static void free_cache_entry(TABLE *entry);
static void mysql_rm_tmp_tables(void);
static my_bool open_new_frm(const char *path, const char *alias,
static bool open_new_frm(THD *thd, const char *path, const char *alias,
const char *db, const char *table_name,
uint db_stat, uint prgflag,
uint ha_open_flags, TABLE *outparam,
......@@ -1755,7 +1755,7 @@ static int open_unireg_entry(THD *thd, TABLE *entry, const char *db,
thd->open_options, entry)) &&
(error != 5 ||
(fn_format(path, path, 0, reg_ext, MY_UNPACK_FILENAME),
open_new_frm(path, alias, db, name,
open_new_frm(thd, path, alias, db, name,
(uint) (HA_OPEN_KEYFILE | HA_OPEN_RNDFILE |
HA_GET_INDEX | HA_TRY_READ_ONLY),
READ_KEYINFO | COMPUTE_TYPES | EXTRA_RECORD,
......@@ -5260,6 +5260,7 @@ int init_ftfuncs(THD *thd, SELECT_LEX *select_lex, bool no_order)
SYNOPSIS
open_new_frm()
THD thread handler
path path to .frm
alias alias for table
db database
......@@ -5273,8 +5274,8 @@ int init_ftfuncs(THD *thd, SELECT_LEX *select_lex, bool no_order)
mem_root temporary MEM_ROOT for parsing
*/
static my_bool
open_new_frm(const char *path, const char *alias,
static bool
open_new_frm(THD *thd, const char *path, const char *alias,
const char *db, const char *table_name,
uint db_stat, uint prgflag,
uint ha_open_flags, TABLE *outparam, TABLE_LIST *table_desc,
......@@ -5296,7 +5297,7 @@ open_new_frm(const char *path, const char *alias,
my_error(ER_WRONG_OBJECT, MYF(0), db, table_name, "BASE TABLE");
goto err;
}
if (mysql_make_view(parser, table_desc))
if (mysql_make_view(thd, parser, table_desc))
goto err;
}
else
......
......@@ -361,7 +361,7 @@ class st_select_lex_node {
friend class st_select_lex_unit;
friend bool mysql_new_select(struct st_lex *lex, bool move_down);
friend my_bool mysql_make_view (File_parser *parser,
friend bool mysql_make_view(THD *thd, File_parser *parser,
TABLE_LIST *table);
private:
void fast_exclude();
......
......@@ -1237,7 +1237,8 @@ JOIN::exec()
if (zero_result_cause)
{
(void) return_zero_rows(this, result, select_lex->leaf_tables, *columns_list,
(void) return_zero_rows(this, result, select_lex->leaf_tables,
*columns_list,
send_row_on_empty_set(),
select_options,
zero_result_cause,
......@@ -1671,7 +1672,8 @@ JOIN::exec()
{
thd->proc_info="Sending data";
DBUG_PRINT("info", ("%s", thd->proc_info));
result->send_fields(*columns_list,
result->send_fields((procedure ? curr_join->procedure_fields_list :
*curr_fields_list),
Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF);
error= do_select(curr_join, curr_fields_list, NULL, procedure);
thd->limit_found_rows= curr_join->send_records;
......@@ -9023,7 +9025,6 @@ do_select(JOIN *join,List<Item> *fields,TABLE *table,Procedure *procedure)
int rc= 0;
enum_nested_loop_state error= NESTED_LOOP_OK;
JOIN_TAB *join_tab;
List<Item> *columns_list= procedure? &join->procedure_fields_list : fields;
DBUG_ENTER("do_select");
join->procedure=procedure;
......@@ -9057,8 +9058,12 @@ do_select(JOIN *join,List<Item> *fields,TABLE *table,Procedure *procedure)
error= (*end_select)(join,join_tab,1);
}
else if (join->send_row_on_empty_set())
{
List<Item> *columns_list= (procedure ? &join->procedure_fields_list :
fields);
rc= join->result->send_data(*columns_list);
}
}
else
{
error= sub_select(join,join_tab,0);
......
......@@ -728,20 +728,24 @@ static int mysql_register_view(THD *thd, TABLE_LIST *view,
SYNOPSIS
mysql_make_view()
parser - parser object;
table - TABLE_LIST structure for filling
thd Thread handler
parser parser object
table TABLE_LIST structure for filling
RETURN
0 ok
1 error
*/
my_bool
mysql_make_view(File_parser *parser, TABLE_LIST *table)
bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table)
{
THD *thd= current_thd;
SELECT_LEX *end, *view_select;
LEX *old_lex, *lex;
Query_arena *arena, backup;
int res;
bool result;
DBUG_ENTER("mysql_make_view");
DBUG_PRINT("info", ("table=%p (%s)", table, table->table_name));
DBUG_PRINT("info", ("table: 0x%lx (%s)", (ulong) table, table->table_name));
if (table->view)
{
......@@ -765,16 +769,12 @@ mysql_make_view(File_parser *parser, TABLE_LIST *table)
DBUG_RETURN(0);
}
SELECT_LEX *end;
LEX *old_lex= thd->lex, *lex;
SELECT_LEX *view_select;
int res= 0;
/*
For now we assume that tables will not be changed during PS life (it
will be TRUE as far as we make new table cache).
*/
Query_arena *arena= thd->stmt_arena, backup;
old_lex= thd->lex;
arena= thd->stmt_arena;
if (arena->is_conventional())
arena= 0;
else
......@@ -1133,23 +1133,21 @@ mysql_make_view(File_parser *parser, TABLE_LIST *table)
(st_select_lex_node**)&old_lex->all_selects_list;
ok2:
if (arena)
thd->restore_active_arena(arena, &backup);
if (!old_lex->time_zone_tables_used && thd->lex->time_zone_tables_used)
old_lex->time_zone_tables_used= thd->lex->time_zone_tables_used;
thd->lex= old_lex;
if (!table->prelocking_placeholder && table->prepare_security(thd))
DBUG_RETURN(1);
DBUG_RETURN(0);
result= !table->prelocking_placeholder && table->prepare_security(thd);
err:
end:
if (arena)
thd->restore_active_arena(arena, &backup);
thd->lex= old_lex;
DBUG_RETURN(result);
err:
delete table->view;
table->view= 0; // now it is not VIEW placeholder
thd->lex= old_lex;
DBUG_RETURN(1);
result= 1;
goto end;
}
......
......@@ -19,7 +19,7 @@
bool mysql_create_view(THD *thd,
enum_view_create_mode mode);
my_bool mysql_make_view(File_parser *parser, TABLE_LIST *table);
bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table);
bool mysql_drop_view(THD *thd, TABLE_LIST *view, enum_drop_mode drop_mode);
......
......@@ -2654,7 +2654,7 @@ Natural_join_column::check_grants(THD *thd, const char *name, uint length)
GRANT_INFO *grant;
const char *db_name;
const char *table_name;
Security_context *save_security_ctx= 0;
Security_context *save_security_ctx;
Security_context *new_sctx= table_ref->security_ctx;
bool res;
......@@ -2673,13 +2673,10 @@ Natural_join_column::check_grants(THD *thd, const char *name, uint length)
table_name= table_ref->table->s->table_name;
}
if (new_sctx)
{
save_security_ctx= thd->security_ctx;
if (new_sctx)
thd->security_ctx= new_sctx;
}
res= check_grant_column(thd, grant, db_name, table_name, name, length);
if (save_security_ctx)
thd->security_ctx= save_security_ctx;
return res;
}
......
This diff is collapsed.
......@@ -541,41 +541,48 @@ fi
%doc %attr(644, root, root) %{_infodir}/mysql.info*
%doc %attr(644, root, man) %{_mandir}/man1/mysql_zap.1*
%doc %attr(644, root, man) %{_mandir}/man1/myisamchk.1*
%doc %attr(644, root, man) %{_mandir}/man1/myisamlog.1*
%doc %attr(644, root, man) %{_mandir}/man1/myisampack.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqld.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysql_fix_privilege_tables.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqld_multi.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqld_safe.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysql_fix_privilege_tables.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqlhotcopy.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqlmanager.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysql.server.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysql_zap.1*
%doc %attr(644, root, man) %{_mandir}/man1/perror.1*
%doc %attr(644, root, man) %{_mandir}/man1/replace.1*
%doc %attr(644, root, man) %{_mandir}/man1/safe_mysqld.1*
%ghost %config(noreplace,missingok) %{_sysconfdir}/my.cnf
%ghost %config(noreplace,missingok) %{_sysconfdir}/mysqlmanager.passwd
%attr(755, root, root) %{_bindir}/my_print_defaults
%attr(755, root, root) %{_bindir}/myisamchk
%attr(755, root, root) %{_bindir}/myisam_ftdump
%attr(755, root, root) %{_bindir}/myisamlog
%attr(755, root, root) %{_bindir}/myisampack
%attr(755, root, root) %{_bindir}/my_print_defaults
%attr(755, root, root) %{_bindir}/mysqlbug
%attr(755, root, root) %{_bindir}/mysql_convert_table_format
%attr(755, root, root) %{_bindir}/mysql_create_system_tables
%attr(755, root, root) %{_bindir}/mysqld_multi
%attr(755, root, root) %{_bindir}/mysqld_safe
%attr(755, root, root) %{_bindir}/mysql_explain_log
%attr(755, root, root) %{_bindir}/mysql_fix_extensions
%attr(755, root, root) %{_bindir}/mysql_fix_privilege_tables
%attr(755, root, root) %{_bindir}/mysqlhotcopy
%attr(755, root, root) %{_bindir}/mysql_install_db
%attr(755, root, root) %{_bindir}/mysql_secure_installation
%attr(755, root, root) %{_bindir}/mysql_setpermission
%attr(755, root, root) %{_bindir}/mysqltest
%attr(755, root, root) %{_bindir}/mysql_tzinfo_to_sql
%attr(755, root, root) %{_bindir}/mysql_zap
%attr(755, root, root) %{_bindir}/mysqlbug
%attr(755, root, root) %{_bindir}/mysqld_multi
%attr(755, root, root) %{_bindir}/mysqld_safe
%attr(755, root, root) %{_bindir}/mysqlhotcopy
%attr(755, root, root) %{_bindir}/mysqltest
%attr(755, root, root) %{_bindir}/perror
%attr(755, root, root) %{_bindir}/replace
%attr(755, root, root) %{_bindir}/resolve_stack_dump
%attr(755, root, root) %{_bindir}/resolveip
%attr(755, root, root) %{_bindir}/resolve_stack_dump
%attr(755, root, root) %{_bindir}/safe_mysqld
%attr(755, root, root) %{_sbindir}/mysqld
......@@ -604,10 +611,14 @@ fi
%attr(755, root, root) %{_bindir}/mysqlimport
%attr(755, root, root) %{_bindir}/mysqlshow
%doc %attr(644, root, man) %{_mandir}/man1/msql2mysql.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysql.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqlaccess.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqladmin.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqlbinlog.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqlcheck.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqldump.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqlimport.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqlshow.1*
%post shared
......@@ -645,6 +656,7 @@ fi
%files devel
%defattr(-, root, root, 0755)
%doc EXCEPTIONS-CLIENT
%doc %attr(644, root, man) %{_mandir}/man1/mysql_config.1*
%attr(755, root, root) %{_bindir}/comp_err
%attr(755, root, root) %{_bindir}/mysql_config
%dir %attr(755, root, root) %{_includedir}/mysql
......@@ -694,6 +706,10 @@ fi
# itself - note that they must be ordered by date (important when
# merging BK trees)
%changelog
* Thu Oct 27 2005 Lenz Grimmer <lenz@grimmer.com>
- added more man pages
* Wed Oct 19 2005 Kent Boortz <kent@mysql.com>
- Made yaSSL support an option (off by default)
......@@ -716,7 +732,7 @@ fi
* Fri Oct 14 2005 Kent Boortz <kent@mysql.com>
- Removed unneeded/obsolte configure options
- Removed unneeded/obsolete configure options
- Added archive engine to standard server
- Removed the embedded server from experimental server
- Changed suffix "-Max" => "-max"
......
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