Loading Docs/manual.texi +95 −40 Original line number Diff line number Diff line \input texinfo @c -*-texinfo-*- input texinfo @c -*-texinfo-*- @c Copyright 1997-2001 TcX AB, Detron HB and MySQL Finland AB @c @c ********************************************************* Loading Loading @@ -1566,6 +1566,10 @@ Hands on tutorial for MySQL. @subheading Porting MySQL/Using MySQL on Different Systems @table @asis @item @uref{http://www.entropy.ch/software/macosx/mysql/} Binary of MySQL for Mac OS X Client. Includes information of how to build and use MySQL on Mac OS X. @item @uref{http://xclave.macnn.com/MySQL/} The Mac OS Xclave. Running MySQL on Mac OS X. Loading Loading @@ -5186,9 +5190,6 @@ formerly TCX DataKonsult AB, has provided top quality commercial support for MySQL from the day it was released, whereas until recently PostgreSQL was unsupported. @item MySQL works on more platforms than PostgreSQL. @xref{Which OS}. @item MySQL works better on Windows than PostgreSQL does. MySQL runs as a native Windows application (a service on NT/Win2000/WinXP), while Loading Loading @@ -8074,6 +8075,8 @@ shell> ./configure --with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock @end example Note that the given file must be an absolute pathname! You can also later change the location @file{mysql.sock} by using the MySQL option files. @xref{Problems with mysql.sock}. @cindex compiling, statically @cindex statically, compiling Loading @@ -8087,6 +8090,8 @@ shell> ./configure --with-client-ldflags=-all-static \ --with-mysqld-ldflags=-all-static @end example @tindex @code{CC} environment variable @tindex environment variable, @code{CC} @tindex @code{CXX} environment variable Loading Loading @@ -8993,6 +8998,8 @@ shell> MYSQL_UNIX_PORT=/some_tmp_dir/mysqld.sock shell> export TMPDIR MYSQL_UNIX_PORT @end example @xref{Problems with mysql.sock}. @file{some_tmp_dir} should be the path to some directory for which you have write permission. @xref{Environment variables}. Loading Loading @@ -9233,6 +9240,7 @@ should append the following to it: /bin/sh -c 'cd /usr/local/mysql ; ./bin/safe_mysqld --user=mysql &' @end example @cindex changing socket location You can also add options for @code{mysql.server} in a global @file{/etc/my.cnf} file. A typical @file{/etc/my.cnf} file might look like this: Loading @@ -9240,7 +9248,7 @@ this: @example [mysqld] datadir=/usr/local/mysql/var socket=/tmp/mysqld.sock socket=/var/tmp/mysql.sock port=3306 user=mysql Loading Loading @@ -28268,18 +28276,22 @@ example: @end example In this example, @code{9} (@code{precision}) represents the number of significant decimal digits that will be stored for values, and @code{2} (@code{scale}) represents the number of digits that will be stored following the decimal point. In this case, therefore, the range of values that can be stored in the @code{salary} column is from @code{-999999.99} to @code{9999999.99}. In ANSI/ISO SQL92, the syntax @code{DECIMAL(p)} is equivalent to @code{DECIMAL(p,0)}. Similarly, the syntax @code{DECIMAL} is equivalent to @code{DECIMAL(p,0)}, where the implementation is allowed to decide the value of @code{p}. MySQL does not currently support either of these variant forms of the @code{DECIMAL}/@code{NUMERIC} data types. This is not generally a serious problem, as the principal benefits of these types derive from the ability to control both precision and scale explicitly. significant decimal digits that will be stored for values, and @code{2} (@code{scale}) represents the number of digits that will be stored following the decimal point. In this case, therefore, the range of values that can be stored in the @code{salary} column is from @code{-9999999.99} to @code{9999999.99}. (MySQL can actually store numbers up to @code{9999999.99} in this column because it doesn't have to store the sign for positive numbers) In ANSI/ISO SQL92, the syntax @code{DECIMAL(p)} is equivalent to @code{DECIMAL(p,0)}. Similarly, the syntax @code{DECIMAL} is equivalent to @code{DECIMAL(p,0)}, where the implementation is allowed to decide the value of @code{p}. MySQL does not currently support either of these variant forms of the @code{DECIMAL}/@code{NUMERIC} data types. This is not generally a serious problem, as the principal benefits of these types derive from the ability to control both precision and scale explicitly. @code{DECIMAL} and @code{NUMERIC} values are stored as strings, rather than as binary floating-point numbers, in order to preserve the decimal Loading Loading @@ -31863,9 +31875,10 @@ The reason for this is so that you it makes it possible to easily reproduce the same @code{INSERT} statement against some other server. @cindex sequence emulation If @code{expr} is given as an argument to @code{LAST_INSERT_ID()} in an @code{UPDATE} clause, then the value of the argument is returned as a @code{LAST_INSERT_ID()} value. This can be used to simulate sequences. If @code{expr} is given as an argument to @code{LAST_INSERT_ID()}, then the value of the argument is returned by the function, is set as the next value to be returned by @code{LAST_INSERT_ID()} and used as the next auto_increment value. This can be used to simulate sequences: First create the table: Loading @@ -31888,6 +31901,12 @@ MySQL. For example, @code{LAST_INSERT_ID()} (without an argument) will return the new ID. The C API function @code{mysql_insert_id()} can also be used to get the value. Note that as @code{mysql_insert_id()} is only updated after @code{INSERT} and @code{UPDATE} statements, you can't use this function to retrieve the value for @code{LAST_INSERT_ID(expr)} after executing other SQL statements like @code{SELECT} or @code{SET}. @findex FORMAT() @item FORMAT(X,D) Formats the number @code{X} to a format like @code{'#,###,###.##'}, rounded Loading Loading @@ -40633,6 +40652,11 @@ does not generate an @code{AUTO_INCREMENT} value. If you need to save the value for later, be sure to call @code{mysql_insert_id()} immediately after the query that generates the value. @code{mysql_insert_id()} is updated after @code{INSERT} and @code{UPDATE} statements that generate an @code{AUTO_INCREMENT} value or that set a column value to @code{LAST_INSERT_ID(expr)}. @xref{Miscellaneous functions}. Also note that the value of the SQL @code{LAST_INSERT_ID()} function always contains the most recently generated @code{AUTO_INCREMENT} value, and is not reset between queries because the value of that function is maintained Loading Loading @@ -43391,27 +43415,14 @@ the MySQL socket (for example, a job that removes old files from the @file{/tmp} directory). You can always run @code{mysqladmin version} and check that the socket @code{mysqladmin} is trying to use really exists. The fix in this case is to change the @code{cron} job to not remove @file{mysqld.sock} or to place the socket somewhere else. You can specify a different socket location at MySQL configuration time with this command: @example shell> ./configure --with-unix-socket-path=/path/to/socket @end example You can also start @code{safe_mysqld} with the @code{--socket=/path/to/socket} option and set the environment variable @code{MYSQL_UNIX_PORT} to the socket pathname before starting your MySQL clients. not remove @file{mysqld.sock} or to place the socket somewhere else. @xref{Problems with mysql.sock}. @item You have started the @code{mysqld} server with the @code{--socket=/path/to/socket} option. If you change the socket pathname for the server, you must also notify the MySQL clients about the new path. You can do this by setting the environment variable @code{MYSQL_UNIX_PORT} to the socket pathname or by providing the socket path as an argument to the clients. You can test the socket with this command: @example shell> mysqladmin --socket=/path/to/socket version @end example about the new path. You can do this by providing the socket path as an argument to the client. @xref{Problems with mysql.sock}. @item You are using Linux and one thread has died (core dumped). In this case you must kill the other @code{mysqld} threads (for example, with the Loading Loading @@ -44399,7 +44410,7 @@ the original table. @node Problems with mysql.sock, Timezone problems, Temporary files, Administration Issues @appendixsubsec How to Protect @file{/tmp/mysql.sock} from Being Deleted @appendixsubsec How to Protect or change the MySQL socket file @file{/tmp/mysql.sock} @cindex @code{mysql.sock}, protection @cindex deletion, @code{mysql.sock} Loading @@ -44419,6 +44430,40 @@ only by their owners or the superuser (@code{root}). You can check if the @code{sticky} bit is set by executing @code{ls -ld /tmp}. If the last permission bit is @code{t}, the bit is set. @cindex changing socket location You can change the place where MySQL uses / puts the socket file the following ways: @itemize @bullet @item Specify the path in a global or local option file. For example, put in @code{/etc/my.cnf}: @example [client] socket=path-for-socket-file [mysqld] socket=path-for-socket-file @end example @xref{Option files}. @item Specifying this on the command line to @code{safe_mysqld} and most clients with the @code{--socket=path-for-socket-file} option. @item Specify the path to the socket in the @code{MYSQL_UNIX_PORT} environment variable. @item Defining the path with the @code{configure} option @code{--with-unix-socket-path=path-for-socket-file}. @xref{configure options}. @end itemize You can test that the socket works with this command: @example shell> mysqladmin --socket=/path/to/socket version @end example @node Timezone problems, , Problems with mysql.sock, Administration Issues @appendixsubsec Time Zone Problems Loading Loading @@ -46757,6 +46802,7 @@ users use this code as the rest of the code and because of this we are not yet 100% confident in this code. @menu * News-3.23.43:: Changes in release 3.23.43 * News-3.23.42:: Changes in release 3.23.42 * News-3.23.41:: Changes in release 3.23.41 * News-3.23.40:: Changes in release 3.23.40 Loading Loading @@ -46803,7 +46849,16 @@ not yet 100% confident in this code. * News-3.23.0:: Changes in release 3.23.0 @end menu @node News-3.23.42, News-3.23.41, News-3.23.x, News-3.23.x @node News-3.23.43, News-3.23.42, News-3.23.x, News-3.23.x @appendixsubsec Changes in release 3.23.43 @itemize @bullet @item Fixed problem with @code{myisampack} when using pre-space filled CHAR columns. @item Applied patch from Yuri Dario for OS2. @end itemize @node News-3.23.42, News-3.23.41, News-3.23.43, News-3.23.x @appendixsubsec Changes in release 3.23.42 @itemize @bullet @item client/Makefile.am +1 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ INCLUDES = -I$(srcdir)/../include \ -I../include -I$(srcdir)/.. -I$(top_srcdir) \ -I.. noinst_HEADERS = client_priv.h LIBS = @CLIENT_LIBS@ LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysql/libmysqlclient.la bin_PROGRAMS = mysql mysqladmin mysqlcheck mysqlshow \ Loading client/client_priv.h 0 → 100644 +31 −0 Original line number Diff line number Diff line /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Common defines for all clients */ #include <global.h> #include <my_sys.h> #include <m_string.h> #include <mysql.h> #include <errmsg.h> #include <getopt.h> /* We have to define 'enum options' identical in all files to keep OS2 happy */ enum options { OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET, OPT_PAGER, OPT_NOPAGER, OPT_TEE, OPT_NOTEE, OPT_LOW_PRIORITY, OPT_AUTO_REPAIR, OPT_COMPRESS, OPT_FTB, OPT_LTB, OPT_ENC, OPT_O_ENC, OPT_ESC, OPT_TABLES}; client/mysql.cc +1 −10 Original line number Diff line number Diff line Loading @@ -25,17 +25,12 @@ * **/ #include <global.h> #include <my_sys.h> #include <m_string.h> #include "client_priv.h" #include <m_ctype.h> #include "mysql.h" #include "errmsg.h" #include <my_dir.h> #ifndef __GNU_LIBRARY__ #define __GNU_LIBRARY__ // Skip warnings in getopt.h #endif #include <getopt.h> #include "my_readline.h" #include <signal.h> Loading Loading @@ -380,10 +375,6 @@ sig_handler mysql_end(int sig) exit(status.exit_status); } enum options {OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET, OPT_PAGER, OPT_NOPAGER, OPT_TEE, OPT_NOTEE} ; static struct option long_options[] = { {"i-am-a-dummy", optional_argument, 0, 'U'}, Loading client/mysqladmin.c +1 −8 Original line number Diff line number Diff line Loading @@ -17,13 +17,8 @@ /* maintaince of mysql databases */ #include <global.h> #include <my_sys.h> #include <m_string.h> #include "client_priv.h" #include <signal.h> #include "mysql.h" #include "errmsg.h" #include <getopt.h> #ifdef THREAD #include <my_pthread.h> /* because of signal() */ #endif Loading Loading @@ -102,8 +97,6 @@ static const char *command_names[]= { static TYPELIB command_typelib= { array_elements(command_names)-1,"commands", command_names}; enum options { OPT_CHARSETS_DIR=256 }; static struct option long_options[] = { {"compress", no_argument, 0, 'C'}, {"character-sets-dir", required_argument, 0, OPT_CHARSETS_DIR}, Loading Loading
Docs/manual.texi +95 −40 Original line number Diff line number Diff line \input texinfo @c -*-texinfo-*- input texinfo @c -*-texinfo-*- @c Copyright 1997-2001 TcX AB, Detron HB and MySQL Finland AB @c @c ********************************************************* Loading Loading @@ -1566,6 +1566,10 @@ Hands on tutorial for MySQL. @subheading Porting MySQL/Using MySQL on Different Systems @table @asis @item @uref{http://www.entropy.ch/software/macosx/mysql/} Binary of MySQL for Mac OS X Client. Includes information of how to build and use MySQL on Mac OS X. @item @uref{http://xclave.macnn.com/MySQL/} The Mac OS Xclave. Running MySQL on Mac OS X. Loading Loading @@ -5186,9 +5190,6 @@ formerly TCX DataKonsult AB, has provided top quality commercial support for MySQL from the day it was released, whereas until recently PostgreSQL was unsupported. @item MySQL works on more platforms than PostgreSQL. @xref{Which OS}. @item MySQL works better on Windows than PostgreSQL does. MySQL runs as a native Windows application (a service on NT/Win2000/WinXP), while Loading Loading @@ -8074,6 +8075,8 @@ shell> ./configure --with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock @end example Note that the given file must be an absolute pathname! You can also later change the location @file{mysql.sock} by using the MySQL option files. @xref{Problems with mysql.sock}. @cindex compiling, statically @cindex statically, compiling Loading @@ -8087,6 +8090,8 @@ shell> ./configure --with-client-ldflags=-all-static \ --with-mysqld-ldflags=-all-static @end example @tindex @code{CC} environment variable @tindex environment variable, @code{CC} @tindex @code{CXX} environment variable Loading Loading @@ -8993,6 +8998,8 @@ shell> MYSQL_UNIX_PORT=/some_tmp_dir/mysqld.sock shell> export TMPDIR MYSQL_UNIX_PORT @end example @xref{Problems with mysql.sock}. @file{some_tmp_dir} should be the path to some directory for which you have write permission. @xref{Environment variables}. Loading Loading @@ -9233,6 +9240,7 @@ should append the following to it: /bin/sh -c 'cd /usr/local/mysql ; ./bin/safe_mysqld --user=mysql &' @end example @cindex changing socket location You can also add options for @code{mysql.server} in a global @file{/etc/my.cnf} file. A typical @file{/etc/my.cnf} file might look like this: Loading @@ -9240,7 +9248,7 @@ this: @example [mysqld] datadir=/usr/local/mysql/var socket=/tmp/mysqld.sock socket=/var/tmp/mysql.sock port=3306 user=mysql Loading Loading @@ -28268,18 +28276,22 @@ example: @end example In this example, @code{9} (@code{precision}) represents the number of significant decimal digits that will be stored for values, and @code{2} (@code{scale}) represents the number of digits that will be stored following the decimal point. In this case, therefore, the range of values that can be stored in the @code{salary} column is from @code{-999999.99} to @code{9999999.99}. In ANSI/ISO SQL92, the syntax @code{DECIMAL(p)} is equivalent to @code{DECIMAL(p,0)}. Similarly, the syntax @code{DECIMAL} is equivalent to @code{DECIMAL(p,0)}, where the implementation is allowed to decide the value of @code{p}. MySQL does not currently support either of these variant forms of the @code{DECIMAL}/@code{NUMERIC} data types. This is not generally a serious problem, as the principal benefits of these types derive from the ability to control both precision and scale explicitly. significant decimal digits that will be stored for values, and @code{2} (@code{scale}) represents the number of digits that will be stored following the decimal point. In this case, therefore, the range of values that can be stored in the @code{salary} column is from @code{-9999999.99} to @code{9999999.99}. (MySQL can actually store numbers up to @code{9999999.99} in this column because it doesn't have to store the sign for positive numbers) In ANSI/ISO SQL92, the syntax @code{DECIMAL(p)} is equivalent to @code{DECIMAL(p,0)}. Similarly, the syntax @code{DECIMAL} is equivalent to @code{DECIMAL(p,0)}, where the implementation is allowed to decide the value of @code{p}. MySQL does not currently support either of these variant forms of the @code{DECIMAL}/@code{NUMERIC} data types. This is not generally a serious problem, as the principal benefits of these types derive from the ability to control both precision and scale explicitly. @code{DECIMAL} and @code{NUMERIC} values are stored as strings, rather than as binary floating-point numbers, in order to preserve the decimal Loading Loading @@ -31863,9 +31875,10 @@ The reason for this is so that you it makes it possible to easily reproduce the same @code{INSERT} statement against some other server. @cindex sequence emulation If @code{expr} is given as an argument to @code{LAST_INSERT_ID()} in an @code{UPDATE} clause, then the value of the argument is returned as a @code{LAST_INSERT_ID()} value. This can be used to simulate sequences. If @code{expr} is given as an argument to @code{LAST_INSERT_ID()}, then the value of the argument is returned by the function, is set as the next value to be returned by @code{LAST_INSERT_ID()} and used as the next auto_increment value. This can be used to simulate sequences: First create the table: Loading @@ -31888,6 +31901,12 @@ MySQL. For example, @code{LAST_INSERT_ID()} (without an argument) will return the new ID. The C API function @code{mysql_insert_id()} can also be used to get the value. Note that as @code{mysql_insert_id()} is only updated after @code{INSERT} and @code{UPDATE} statements, you can't use this function to retrieve the value for @code{LAST_INSERT_ID(expr)} after executing other SQL statements like @code{SELECT} or @code{SET}. @findex FORMAT() @item FORMAT(X,D) Formats the number @code{X} to a format like @code{'#,###,###.##'}, rounded Loading Loading @@ -40633,6 +40652,11 @@ does not generate an @code{AUTO_INCREMENT} value. If you need to save the value for later, be sure to call @code{mysql_insert_id()} immediately after the query that generates the value. @code{mysql_insert_id()} is updated after @code{INSERT} and @code{UPDATE} statements that generate an @code{AUTO_INCREMENT} value or that set a column value to @code{LAST_INSERT_ID(expr)}. @xref{Miscellaneous functions}. Also note that the value of the SQL @code{LAST_INSERT_ID()} function always contains the most recently generated @code{AUTO_INCREMENT} value, and is not reset between queries because the value of that function is maintained Loading Loading @@ -43391,27 +43415,14 @@ the MySQL socket (for example, a job that removes old files from the @file{/tmp} directory). You can always run @code{mysqladmin version} and check that the socket @code{mysqladmin} is trying to use really exists. The fix in this case is to change the @code{cron} job to not remove @file{mysqld.sock} or to place the socket somewhere else. You can specify a different socket location at MySQL configuration time with this command: @example shell> ./configure --with-unix-socket-path=/path/to/socket @end example You can also start @code{safe_mysqld} with the @code{--socket=/path/to/socket} option and set the environment variable @code{MYSQL_UNIX_PORT} to the socket pathname before starting your MySQL clients. not remove @file{mysqld.sock} or to place the socket somewhere else. @xref{Problems with mysql.sock}. @item You have started the @code{mysqld} server with the @code{--socket=/path/to/socket} option. If you change the socket pathname for the server, you must also notify the MySQL clients about the new path. You can do this by setting the environment variable @code{MYSQL_UNIX_PORT} to the socket pathname or by providing the socket path as an argument to the clients. You can test the socket with this command: @example shell> mysqladmin --socket=/path/to/socket version @end example about the new path. You can do this by providing the socket path as an argument to the client. @xref{Problems with mysql.sock}. @item You are using Linux and one thread has died (core dumped). In this case you must kill the other @code{mysqld} threads (for example, with the Loading Loading @@ -44399,7 +44410,7 @@ the original table. @node Problems with mysql.sock, Timezone problems, Temporary files, Administration Issues @appendixsubsec How to Protect @file{/tmp/mysql.sock} from Being Deleted @appendixsubsec How to Protect or change the MySQL socket file @file{/tmp/mysql.sock} @cindex @code{mysql.sock}, protection @cindex deletion, @code{mysql.sock} Loading @@ -44419,6 +44430,40 @@ only by their owners or the superuser (@code{root}). You can check if the @code{sticky} bit is set by executing @code{ls -ld /tmp}. If the last permission bit is @code{t}, the bit is set. @cindex changing socket location You can change the place where MySQL uses / puts the socket file the following ways: @itemize @bullet @item Specify the path in a global or local option file. For example, put in @code{/etc/my.cnf}: @example [client] socket=path-for-socket-file [mysqld] socket=path-for-socket-file @end example @xref{Option files}. @item Specifying this on the command line to @code{safe_mysqld} and most clients with the @code{--socket=path-for-socket-file} option. @item Specify the path to the socket in the @code{MYSQL_UNIX_PORT} environment variable. @item Defining the path with the @code{configure} option @code{--with-unix-socket-path=path-for-socket-file}. @xref{configure options}. @end itemize You can test that the socket works with this command: @example shell> mysqladmin --socket=/path/to/socket version @end example @node Timezone problems, , Problems with mysql.sock, Administration Issues @appendixsubsec Time Zone Problems Loading Loading @@ -46757,6 +46802,7 @@ users use this code as the rest of the code and because of this we are not yet 100% confident in this code. @menu * News-3.23.43:: Changes in release 3.23.43 * News-3.23.42:: Changes in release 3.23.42 * News-3.23.41:: Changes in release 3.23.41 * News-3.23.40:: Changes in release 3.23.40 Loading Loading @@ -46803,7 +46849,16 @@ not yet 100% confident in this code. * News-3.23.0:: Changes in release 3.23.0 @end menu @node News-3.23.42, News-3.23.41, News-3.23.x, News-3.23.x @node News-3.23.43, News-3.23.42, News-3.23.x, News-3.23.x @appendixsubsec Changes in release 3.23.43 @itemize @bullet @item Fixed problem with @code{myisampack} when using pre-space filled CHAR columns. @item Applied patch from Yuri Dario for OS2. @end itemize @node News-3.23.42, News-3.23.41, News-3.23.43, News-3.23.x @appendixsubsec Changes in release 3.23.42 @itemize @bullet @item
client/Makefile.am +1 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ INCLUDES = -I$(srcdir)/../include \ -I../include -I$(srcdir)/.. -I$(top_srcdir) \ -I.. noinst_HEADERS = client_priv.h LIBS = @CLIENT_LIBS@ LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysql/libmysqlclient.la bin_PROGRAMS = mysql mysqladmin mysqlcheck mysqlshow \ Loading
client/client_priv.h 0 → 100644 +31 −0 Original line number Diff line number Diff line /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Common defines for all clients */ #include <global.h> #include <my_sys.h> #include <m_string.h> #include <mysql.h> #include <errmsg.h> #include <getopt.h> /* We have to define 'enum options' identical in all files to keep OS2 happy */ enum options { OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET, OPT_PAGER, OPT_NOPAGER, OPT_TEE, OPT_NOTEE, OPT_LOW_PRIORITY, OPT_AUTO_REPAIR, OPT_COMPRESS, OPT_FTB, OPT_LTB, OPT_ENC, OPT_O_ENC, OPT_ESC, OPT_TABLES};
client/mysql.cc +1 −10 Original line number Diff line number Diff line Loading @@ -25,17 +25,12 @@ * **/ #include <global.h> #include <my_sys.h> #include <m_string.h> #include "client_priv.h" #include <m_ctype.h> #include "mysql.h" #include "errmsg.h" #include <my_dir.h> #ifndef __GNU_LIBRARY__ #define __GNU_LIBRARY__ // Skip warnings in getopt.h #endif #include <getopt.h> #include "my_readline.h" #include <signal.h> Loading Loading @@ -380,10 +375,6 @@ sig_handler mysql_end(int sig) exit(status.exit_status); } enum options {OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET, OPT_PAGER, OPT_NOPAGER, OPT_TEE, OPT_NOTEE} ; static struct option long_options[] = { {"i-am-a-dummy", optional_argument, 0, 'U'}, Loading
client/mysqladmin.c +1 −8 Original line number Diff line number Diff line Loading @@ -17,13 +17,8 @@ /* maintaince of mysql databases */ #include <global.h> #include <my_sys.h> #include <m_string.h> #include "client_priv.h" #include <signal.h> #include "mysql.h" #include "errmsg.h" #include <getopt.h> #ifdef THREAD #include <my_pthread.h> /* because of signal() */ #endif Loading Loading @@ -102,8 +97,6 @@ static const char *command_names[]= { static TYPELIB command_typelib= { array_elements(command_names)-1,"commands", command_names}; enum options { OPT_CHARSETS_DIR=256 }; static struct option long_options[] = { {"compress", no_argument, 0, 'C'}, {"character-sets-dir", required_argument, 0, OPT_CHARSETS_DIR}, Loading