Skip to content

Commit

Permalink
Removed some old #if MYSQL_VERSION
Browse files Browse the repository at this point in the history
- Removed never used warning that explicit_defaults_for_timestamp was
  not set
  • Loading branch information
montywi committed Apr 26, 2018
1 parent 2ccd671 commit cd48c1e
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 34 deletions.
6 changes: 0 additions & 6 deletions sql/item_timefunc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3232,13 +3232,7 @@ void Item_func_str_to_date::fix_length_and_dec()
if (agg_arg_charsets(collation, args, 2, MY_COLL_ALLOW_CONV, 1))
return;
if (collation.collation->mbminlen > 1)
{
#if MYSQL_VERSION_ID > 50500
internal_charset= &my_charset_utf8mb4_general_ci;
#else
internal_charset= &my_charset_utf8_general_ci;
#endif
}

maybe_null= true;
set_handler(&type_handler_datetime2);
Expand Down
11 changes: 0 additions & 11 deletions sql/mysqld.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9680,17 +9680,6 @@ static int get_options(int *argc_ptr, char ***argv_ptr)
global_system_variables.max_allowed_packet);
}

#if MYSQL_VERSION_ID > 101001
/*
TIMESTAMP columns get implicit DEFAULT values when
--explicit_defaults_for_timestamp is not set.
*/
if (!opt_help && !opt_explicit_defaults_for_timestamp)
sql_print_warning("TIMESTAMP with implicit DEFAULT value is deprecated. "
"Please use --explicit_defaults_for_timestamp server "
"option (see documentation for more details).");
#endif

if (log_error_file_ptr != disabled_my_option)
opt_error_log= 1;
else
Expand Down
6 changes: 0 additions & 6 deletions sql/sql_show.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1076,13 +1076,7 @@ find_files(THD *thd, Dynamic_array<LEX_CSTRING*> *files, LEX_CSTRING *db,
if (ha_discover_table_names(thd, db, dirp, &tl, false))
goto err;
}
#if MYSQL_VERSION_ID < 100300
/* incomplete optimization, but a less drastic change in GA version */
if (!thd->lex->select_lex.order_list.elements &&
!thd->lex->select_lex.group_list.elements)
#else
if (is_show_command(thd))
#endif
tl.sort();
#ifndef DBUG_OFF
else
Expand Down
11 changes: 0 additions & 11 deletions sql/table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3770,17 +3770,6 @@ void append_unescaped(String *res, const char *pos, size_t length)

for (; pos != end ; pos++)
{
#if defined(USE_MB) && MYSQL_VERSION_ID < 40100
uint mblen;
if (use_mb(default_charset_info) &&
(mblen= my_ismbchar(default_charset_info, pos, end)))
{
res->append(pos, mblen);
pos+= mblen;
continue;
}
#endif

switch (*pos) {
case 0: /* Must be escaped for 'mysql' */
res->append('\\');
Expand Down

0 comments on commit cd48c1e

Please sign in to comment.