mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
Changed safe_mysqld -> mysqld_safe
Added some alias to SHOW commands Prepare for dynamic changing of MySQL variables man/Makefile.am: Changed safe_mysqld -> mysqld_safe man/isamchk.1: Changed safe_mysqld -> mysqld_safe man/isamlog.1: Changed safe_mysqld -> mysqld_safe man/mysql.1: Changed safe_mysqld -> mysqld_safe man/mysql_zap.1: Changed safe_mysqld -> mysqld_safe man/mysqlaccess.1: Changed safe_mysqld -> mysqld_safe man/mysqladmin.1: Changed safe_mysqld -> mysqld_safe man/mysqld.1: Changed safe_mysqld -> mysqld_safe man/mysqld_multi.1: Changed safe_mysqld -> mysqld_safe man/mysqld_safe.1: Changed safe_mysqld -> mysqld_safe man/mysqldump.1: Changed safe_mysqld -> mysqld_safe man/mysqlshow.1: Changed safe_mysqld -> mysqld_safe man/perror.1: Changed safe_mysqld -> mysqld_safe man/replace.1: Changed safe_mysqld -> mysqld_safe man/which.2: Changed safe_mysqld -> mysqld_safe myisam/mi_search.c: Fixed bug when using packed keys. scripts/Makefile.am: Changed safe_mysqld -> mysqld_safe scripts/make_binary_distribution.sh: Changed safe_mysqld -> mysqld_safe scripts/mysql_install_db.sh: Changed safe_mysqld -> mysqld_safe scripts/mysqld_multi.sh: Changed safe_mysqld -> mysqld_safe scripts/mysqld_safe-watch.sh: Changed safe_mysqld -> mysqld_safe scripts/mysqld_safe.sh: Changed safe_mysqld -> mysqld_safe sql/lex.h: Addex SHOW INDEXES as an alias for SHOW INDEX sql/sql_class.cc: Prepare for dynamic changing of MySQL variables sql/sql_lex.h: Prepare for dynamic changing of MySQL variables sql/sql_yacc.yy: Some changes to SHOW commands. support-files/binary-configure.sh: Changed safe_mysqld -> mysqld_safe support-files/mysql-max.spec.sh: Changed safe_mysqld -> mysqld_safe support-files/mysql-multi.server.sh: Changed safe_mysqld -> mysqld_safe support-files/mysql.server.sh: Changed safe_mysqld -> mysqld_safe support-files/mysql.spec.sh: Changed safe_mysqld -> mysqld_safe
This commit is contained in:
parent
f246b61915
commit
833f353e34
31 changed files with 109 additions and 60 deletions
|
@ -19,7 +19,7 @@
|
|||
|
||||
man_MANS = mysql.1 isamchk.1 isamlog.1 mysql_zap.1 mysqlaccess.1 \
|
||||
mysqladmin.1 mysqld.1 mysqld_multi.1 mysqldump.1 mysqlshow.1 \
|
||||
perror.1 replace.1 safe_mysqld.1
|
||||
perror.1 replace.1 mysqld_safe.1
|
||||
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
||||
|
|
|
@ -125,7 +125,7 @@ mysqlshow (1),
|
|||
msql2mysql (1),
|
||||
perror (1),
|
||||
replace (1),
|
||||
safe_mysqld (1),
|
||||
mysqld_safe (1),
|
||||
which1 (1),
|
||||
zap (1),
|
||||
.SH AUTHOR
|
||||
|
|
|
@ -83,7 +83,7 @@ mysqlshow (1),
|
|||
msql2mysql (1),
|
||||
perror (1),
|
||||
replace (1),
|
||||
safe_mysqld (1),
|
||||
mysqld_safe (1),
|
||||
which1 (1),
|
||||
zap (1),
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ executable
|
|||
.I /depot/bin/mysqld
|
||||
executable
|
||||
.TP
|
||||
.I /depot/bin/safe_mysqld
|
||||
.I /depot/bin/mysqld_safe
|
||||
executable shell script for starting mysqld safely
|
||||
.TP
|
||||
.I /site/var/mysql/data
|
||||
|
@ -135,7 +135,7 @@ mysqlshow (1),
|
|||
msql2mysql (1),
|
||||
perror (1),
|
||||
replace (1),
|
||||
safe_mysqld (1),
|
||||
mysqld_safe (1),
|
||||
which1 (1),
|
||||
zap (1),
|
||||
.SH AUTHOR
|
||||
|
|
|
@ -28,7 +28,7 @@ isn't given, ask user for confirmation for each process to kill. If signal isn't
|
|||
.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),
|
||||
isamchk (1), isamlog (1), mysqlaccess (1), mysqladmin (1), mysqlbug (1), mysqld (1), mysqldump (1), mysqlshow (1), msql2mysql (1), perror (1), replace (1), mysqld_safe (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
|
|
@ -106,7 +106,7 @@ mysqlshow (1),
|
|||
msql2mysql (1),
|
||||
perror (1),
|
||||
replace (1),
|
||||
safe_mysqld (1),
|
||||
mysqld_safe (1),
|
||||
which1 (1),
|
||||
zap (1),
|
||||
.SH AUTHOR
|
||||
|
|
|
@ -189,7 +189,7 @@ mysqlshow (1),
|
|||
msql2mysql (1),
|
||||
perror (1),
|
||||
replace (1),
|
||||
safe_mysqld (1),
|
||||
mysqld_safe (1),
|
||||
which1 (1),
|
||||
zap (1),
|
||||
.SH AUTHOR
|
||||
|
|
|
@ -137,7 +137,7 @@ Don't check the rows in the table if there isn't any delete blocks.
|
|||
Before a table is automaticly repaired, mysqld will add a note about this in the error log. If you want to be able to recover from most things without user intervention, you should use the options BACKUP,FORCE. This will force a repair of a table even if some rows would be deleted, but it will keep the old data file as a backup so that you can later examine what happened.
|
||||
.TP
|
||||
.BR \-\-pid\-file=\fP\fIpath \fP
|
||||
Path to pid file used by safe_mysqld.
|
||||
Path to pid file used by mysqld_safe.
|
||||
.TP
|
||||
.BR \-P | \-\-port=...
|
||||
Port number to listen for TCP/IP connections.
|
||||
|
@ -215,7 +215,7 @@ mysqlshow (1),
|
|||
msql2mysql (1),
|
||||
perror (1),
|
||||
replace (1),
|
||||
safe_mysqld (1),
|
||||
mysqld_safe (1),
|
||||
which1 (1),
|
||||
zap (1),
|
||||
.SH AUTHOR
|
||||
|
|
|
@ -36,7 +36,7 @@ Log file. Full path to and the name for the log file. NOTE: If the file exists,
|
|||
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.
|
||||
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.
|
||||
|
@ -70,7 +70,7 @@ mysqlshow (1),
|
|||
msql2mysql (1),
|
||||
perror (1),
|
||||
replace (1),
|
||||
safe_mysqld (1),
|
||||
mysqld_safe (1),
|
||||
which1 (1),
|
||||
zap (1),
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
.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.
|
||||
.BR mysqld_safe
|
||||
is the recommended way to start a mysqld daemon on Unix. mysqld_safe 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
|
||||
.B mysqld_safe
|
||||
.RB [ \-\-basedir=\fP\fIpath\fP ]
|
||||
.RB [ \-\-core\-file\-size=# ]
|
||||
.RB [ \-\-defaults\-extra\-file=\fP\fIpath\fP ]
|
||||
|
@ -58,7 +58,7 @@ 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.
|
||||
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),
|
||||
|
@ -71,7 +71,7 @@ mysqlshow (1),
|
|||
msql2mysql (1),
|
||||
perror (1),
|
||||
replace (1),
|
||||
safe_mysqld (1),
|
||||
mysqld_safe (1),
|
||||
which1 (1),
|
||||
zap (1),
|
||||
.SH AUTHOR
|
|
@ -258,7 +258,7 @@ mysqlshow (1),
|
|||
msql2mysql (1),
|
||||
perror (1),
|
||||
replace (1),
|
||||
safe_mysqld (1),
|
||||
mysqld_safe (1),
|
||||
which1 (1),
|
||||
zap (1),
|
||||
.SH AUTHOR
|
||||
|
|
|
@ -78,7 +78,7 @@ mysqlshow (1),
|
|||
msql2mysql (1),
|
||||
perror (1),
|
||||
replace (1),
|
||||
safe_mysqld (1),
|
||||
mysqld_safe (1),
|
||||
which1 (1),
|
||||
zap (1),
|
||||
.SH AUTHOR
|
||||
|
|
|
@ -43,7 +43,7 @@ mysqlshow (1),
|
|||
msql2mysql (1),
|
||||
perror (1),
|
||||
replace (1),
|
||||
safe_mysqld (1),
|
||||
mysqld_safe (1),
|
||||
which1 (1),
|
||||
zap (1),
|
||||
.SH AUTHOR
|
||||
|
|
|
@ -52,7 +52,7 @@ mysqlshow (1),
|
|||
msql2mysql (1),
|
||||
perror (1),
|
||||
replace (1),
|
||||
safe_mysqld (1),
|
||||
mysqld_safe (1),
|
||||
which1 (1),
|
||||
zap (1),
|
||||
.SH AUTHOR
|
||||
|
|
|
@ -48,7 +48,7 @@ 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),
|
||||
isamchk (1), isamlog (1), mysqlaccess (1), mysqladmin (1), mysqlbug (1), mysqld (1), mysqldump (1), mysqlshow (1), msql2mysql (1), perror (1), replace (1), mysqld_safe (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
|
|
@ -265,9 +265,9 @@ int _mi_prefix_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
|
|||
SEARCH_NO_FIND,SEARCH_LAST and HA_REVERSE_SORT flags.
|
||||
flag is the value returned by _mi_key_cmp and as treated as final */
|
||||
int flag=0, my_flag=-1;
|
||||
uint nod_flag, length, len, matched, cmplen, kseg_len, key_len_left;
|
||||
uint nod_flag, length, len, matched, cmplen, kseg_len;
|
||||
uint prefix_len,suffix_len;
|
||||
int key_len_skip, seg_len_pack;
|
||||
int key_len_skip, seg_len_pack, key_len_left;
|
||||
uchar *end, *kseg, *vseg;
|
||||
uchar *sort_order=keyinfo->seg->charset->sort_order;
|
||||
uchar tt_buff[MI_MAX_KEY_BUFF+2], *t_buff=tt_buff+2;
|
||||
|
@ -294,7 +294,7 @@ int _mi_prefix_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
|
|||
uint lenght_pack;
|
||||
get_key_pack_length(kseg_len,lenght_pack,kseg);
|
||||
key_len_skip=lenght_pack+kseg_len;
|
||||
key_len_left=key_len-key_len_skip;
|
||||
key_len_left=(int) key_len- (int) key_len_skip;
|
||||
cmplen=(key_len_left>=0) ? kseg_len : key_len-lenght_pack;
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ EXTRA_SCRIPTS = make_binary_distribution.sh \
|
|||
mysqlhotcopy.sh \
|
||||
mysqldumpslow.sh \
|
||||
mysqld_multi.sh \
|
||||
safe_mysqld.sh
|
||||
mysqld_safe.sh
|
||||
|
||||
EXTRA_DIST = $(EXTRA_SCRIPTS) \
|
||||
mysqlaccess.conf \
|
||||
|
|
|
@ -117,7 +117,7 @@ rm -f $BASE/bin/Makefile* $BASE/bin/*.in $BASE/bin/*.sh $BASE/bin/mysql_install_
|
|||
|
||||
$BASE/bin/replace \@localstatedir\@ ./data \@bindir\@ ./bin \@scriptdir\@ ./bin \@libexecdir\@ ./bin \@sbindir\@ ./bin \@prefix\@ . \@HOSTNAME\@ @HOSTNAME@ < $SOURCE/scripts/mysql_install_db.sh > $BASE/scripts/mysql_install_db
|
||||
$BASE/bin/replace \@prefix\@ /usr/local/mysql \@bindir\@ ./bin \@MYSQLD_USER\@ root \@localstatedir\@ /usr/local/mysql/data < $SOURCE/support-files/mysql.server.sh > $BASE/support-files/mysql.server
|
||||
$BASE/bin/replace /my/gnu/bin/hostname /bin/hostname -- $BASE/bin/safe_mysqld
|
||||
$BASE/bin/replace /my/gnu/bin/hostname /bin/hostname -- $BASE/bin/mysqld_safe
|
||||
|
||||
mv $BASE/support-files/binary-configure $BASE/configure
|
||||
chmod a+x $BASE/bin/* $BASE/scripts/* $BASE/support-files/mysql-* $BASE/configure
|
||||
|
|
|
@ -333,7 +333,7 @@ then
|
|||
if test "$IN_RPM" -eq 0
|
||||
then
|
||||
echo "You can start the MySQL daemon with:"
|
||||
echo "cd @prefix@ ; $bindir/safe_mysqld &"
|
||||
echo "cd @prefix@ ; $bindir/mysqld_safe &"
|
||||
echo
|
||||
echo "You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:"
|
||||
echo "cd sql-bench ; run-all-tests"
|
||||
|
|
|
@ -457,12 +457,12 @@ sub example
|
|||
# directory, that you have (just change the socket, -S=...)
|
||||
# See more detailed information from chapter:
|
||||
# '6 The MySQL Access Privilege System' from the MySQL manual.
|
||||
# 2.pid-file is very important, if you are using safe_mysqld to start mysqld
|
||||
# (e.g. --mysqld=safe_mysqld) Every mysqld should have it's own pid-file.
|
||||
# The advantage using safe_mysqld instead of mysqld directly here is, that
|
||||
# safe_mysqld 'guards' every mysqld process and will restart it, if mysqld
|
||||
# 2.pid-file is very important, if you are using mysqld_safe to start mysqld
|
||||
# (e.g. --mysqld=mysqld_safe) Every mysqld should have it's own pid-file.
|
||||
# The advantage using mysqld_safe instead of mysqld directly here is, that
|
||||
# mysqld_safe 'guards' every mysqld process and will restart it, if mysqld
|
||||
# process fails due to signal kill -9, or similar. (Like segmentation fault,
|
||||
# which MySQL should never do, of course ;) Please note that safe_mysqld
|
||||
# which MySQL should never do, of course ;) Please note that mysqld_safe
|
||||
# script may require that you start it from a certain place. This means that
|
||||
# you may have to CD to a certain directory, before you start the
|
||||
# mysqld_multi. If you have problems starting, please see the script.
|
||||
|
@ -497,7 +497,7 @@ sub example
|
|||
# give you extra performance in a threaded system!
|
||||
#
|
||||
[mysqld_multi]
|
||||
mysqld = @bindir@/safe_mysqld
|
||||
mysqld = @bindir@/mysqld_safe
|
||||
mysqladmin = @bindir@/mysqladmin
|
||||
user = multi_admin
|
||||
password = multipass
|
||||
|
@ -591,9 +591,9 @@ Options:
|
|||
Using: $opt_log
|
||||
--mysqladmin=... mysqladmin binary to be used for a server shutdown.
|
||||
Using: $mysqladmin
|
||||
--mysqld=... mysqld binary to be used. Note that you can give safe_mysqld
|
||||
--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 PATH or fix safe_mysqld.
|
||||
make sure you have mysqld in your PATH or fix mysqld_safe.
|
||||
Using: $mysqld
|
||||
--no-log Print to stdout instead of the log file. By default the log
|
||||
file is turned on.
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
# binary installation that has other paths than you are using.
|
||||
#
|
||||
# mysql.server works by first doing a cd to the base directory and from there
|
||||
# executing safe_mysqld
|
||||
# executing mysqld_safe
|
||||
|
||||
# Check if we are starting this relative (for the binary release)
|
||||
if test -f ./data/mysql/db.frm -a -f ./share/mysql/english/errmsg.sys -a \
|
|
@ -8,7 +8,7 @@
|
|||
# binary installation that has other paths than you are using.
|
||||
#
|
||||
# mysql.server works by first doing a cd to the base directory and from there
|
||||
# executing safe_mysqld
|
||||
# executing mysqld_safe
|
||||
|
||||
trap '' 1 2 3 15 # we shouldn't let anyone kill us
|
||||
|
||||
|
@ -38,12 +38,12 @@ parse_arguments() {
|
|||
--pid-file=*) pid_file=`echo "$arg" | sed -e "s;--pid-file=;;"` ;;
|
||||
--user=*) user=`echo "$arg" | sed -e "s;--user=;;"` ;;
|
||||
|
||||
# these two might have been set in a [safe_mysqld] section of my.cnf
|
||||
# they get passed via environment variables to safe_mysqld
|
||||
# these two might have been set in a [mysqld_safe] section of my.cnf
|
||||
# they get passed via environment variables to mysqld_safe
|
||||
--socket=*) MYSQL_UNIX_PORT=`echo "$arg" | sed -e "s;--socket=;;"` ;;
|
||||
--port=*) MYSQL_TCP_PORT=`echo "$arg" | sed -e "s;--port=;;"` ;;
|
||||
|
||||
# safe_mysqld-specific options - must be set in my.cnf ([safe_mysqld])!
|
||||
# mysqld_safe-specific options - must be set in my.cnf ([mysqld_safe])!
|
||||
--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
|
||||
|
@ -114,7 +114,7 @@ fi
|
|||
pid_file=
|
||||
err_log=
|
||||
|
||||
# Get first arguments from the my.cnf file, groups [mysqld] and [safe_mysqld]
|
||||
# Get first arguments from the my.cnf file, groups [mysqld] and [mysqld_safe]
|
||||
# and then merge with the command line arguments
|
||||
if test -x ./bin/my_print_defaults
|
||||
then
|
||||
|
@ -130,7 +130,7 @@ else
|
|||
fi
|
||||
|
||||
args=
|
||||
parse_arguments `$print_defaults $defaults mysqld server safe_mysqld`
|
||||
parse_arguments `$print_defaults $defaults mysqld server mysqld_safe safe_mysqld`
|
||||
parse_arguments PICK-ARGS-FROM-ARGV "$@"
|
||||
|
||||
if test ! -x $ledir/$MYSQLD
|
||||
|
@ -138,7 +138,7 @@ then
|
|||
echo "The file $ledir/$MYSQLD doesn't exist or is not executable"
|
||||
echo "Please do a cd to the mysql installation directory and restart"
|
||||
echo "this script from there as follows:"
|
||||
echo "./bin/safe_mysqld".
|
||||
echo "./bin/mysqld_safe".
|
||||
exit 1
|
||||
fi
|
||||
|
|
@ -170,6 +170,7 @@ static SYMBOL symbols[] = {
|
|||
{ "IGNORE", SYM(IGNORE_SYM),0,0},
|
||||
{ "IN", SYM(IN_SYM),0,0},
|
||||
{ "INDEX", SYM(INDEX),0,0},
|
||||
{ "INDEXES", SYM(INDEXES),0,0},
|
||||
{ "INFILE", SYM(INFILE),0,0},
|
||||
{ "INNER", SYM(INNER_SYM),0,0},
|
||||
{ "INNOBASE", SYM(INNOBASE_SYM),0,0},
|
||||
|
|
|
@ -49,6 +49,8 @@ template class List<Alter_drop>;
|
|||
template class List_iterator<Alter_drop>;
|
||||
template class List<Alter_column>;
|
||||
template class List_iterator<Alter_column>;
|
||||
template class List<Set_option>;
|
||||
template class List_iterator<Set_option>;
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
|
|
@ -120,6 +120,18 @@ typedef struct st_select_lex {
|
|||
} SELECT_LEX;
|
||||
|
||||
|
||||
class Set_option :public Sql_alloc {
|
||||
public:
|
||||
const char *name;
|
||||
Item *item;
|
||||
uint name_length;
|
||||
bool type; /* 1 if global */
|
||||
Set_option(bool par_type, const char *par_name, uint length,
|
||||
Item *par_item)
|
||||
:name(par_name), item(par_item), name_length(length), type(par_type) {}
|
||||
};
|
||||
|
||||
|
||||
/* The state of the lex parsing. This is saved in the THD struct */
|
||||
|
||||
typedef struct st_lex {
|
||||
|
@ -143,6 +155,7 @@ typedef struct st_lex {
|
|||
List<create_field> create_list;
|
||||
List<Item> *insert_list,field_list,value_list;
|
||||
List<List_item> many_values;
|
||||
List<Set_option> option_list;
|
||||
SQL_LIST proc_list, auxilliary_table_list;
|
||||
TYPELIB *interval;
|
||||
create_field *last_field;
|
||||
|
@ -167,7 +180,7 @@ typedef struct st_lex {
|
|||
uint grant,grant_tot_col,which_columns;
|
||||
thr_lock_type lock_option;
|
||||
bool drop_primary,drop_if_exists,local_file;
|
||||
bool in_comment,ignore_space,verbose,simple_alter;
|
||||
bool in_comment,ignore_space,verbose,simple_alter, option_type;
|
||||
|
||||
} LEX;
|
||||
|
||||
|
|
|
@ -197,6 +197,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
|
|||
%token IDENT
|
||||
%token IGNORE_SYM
|
||||
%token INDEX
|
||||
%token INDEXES
|
||||
%token INFILE
|
||||
%token INNER_SYM
|
||||
%token INNOBASE_SYM
|
||||
|
@ -1047,6 +1048,7 @@ key_or_index:
|
|||
keys_or_index:
|
||||
KEYS {}
|
||||
| INDEX {}
|
||||
| INDEXES {}
|
||||
|
||||
opt_unique_or_fulltext:
|
||||
/* empty */ { $$= Key::MULTIPLE; }
|
||||
|
@ -2392,7 +2394,7 @@ show_param:
|
|||
lex->select->db= $3;
|
||||
lex->select->options=0;
|
||||
}
|
||||
| opt_full COLUMNS FROM table_ident opt_db wild
|
||||
| opt_full COLUMNS from_or_in table_ident opt_db wild
|
||||
{
|
||||
Lex->sql_command= SQLCOM_SHOW_FIELDS;
|
||||
if ($5)
|
||||
|
@ -2452,7 +2454,7 @@ show_param:
|
|||
|
||||
opt_db:
|
||||
/* empty */ { $$= 0; }
|
||||
| FROM ident { $$= $2.str; }
|
||||
| from_or_in ident { $$= $2.str; }
|
||||
|
||||
wild:
|
||||
/* empty */
|
||||
|
@ -2462,6 +2464,10 @@ opt_full:
|
|||
/* empty */ { Lex->verbose=0; }
|
||||
| FULL { Lex->verbose=1; }
|
||||
|
||||
from_or_in:
|
||||
FROM
|
||||
| IN_SYM
|
||||
|
||||
binlog_in:
|
||||
/* empty */ { Lex->mi.log_file_name = 0; }
|
||||
| IN_SYM TEXT_STRING { Lex->mi.log_file_name = $2.str; }
|
||||
|
@ -2818,6 +2824,7 @@ keyword:
|
|||
| HOSTS_SYM {}
|
||||
| HOUR_SYM {}
|
||||
| IDENTIFIED_SYM {}
|
||||
| INDEXES {}
|
||||
| ISOLATION {}
|
||||
| ISAM_SYM {}
|
||||
| INNOBASE_SYM {}
|
||||
|
@ -2901,6 +2908,8 @@ set:
|
|||
lex->select->select_limit=lex->thd->default_select_limit;
|
||||
lex->gemini_spin_retries=lex->thd->gemini_spin_retries;
|
||||
lex->tx_isolation=lex->thd->tx_isolation;
|
||||
lex->option_type=0;
|
||||
lex->option_list.empty()
|
||||
}
|
||||
option_value_list
|
||||
|
||||
|
@ -2910,6 +2919,8 @@ opt_option:
|
|||
|
||||
option_value_list:
|
||||
option_value
|
||||
| GLOBAL_SYM { Lex->option_type=1; } option_value
|
||||
| LOCAL_SYM { Lex->option_type=0; } option_value
|
||||
| option_value_list ',' option_value
|
||||
|
||||
option_value:
|
||||
|
@ -3017,6 +3028,28 @@ option_value:
|
|||
slave_skip_counter = $3;
|
||||
pthread_mutex_unlock(&LOCK_slave);
|
||||
}
|
||||
| ident equal DEFAULT
|
||||
{
|
||||
LEX *lex=Lex;
|
||||
lex->option_list.push_back(new Set_option(lex->option_type,
|
||||
$1.str,$1.length,
|
||||
(Item*) 0));
|
||||
}
|
||||
| ident equal expr
|
||||
{
|
||||
THD *thd=current_thd;
|
||||
Item *item= $3;
|
||||
if (item->fix_fields(current_thd,0))
|
||||
{
|
||||
send_error(&thd->net, ER_SET_CONSTANTS_ONLY);
|
||||
YYABORT;
|
||||
}
|
||||
thd->lex.option_list.
|
||||
push_back(new Set_option(thd->lex.option_type,
|
||||
$1.str,$1.length,
|
||||
item));
|
||||
}
|
||||
|
||||
|
||||
text_or_password:
|
||||
TEXT_STRING { $$=$1.str;}
|
||||
|
|
|
@ -20,5 +20,5 @@ then
|
|||
echo "Starting the mysqld server. You can test that it is up and running"
|
||||
echo "with the command:"
|
||||
echo "./bin/mysqladmin version"
|
||||
./bin/safe_mysqld &
|
||||
./bin/mysqld_safe &
|
||||
fi
|
||||
|
|
|
@ -208,7 +208,7 @@ chmod -R og-rw $mysql_datadir/mysql
|
|||
# Restart in the same way that mysqld will be started normally.
|
||||
/etc/rc.d/init.d/mysql start
|
||||
|
||||
# Allow safe_mysqld to start mysqld and print a message before we exit
|
||||
# Allow mysqld_safe to start mysqld and print a message before we exit
|
||||
sleep 2
|
||||
|
||||
%preun
|
||||
|
@ -244,7 +244,7 @@ fi
|
|||
%attr(755, root, root) /usr/bin/perror
|
||||
%attr(755, root, root) /usr/bin/replace
|
||||
%attr(755, root, root) /usr/bin/resolveip
|
||||
%attr(755, root, root) /usr/bin/safe_mysqld
|
||||
%attr(755, root, root) /usr/bin/mysqld_safe
|
||||
%attr(755, root, root) /usr/bin/mysqld_multi
|
||||
%attr(755, root, root) /usr/bin/my_print_defaults
|
||||
|
||||
|
|
|
@ -133,14 +133,14 @@ case "$mode" in
|
|||
'start')
|
||||
# Start daemon
|
||||
|
||||
if test -x $bindir/safe_mysqld
|
||||
if test -x $bindir/mysqld_safe
|
||||
then
|
||||
# We only need to specify datadir and pid-file here and we
|
||||
# get all other instance-specific config from $datadir/my.cnf.
|
||||
# We have to explicitly pass --defaults-extra-file because it
|
||||
# reads the config files before the command line options.
|
||||
# Also it must be first because of the way safe_mysqld works.
|
||||
$bindir/safe_mysqld --defaults-extra-file=$datadir/my.cnf \
|
||||
# Also it must be first because of the way mysqld_safe works.
|
||||
$bindir/mysqld_safe --defaults-extra-file=$datadir/my.cnf \
|
||||
--datadir=$datadir --pid-file=$pid_file &
|
||||
# Make lock for RedHat / SuSE
|
||||
if test -d /var/lock/subsys
|
||||
|
@ -148,7 +148,7 @@ case "$mode" in
|
|||
touch /var/lock/subsys/mysql
|
||||
fi
|
||||
else
|
||||
echo "Can't execute $bindir/safe_mysqld"
|
||||
echo "Can't execute $bindir/mysqld_safe"
|
||||
fi
|
||||
;;
|
||||
|
||||
|
|
|
@ -100,18 +100,18 @@ case "$mode" in
|
|||
'start')
|
||||
# Start daemon
|
||||
|
||||
if test -x $bindir/safe_mysqld
|
||||
if test -x $bindir/mysqld_safe
|
||||
then
|
||||
# Give extra arguments to mysqld with the my.cnf file. This script may
|
||||
# be overwritten at next upgrade.
|
||||
$bindir/safe_mysqld --datadir=$datadir --pid-file=$pid_file &
|
||||
$bindir/mysqld_safe --datadir=$datadir --pid-file=$pid_file &
|
||||
# Make lock for RedHat / SuSE
|
||||
if test -w /var/lock/subsys
|
||||
then
|
||||
touch /var/lock/subsys/mysql
|
||||
fi
|
||||
else
|
||||
echo "Can't execute $bindir/safe_mysqld"
|
||||
echo "Can't execute $bindir/mysqld_safe"
|
||||
fi
|
||||
;;
|
||||
|
||||
|
|
|
@ -296,7 +296,7 @@ chmod -R og-rw $mysql_datadir/mysql
|
|||
# Restart in the same way that mysqld will be started normally.
|
||||
/etc/rc.d/init.d/mysql start
|
||||
|
||||
# Allow safe_mysqld to start mysqld and print a message before we exit
|
||||
# Allow mysqld_safe to start mysqld and print a message before we exit
|
||||
sleep 2
|
||||
|
||||
%post Max
|
||||
|
@ -342,7 +342,7 @@ fi
|
|||
%attr(755, root, root) /usr/bin/perror
|
||||
%attr(755, root, root) /usr/bin/replace
|
||||
%attr(755, root, root) /usr/bin/resolveip
|
||||
%attr(755, root, root) /usr/bin/safe_mysqld
|
||||
%attr(755, root, root) /usr/bin/mysqld_safe
|
||||
%attr(755, root, root) /usr/bin/mysqld_multi
|
||||
%attr(755, root, root) /usr/bin/my_print_defaults
|
||||
|
||||
|
@ -379,7 +379,7 @@ fi
|
|||
%attr(644, root, man) %doc /usr/man/man1/mysqlshow.1*
|
||||
%attr(644, root, man) %doc /usr/man/man1/perror.1*
|
||||
%attr(644, root, man) %doc /usr/man/man1/replace.1*
|
||||
%attr(644, root, man) %doc /usr/man/man1/safe_mysqld.1*
|
||||
%attr(644, root, man) %doc /usr/man/man1/mysqld_safe.1*
|
||||
|
||||
%post shared
|
||||
/sbin/ldconfig
|
||||
|
|
Loading…
Reference in a new issue