diff options
31 files changed, 109 insertions, 60 deletions
diff --git a/man/Makefile.am b/man/Makefile.am index 186fc01685e..7019d2aa865 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -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) diff --git a/man/isamchk.1 b/man/isamchk.1 index f225dc35d18..2552d9f80cd 100644 --- a/man/isamchk.1 +++ b/man/isamchk.1 @@ -125,7 +125,7 @@ mysqlshow (1), msql2mysql (1), perror (1), replace (1), -safe_mysqld (1), +mysqld_safe (1), which1 (1), zap (1), .SH AUTHOR diff --git a/man/isamlog.1 b/man/isamlog.1 index efc042ccd7c..ef6ceaff8da 100644 --- a/man/isamlog.1 +++ b/man/isamlog.1 @@ -83,7 +83,7 @@ mysqlshow (1), msql2mysql (1), perror (1), replace (1), -safe_mysqld (1), +mysqld_safe (1), which1 (1), zap (1), diff --git a/man/mysql.1 b/man/mysql.1 index 96ccca8f50e..e10fd589092 100644 --- a/man/mysql.1 +++ b/man/mysql.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 diff --git a/man/mysql_zap.1 b/man/mysql_zap.1 index 98da195894e..e57eb7a4d07 100644 --- a/man/mysql_zap.1 +++ b/man/mysql_zap.1 @@ -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
\ No newline at end of file diff --git a/man/mysqlaccess.1 b/man/mysqlaccess.1 index 888cfe8f646..0ae06dca137 100644 --- a/man/mysqlaccess.1 +++ b/man/mysqlaccess.1 @@ -106,7 +106,7 @@ mysqlshow (1), msql2mysql (1), perror (1), replace (1), -safe_mysqld (1), +mysqld_safe (1), which1 (1), zap (1), .SH AUTHOR diff --git a/man/mysqladmin.1 b/man/mysqladmin.1 index 58bd2070de6..1e435006bb2 100644 --- a/man/mysqladmin.1 +++ b/man/mysqladmin.1 @@ -189,7 +189,7 @@ mysqlshow (1), msql2mysql (1), perror (1), replace (1), -safe_mysqld (1), +mysqld_safe (1), which1 (1), zap (1), .SH AUTHOR diff --git a/man/mysqld.1 b/man/mysqld.1 index d3f22c0be1b..1f87eb9cf32 100644 --- a/man/mysqld.1 +++ b/man/mysqld.1 @@ -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 diff --git a/man/mysqld_multi.1 b/man/mysqld_multi.1 index b68050e92ef..b7aa77f656d 100644 --- a/man/mysqld_multi.1 +++ b/man/mysqld_multi.1 @@ -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), diff --git a/man/safe_mysqld.1 b/man/mysqld_safe.1 index 30abf04ae6b..bffbecd6478 100644 --- a/man/safe_mysqld.1 +++ b/man/mysqld_safe.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 diff --git a/man/mysqldump.1 b/man/mysqldump.1 index f108da17bf9..b9e5aa33791 100644 --- a/man/mysqldump.1 +++ b/man/mysqldump.1 @@ -258,7 +258,7 @@ mysqlshow (1), msql2mysql (1), perror (1), replace (1), -safe_mysqld (1), +mysqld_safe (1), which1 (1), zap (1), .SH AUTHOR diff --git a/man/mysqlshow.1 b/man/mysqlshow.1 index 55a87c1df78..661b2cd02c8 100644 --- a/man/mysqlshow.1 +++ b/man/mysqlshow.1 @@ -78,7 +78,7 @@ mysqlshow (1), msql2mysql (1), perror (1), replace (1), -safe_mysqld (1), +mysqld_safe (1), which1 (1), zap (1), .SH AUTHOR diff --git a/man/perror.1 b/man/perror.1 index 2853f2cb1ba..7adf99ea772 100644 --- a/man/perror.1 +++ b/man/perror.1 @@ -43,7 +43,7 @@ mysqlshow (1), msql2mysql (1), perror (1), replace (1), -safe_mysqld (1), +mysqld_safe (1), which1 (1), zap (1), .SH AUTHOR diff --git a/man/replace.1 b/man/replace.1 index 10bcf64fc88..38ffe998027 100644 --- a/man/replace.1 +++ b/man/replace.1 @@ -52,7 +52,7 @@ mysqlshow (1), msql2mysql (1), perror (1), replace (1), -safe_mysqld (1), +mysqld_safe (1), which1 (1), zap (1), .SH AUTHOR diff --git a/man/which.2 b/man/which.2 index 599b68080a2..30d5557ed01 100644 --- a/man/which.2 +++ b/man/which.2 @@ -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
\ No newline at end of file diff --git a/myisam/mi_search.c b/myisam/mi_search.c index b9dd8879694..cc6bc4b0fdf 100644 --- a/myisam/mi_search.c +++ b/myisam/mi_search.c @@ -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; } diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 45fbe275476..d2cca98ce63 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -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 \ diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh index 40c48188346..1848123fd8e 100644 --- a/scripts/make_binary_distribution.sh +++ b/scripts/make_binary_distribution.sh @@ -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 diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh index f7324668bd2..7e232692ba1 100644 --- a/scripts/mysql_install_db.sh +++ b/scripts/mysql_install_db.sh @@ -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" diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh index 1adaa458271..656894f0e37 100644 --- a/scripts/mysqld_multi.sh +++ b/scripts/mysqld_multi.sh @@ -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. diff --git a/scripts/safe_mysqld-watch.sh b/scripts/mysqld_safe-watch.sh index 30f95fd7a86..c59b3b2614d 100644 --- a/scripts/safe_mysqld-watch.sh +++ b/scripts/mysqld_safe-watch.sh @@ -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 \ diff --git a/scripts/safe_mysqld.sh b/scripts/mysqld_safe.sh index 6eda1740ad6..ac33c9ad1f2 100644 --- a/scripts/safe_mysqld.sh +++ b/scripts/mysqld_safe.sh @@ -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 diff --git a/sql/lex.h b/sql/lex.h index 48352d3e702..e9ab150f5b2 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -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}, diff --git a/sql/sql_class.cc b/sql/sql_class.cc index b6cba673bea..f196e4ff852 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -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 /**************************************************************************** diff --git a/sql/sql_lex.h b/sql/sql_lex.h index a7b7f75f4a2..e585ec65191 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -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; diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 8877d7eb08c..c013ebe1c8c 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -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;} diff --git a/support-files/binary-configure.sh b/support-files/binary-configure.sh index 682ea570b25..107f468bffc 100644 --- a/support-files/binary-configure.sh +++ b/support-files/binary-configure.sh @@ -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 diff --git a/support-files/mysql-max.spec.sh b/support-files/mysql-max.spec.sh index 49f131154c0..5c4b16f0e9d 100644 --- a/support-files/mysql-max.spec.sh +++ b/support-files/mysql-max.spec.sh @@ -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 diff --git a/support-files/mysql-multi.server.sh b/support-files/mysql-multi.server.sh index 6c940630427..31020029354 100644 --- a/support-files/mysql-multi.server.sh +++ b/support-files/mysql-multi.server.sh @@ -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 ;; diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh index 62381ccf0d3..ee5a9adaf8b 100644 --- a/support-files/mysql.server.sh +++ b/support-files/mysql.server.sh @@ -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 ;; diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 6912953495e..1bea22fbad7 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -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 |