summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/lex.h2
-rw-r--r--sql/mysql_priv.h14
-rw-r--r--sql/mysqld.cc137
-rw-r--r--sql/share/errmsg-utf8.txt4
-rw-r--r--sql/spatial.cc22
-rw-r--r--sql/sql_yacc.yy27
-rw-r--r--sql/sys_vars.cc24
7 files changed, 70 insertions, 160 deletions
diff --git a/sql/lex.h b/sql/lex.h
index 5493206c214..fbedddc6941 100644
--- a/sql/lex.h
+++ b/sql/lex.h
@@ -226,7 +226,6 @@ static SYMBOL symbols[] = {
{ "FORCE", SYM(FORCE_SYM)},
{ "FOREIGN", SYM(FOREIGN)},
{ "FOUND", SYM(FOUND_SYM)},
- { "FRAC_SECOND", SYM(FRAC_SECOND_SYM)},
{ "FROM", SYM(FROM)},
{ "FULL", SYM(FULL)},
{ "FULLTEXT", SYM(FULLTEXT_SYM)},
@@ -517,7 +516,6 @@ static SYMBOL symbols[] = {
{ "SQL_NO_CACHE", SYM(SQL_NO_CACHE_SYM)},
{ "SQL_SMALL_RESULT", SYM(SQL_SMALL_RESULT)},
{ "SQL_THREAD", SYM(SQL_THREAD)},
- { "SQL_TSI_FRAC_SECOND", SYM(FRAC_SECOND_SYM)},
{ "SQL_TSI_SECOND", SYM(SECOND_SYM)},
{ "SQL_TSI_MINUTE", SYM(MINUTE_SYM)},
{ "SQL_TSI_HOUR", SYM(HOUR_SYM)},
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index b27a7ea5078..937f92b37f3 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -198,12 +198,12 @@ char* query_table_status(THD *thd,const char *db,const char *table_name);
if (((THD *) Thd) != NULL) \
push_warning_printf(((THD *) Thd), MYSQL_ERROR::WARN_LEVEL_WARN, \
ER_WARN_DEPRECATED_SYNTAX, \
- ER(ER_WARN_DEPRECATED_SYNTAX_WITH_VER), \
- (Old), #VerHi "." #VerLo, (New)); \
+ ER(ER_WARN_DEPRECATED_SYNTAX), \
+ (Old), (New)); \
else \
sql_print_warning("The syntax '%s' is deprecated and will be removed " \
- "in MySQL %s. Please use %s instead.", \
- (Old), #VerHi "." #VerLo, (New)); \
+ "in a future release. Please use %s instead.", \
+ (Old), (New)); \
} while(0)
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *system_charset_info;
@@ -2027,7 +2027,7 @@ extern bool in_bootstrap;
extern uint volatile thread_count, global_read_lock;
extern uint connection_count;
extern my_bool opt_sql_bin_update, opt_safe_user_create, opt_no_mix_types;
-extern my_bool opt_safe_show_db, opt_local_infile, opt_myisam_use_mmap;
+extern my_bool opt_local_infile, opt_myisam_use_mmap;
extern my_bool opt_slave_compressed_protocol, use_temp_pool;
extern uint slave_exec_mode_options;
extern ulonglong slave_type_conversions_options;
@@ -2638,7 +2638,6 @@ enum options_mysqld
OPT_BOOTSTRAP,
OPT_CONSOLE,
OPT_DEBUG_SYNC_TIMEOUT,
- OPT_DELAY_KEY_WRITE_ALL,
OPT_ISAM_LOG,
OPT_KEY_BUFFER_SIZE,
OPT_KEY_CACHE_AGE_THRESHOLD,
@@ -2657,19 +2656,16 @@ enum options_mysqld
OPT_SAFE,
OPT_SERVER_ID,
OPT_SKIP_HOST_CACHE,
- OPT_SKIP_LOCK,
OPT_SKIP_NEW,
OPT_SKIP_PRIOR,
OPT_SKIP_RESOLVE,
OPT_SKIP_STACK_TRACE,
- OPT_SKIP_SYMLINKS,
OPT_SLOW_QUERY_LOG,
OPT_SSL_CA,
OPT_SSL_CAPATH,
OPT_SSL_CERT,
OPT_SSL_CIPHER,
OPT_SSL_KEY,
- OPT_UPDATE_LOG,
OPT_WANT_CORE,
OPT_ENGINE_CONDITION_PUSHDOWN
};
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index a11ba2eec49..3675ebbc973 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -52,6 +52,10 @@
#include "sp_rcontext.h"
#include "sp_cache.h"
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#endif
+
#define mysqld_charset &my_charset_latin1
/* stack traces are only supported on linux intel */
@@ -4008,21 +4012,13 @@ static int init_server_components()
Implementation of the above :
- If mysqld is started with --log-update and --log-bin,
ignore --log-update (print a warning), push a warning when SQL_LOG_UPDATE
- is used, and turn off --sql-bin-update-same.
+ is used,
This will completely ignore SQL_LOG_UPDATE
- If mysqld is started with --log-update only,
change it to --log-bin (with the filename passed to log-update,
plus '-bin') (print a warning), push a warning when SQL_LOG_UPDATE is
- used, and turn on --sql-bin-update-same.
+ used.
This will translate SQL_LOG_UPDATE to SQL_LOG_BIN.
-
- Note that we tell the user that --sql-bin-update-same is deprecated and
- does nothing, and we don't take into account if he used this option or
- not; but internally we give this variable a value to have the behaviour
- we want (i.e. have SQL_LOG_UPDATE influence SQL_LOG_BIN or not).
- As sql-bin-update-same, log-update and log-bin cannot be changed by the
- user after starting the server (they are not variables), the user will
- not later interfere with the settings we do here.
*/
if (opt_bin_log)
{
@@ -5348,26 +5344,47 @@ void handle_connections_sockets()
{
my_socket sock,new_sock;
uint error_count=0;
- uint max_used_connection= (uint) (max(ip_sock,unix_sock)+1);
- fd_set readFDs,clientFDs;
THD *thd;
struct sockaddr_storage cAddr;
- int ip_flags=0,socket_flags=0,flags;
+ int ip_flags=0,socket_flags=0,flags,retval;
st_vio *vio_tmp;
+#ifdef HAVE_POLL
+ int socket_count= 0;
+ struct pollfd fds[2]; // for ip_sock and unix_sock
+#else
+ fd_set readFDs,clientFDs;
+ uint max_used_connection= (uint) (max(ip_sock,unix_sock)+1);
+#endif
+
DBUG_ENTER("handle_connections_sockets");
LINT_INIT(new_sock);
+#ifndef HAVE_POLL
FD_ZERO(&clientFDs);
+#endif
+
if (ip_sock != INVALID_SOCKET)
{
+#ifdef HAVE_POLL
+ fds[socket_count].fd= ip_sock;
+ fds[socket_count].events= POLLIN;
+ socket_count++;
+#else
FD_SET(ip_sock,&clientFDs);
+#endif
#ifdef HAVE_FCNTL
ip_flags = fcntl(ip_sock, F_GETFL, 0);
#endif
}
#ifdef HAVE_SYS_UN_H
+#ifdef HAVE_POLL
+ fds[socket_count].fd= unix_sock;
+ fds[socket_count].events= POLLIN;
+ socket_count++;
+#else
FD_SET(unix_sock,&clientFDs);
+#endif
#ifdef HAVE_FCNTL
socket_flags=fcntl(unix_sock, F_GETFL, 0);
#endif
@@ -5377,12 +5394,15 @@ void handle_connections_sockets()
MAYBE_BROKEN_SYSCALL;
while (!abort_loop)
{
- readFDs=clientFDs;
-#ifdef HPUX10
- if (select(max_used_connection,(int*) &readFDs,0,0,0) < 0)
- continue;
+#ifdef HAVE_POLL
+ retval= poll(fds, socket_count, -1);
#else
- if (select((int) max_used_connection,&readFDs,0,0,0) < 0)
+ readFDs=clientFDs;
+
+ retval= select((int) max_used_connection,&readFDs,0,0,0);
+#endif
+
+ if (retval < 0)
{
if (socket_errno != SOCKET_EINTR)
{
@@ -5392,7 +5412,7 @@ void handle_connections_sockets()
MAYBE_BROKEN_SYSCALL
continue;
}
-#endif /* HPUX10 */
+
if (abort_loop)
{
MAYBE_BROKEN_SYSCALL;
@@ -5400,6 +5420,21 @@ void handle_connections_sockets()
}
/* Is this a new connection request ? */
+#ifdef HAVE_POLL
+ for (int i= 0; i < socket_count; ++i)
+ {
+ if (fds[i].revents & POLLIN)
+ {
+ sock= fds[i].fd;
+#ifdef HAVE_FCNTL
+ flags= fcntl(sock, F_GETFL, 0);
+#else
+ flags= 0;
+#endif // HAVE_FCNTL
+ break;
+ }
+ }
+#else // HAVE_POLL
#ifdef HAVE_SYS_UN_H
if (FD_ISSET(unix_sock,&readFDs))
{
@@ -5407,11 +5442,12 @@ void handle_connections_sockets()
flags= socket_flags;
}
else
-#endif
+#endif // HAVE_SYS_UN_H
{
sock = ip_sock;
flags= ip_flags;
}
+#endif // HAVE_POLL
#if !defined(NO_FCNTL_NONBLOCK)
if (!(test_flags & TEST_BLOCKING))
@@ -5975,12 +6011,6 @@ struct my_option my_long_options[]=
0, 0, 0},
{"core-file", OPT_WANT_CORE, "Write core on errors.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0},
- {"default-character-set", 'C', "Set the default character set (deprecated option, use --character-set-server instead).",
- (uchar**) &default_character_set_name, (uchar**) &default_character_set_name,
- 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
- {"default-collation", 0, "Set the default collation (deprecated option, use --collation-server instead).",
- (uchar**) &default_collation_name, (uchar**) &default_collation_name,
- 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
/* default-storage-engine should have "MyISAM" as def_value. Instead
of initializing it here it is done in init_common_variables() due
to a compiler bug in Sun Studio compiler. */
@@ -5990,9 +6020,6 @@ struct my_option my_long_options[]=
{"default-time-zone", 0, "Set the default time zone.",
(uchar**) &default_tz_name, (uchar**) &default_tz_name,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
- {"delay-key-write-for-all-tables", OPT_DELAY_KEY_WRITE_ALL,
- "Don't flush key buffers between writes for any MyISAM table (Deprecated option, use --delay-key-write=all instead).",
- 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
#ifdef HAVE_OPENSSL
{"des-key-file", 0,
"Load keys for des_encrypt() and des_encrypt from given file.",
@@ -6006,10 +6033,6 @@ struct my_option my_long_options[]=
(uchar**) &disconnect_slave_event_count, 0, GET_INT, REQUIRED_ARG, 0, 0, 0,
0, 0, 0},
#endif /* HAVE_REPLICATION */
- {"enable-locking", 0,
- "Deprecated option, use --external-locking instead.",
- (uchar**) &opt_external_locking, (uchar**) &opt_external_locking,
- 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
#ifdef HAVE_STACK_TRACE_ON_SEGV
{"enable-pstack", 0, "Print a symbolic stack trace on failure.",
(uchar**) &opt_do_pstack, (uchar**) &opt_do_pstack, 0, GET_BOOL, NO_ARG, 0, 0,
@@ -6062,9 +6085,6 @@ struct my_option my_long_options[]=
{"log-isam", OPT_ISAM_LOG, "Log all MyISAM changes to file.",
(uchar**) &myisam_log_filename, (uchar**) &myisam_log_filename, 0, GET_STR,
OPT_ARG, 0, 0, 0, 0, 0, 0},
- {"log-long-format", '0',
- "Log some extra information to update log. Please note that this option is deprecated; see --log-short-format option.",
- 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"log-short-format", 0,
"Don't log extra information to update and slow-query logs.",
(uchar**) &opt_short_log_format, (uchar**) &opt_short_log_format,
@@ -6097,11 +6117,6 @@ struct my_option my_long_options[]=
REQUIRED_ARG, TC_LOG_MIN_SIZE, TC_LOG_MIN_SIZE, ULONG_MAX, 0,
TC_LOG_PAGE_SIZE, 0},
#endif
- {"log-update", OPT_UPDATE_LOG,
- "The update log is deprecated since version 5.0, is replaced by the binary \
-log and this option justs turns on --log-bin instead.",
- (uchar**) &opt_update_logname, (uchar**) &opt_update_logname, 0, GET_STR,
- OPT_ARG, 0, 0, 0, 0, 0, 0},
{"master-info-file", 0,
"The location and name of the file that remembers the master and where the I/O replication \
thread is in the master's binlogs.",
@@ -6165,11 +6180,6 @@ Can't be set to 1 if --log-slave-updates is used.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"safe-mode", OPT_SAFE, "Skip some optimize stages (for testing).",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
-#ifndef TO_BE_DELETED
- {"safe-show-database", 0,
- "Deprecated option; use GRANT SHOW DATABASES instead...",
- 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
-#endif
{"safe-user-create", 0,
"Don't allow new user creation by the user who has no write privileges to the mysql.user table.",
(uchar**) &opt_safe_user_create, (uchar**) &opt_safe_user_create, 0, GET_BOOL,
@@ -6182,9 +6192,6 @@ Can't be set to 1 if --log-slave-updates is used.",
(uchar**)&sf_malloc_mem_limit, (uchar**)&sf_malloc_mem_limit, 0, GET_UINT,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#endif
- {"set-variable", 'O',
- "Change the value of a variable. Please note that this option is deprecated;you can set variables directly with --variable-name=value.",
- 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"show-slave-auth-info", 0,
"Show user and password in SHOW SLAVE HOSTS on this master",
(uchar**) &opt_show_slave_auth_info, (uchar**) &opt_show_slave_auth_info, 0,
@@ -6197,9 +6204,6 @@ Can't be set to 1 if --log-slave-updates is used.",
#endif
{"skip-host-cache", OPT_SKIP_HOST_CACHE, "Don't cache host names.", 0, 0, 0,
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"skip-locking", OPT_SKIP_LOCK,
- "Deprecated option, use --skip-external-locking instead.",
- 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"skip-name-resolve", OPT_SKIP_RESOLVE,
"Don't resolve hostnames. All hostnames are IP's or 'localhost'.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -6211,8 +6215,6 @@ Can't be set to 1 if --log-slave-updates is used.",
{"skip-stack-trace", OPT_SKIP_STACK_TRACE,
"Don't print a stack trace on failure.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0,
0, 0, 0, 0},
- {"skip-symlink", OPT_SKIP_SYMLINKS, "Don't allow symlinking of tables. Deprecated option. Use --skip-symbolic-links instead.",
- 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"skip-thread-priority", OPT_SKIP_PRIOR,
"Don't give threads different priorities. This option is deprecated "
"because it has no effect; the implied behavior is already the default.",
@@ -6224,10 +6226,6 @@ Can't be set to 1 if --log-slave-updates is used.",
(uchar**) &opt_sporadic_binlog_dump_fail, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
0},
#endif /* HAVE_REPLICATION */
- {"sql-bin-update-same", 0,
- "The update log is deprecated since version 5.0, is replaced by the "
- "binary log and this option does nothing anymore.",
- 0, 0, 0, GET_DISABLED, NO_ARG, 0, 0, 0, 0, 0, 0},
#ifdef HAVE_OPENSSL
{"ssl", 0,
"Enable SSL for connection (automatically enabled with other flags).",
@@ -6286,20 +6284,12 @@ Can't be set to 1 if --log-slave-updates is used.",
0, 0},
{"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0},
- {"warnings", 'W', "Deprecated; use --log-warnings instead.",
- (uchar**) &global_system_variables.log_warnings,
- (uchar**) &max_system_variables.log_warnings, 0, GET_ULONG, OPT_ARG,
- 1, 0, ULONG_MAX, 0, 0, 0},
{"plugin-load", 0,
"Optional semicolon-separated list of plugins to load, where each plugin is "
"identified as name=library, where name is the plugin name and library "
"is the plugin library in plugin_dir.",
(uchar**) &opt_plugin_load, (uchar**) &opt_plugin_load, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"record_buffer", 0, "Deprecated; use --read-buffer-size instead.",
- (uchar**) &global_system_variables.read_buff_size,
- (uchar**) &max_system_variables.read_buff_size,0, GET_ULONG, REQUIRED_ARG,
- 128*1024L, IO_SIZE*2, INT_MAX32, 0, IO_SIZE, 0},
{"table_cache", 0, "Deprecated; use --table-open-cache instead.",
(uchar**) &table_cache_size, (uchar**) &table_cache_size, 0, GET_ULONG,
REQUIRED_ARG, TABLE_OPEN_CACHE_DEFAULT, 1, 512*1024L, 0, 1, 0},
@@ -7213,9 +7203,6 @@ mysqld_get_one_option(int optid,
case (int) OPT_ISAM_LOG:
opt_myisam_log=1;
break;
- case (int) OPT_UPDATE_LOG:
- opt_update_log=1;
- break;
case (int) OPT_BIN_LOG:
opt_bin_log= test(argument != disabled_my_option);
break;
@@ -7336,9 +7323,6 @@ mysqld_get_one_option(int optid,
"and will be removed in MySQL 7.0. This option has no effect "
"as the implied behavior is already the default.");
break;
- case (int) OPT_SKIP_LOCK:
- opt_external_locking=0;
- break;
case (int) OPT_SKIP_HOST_CACHE:
opt_specialflag|= SPECIAL_NO_HOST_CACHE;
break;
@@ -7351,9 +7335,6 @@ mysqld_get_one_option(int optid,
case (int) OPT_SKIP_STACK_TRACE:
test_flags|=TEST_NO_STACKTRACE;
break;
- case (int) OPT_SKIP_SYMLINKS:
- my_use_symdir=0;
- break;
case (int) OPT_BIND_ADDRESS:
{
struct addrinfo *res_lst, hints;
@@ -7386,12 +7367,6 @@ mysqld_get_one_option(int optid,
case OPT_SERVER_ID:
server_id_supplied = 1;
break;
- case OPT_DELAY_KEY_WRITE_ALL:
- if (argument != disabled_my_option)
- delay_key_write_options= DELAY_KEY_WRITE_ALL;
- else
- delay_key_write_options= DELAY_KEY_WRITE_NONE;
- break;
case OPT_ONE_THREAD:
thread_handling= SCHEDULER_ONE_THREAD_PER_CONNECTION;
break;
diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt
index a49aab0a9ab..1eb8ae9dd82 100644
--- a/sql/share/errmsg-utf8.txt
+++ b/sql/share/errmsg-utf8.txt
@@ -5018,10 +5018,8 @@ ER_UNKNOWN_STORAGE_ENGINE 42000
ger "Unbekannte Speicher-Engine '%s'"
por "Motor de tabela desconhecido '%s'"
spa "Desconocido motor de tabla '%s'"
-# When using this error code, use ER(ER_WARN_DEPRECATED_SYNTAX_WITH_VER)
-# for the message string. See, for example, code in mysql_priv.h.
ER_WARN_DEPRECATED_SYNTAX
- eng "'%s' is deprecated; use '%s' instead"
+ eng "'%s' is deprecated and will be removed in a future release. Please use %s instead"
ger "'%s' ist veraltet. Bitte benutzen Sie '%s'"
por "'%s' é desatualizado. Use '%s' em seu lugar"
spa "'%s' está desaprobado, use '%s' en su lugar"
diff --git a/sql/spatial.cc b/sql/spatial.cc
index 671b8544b8a..9a31b099e92 100644
--- a/sql/spatial.cc
+++ b/sql/spatial.cc
@@ -1612,9 +1612,8 @@ int Gis_multi_polygon::area(double *ar, const char **end_of_data) const
int Gis_multi_polygon::centroid(String *result) const
{
uint32 n_polygons;
- bool first_loop= 1;
Gis_polygon p;
- double UNINIT_VAR(res_area), UNINIT_VAR(res_cx), UNINIT_VAR(res_cy);
+ double res_area= 0.0, res_cx= 0.0, res_cy= 0.0;
double cur_area, cur_cx, cur_cy;
const char *data= m_data;
@@ -1631,20 +1630,13 @@ int Gis_multi_polygon::centroid(String *result) const
p.centroid_xy(&cur_cx, &cur_cy))
return 1;
- if (!first_loop)
- {
- double sum_area= res_area + cur_area;
- res_cx= (res_area * res_cx + cur_area * cur_cx) / sum_area;
- res_cy= (res_area * res_cy + cur_area * cur_cy) / sum_area;
- }
- else
- {
- first_loop= 0;
- res_area= cur_area;
- res_cx= cur_cx;
- res_cy= cur_cy;
- }
+ res_area+= cur_area;
+ res_cx+= cur_area * cur_cx;
+ res_cy+= cur_area * cur_cy;
}
+
+ res_cx/= res_area;
+ res_cy/= res_area;
return create_point(result, res_cx, res_cy);
}
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 34361ab3f99..6f41961a8fc 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -968,7 +968,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%token FOREIGN /* SQL-2003-R */
%token FOR_SYM /* SQL-2003-R */
%token FOUND_SYM /* SQL-2003-R */
-%token FRAC_SECOND_SYM
%token FROM
%token FULL /* SQL-2003-R */
%token FULLTEXT_SYM
@@ -1494,8 +1493,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%type <date_time_type> date_time_type;
%type <interval> interval
-%type <interval_time_st> interval_time_st
-
%type <interval_time_st> interval_time_stamp
%type <db_type> storage_engines known_storage_engines
@@ -9534,7 +9531,7 @@ using_list:
;
interval:
- interval_time_st {}
+ interval_time_stamp {}
| DAY_HOUR_SYM { $$=INTERVAL_DAY_HOUR; }
| DAY_MICROSECOND_SYM { $$=INTERVAL_DAY_MICROSECOND; }
| DAY_MINUTE_SYM { $$=INTERVAL_DAY_MINUTE; }
@@ -9549,27 +9546,6 @@ interval:
;
interval_time_stamp:
- interval_time_st {}
- | FRAC_SECOND_SYM
- {
- $$=INTERVAL_MICROSECOND;
- /*
- FRAC_SECOND was mistakenly implemented with
- a wrong resolution. According to the ODBC
- standard it should be nanoseconds, not
- microseconds. Changing it to nanoseconds
- in MySQL would mean making TIMESTAMPDIFF
- and TIMESTAMPADD to return DECIMAL, since
- the return value would be too big for BIGINT
- Hence we just deprecate the incorrect
- implementation without changing its
- resolution.
- */
- WARN_DEPRECATED(yythd, 6, 2, "FRAC_SECOND", "MICROSECOND");
- }
- ;
-
-interval_time_st:
DAY_SYM { $$=INTERVAL_DAY; }
| WEEK_SYM { $$=INTERVAL_WEEK; }
| HOUR_SYM { $$=INTERVAL_HOUR; }
@@ -12306,7 +12282,6 @@ keyword_sp:
| FILE_SYM {}
| FIRST_SYM {}
| FIXED_SYM {}
- | FRAC_SECOND_SYM {}
| GEOMETRY_SYM {}
| GEOMETRYCOLLECTION {}
| GET_FORMAT {}
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index 4575ca79049..ba970925fc6 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -2205,30 +2205,6 @@ static Sys_var_bit Sys_log_binlog(
DEFAULT(TRUE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(check_has_super),
ON_UPDATE(fix_sql_log_bin));
-static bool deprecated_log_update(sys_var *self, THD *thd, set_var *var)
-{
- /*
- The update log is not supported anymore since 5.0.
- See sql/mysqld.cc/, comments in function init_server_components() for an
- explaination of the different warnings we send below
- */
-
- if (opt_sql_bin_update)
- push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
- ER_UPDATE_LOG_DEPRECATED_TRANSLATED,
- ER(ER_UPDATE_LOG_DEPRECATED_TRANSLATED));
- else
- push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
- ER_UPDATE_LOG_DEPRECATED_IGNORED,
- ER(ER_UPDATE_LOG_DEPRECATED_IGNORED));
- return check_has_super(self, thd, var);
-}
-static Sys_var_bit Sys_log_update(
- "sql_log_update", "alias for sql_log_bin",
- SESSION_VAR(option_bits), NO_CMD_LINE, OPTION_BIN_LOG,
- DEFAULT(TRUE), NO_MUTEX_GUARD, NOT_IN_BINLOG,
- ON_CHECK(deprecated_log_update), ON_UPDATE(fix_sql_log_bin));
-
static Sys_var_bit Sys_sql_warnings(
"sql_warnings", "sql_warnings",
SESSION_VAR(option_bits), NO_CMD_LINE, OPTION_WARNINGS,