Skip to content

Commit cd48c1e

Browse files
committed
Removed some old #if MYSQL_VERSION
- Removed never used warning that explicit_defaults_for_timestamp was not set
1 parent 2ccd671 commit cd48c1e

File tree

4 files changed

+0
-34
lines changed

4 files changed

+0
-34
lines changed

sql/item_timefunc.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3232,13 +3232,7 @@ void Item_func_str_to_date::fix_length_and_dec()
32323232
if (agg_arg_charsets(collation, args, 2, MY_COLL_ALLOW_CONV, 1))
32333233
return;
32343234
if (collation.collation->mbminlen > 1)
3235-
{
3236-
#if MYSQL_VERSION_ID > 50500
32373235
internal_charset= &my_charset_utf8mb4_general_ci;
3238-
#else
3239-
internal_charset= &my_charset_utf8_general_ci;
3240-
#endif
3241-
}
32423236

32433237
maybe_null= true;
32443238
set_handler(&type_handler_datetime2);

sql/mysqld.cc

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9680,17 +9680,6 @@ static int get_options(int *argc_ptr, char ***argv_ptr)
96809680
global_system_variables.max_allowed_packet);
96819681
}
96829682

9683-
#if MYSQL_VERSION_ID > 101001
9684-
/*
9685-
TIMESTAMP columns get implicit DEFAULT values when
9686-
--explicit_defaults_for_timestamp is not set.
9687-
*/
9688-
if (!opt_help && !opt_explicit_defaults_for_timestamp)
9689-
sql_print_warning("TIMESTAMP with implicit DEFAULT value is deprecated. "
9690-
"Please use --explicit_defaults_for_timestamp server "
9691-
"option (see documentation for more details).");
9692-
#endif
9693-
96949683
if (log_error_file_ptr != disabled_my_option)
96959684
opt_error_log= 1;
96969685
else

sql/sql_show.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,13 +1076,7 @@ find_files(THD *thd, Dynamic_array<LEX_CSTRING*> *files, LEX_CSTRING *db,
10761076
if (ha_discover_table_names(thd, db, dirp, &tl, false))
10771077
goto err;
10781078
}
1079-
#if MYSQL_VERSION_ID < 100300
1080-
/* incomplete optimization, but a less drastic change in GA version */
1081-
if (!thd->lex->select_lex.order_list.elements &&
1082-
!thd->lex->select_lex.group_list.elements)
1083-
#else
10841079
if (is_show_command(thd))
1085-
#endif
10861080
tl.sort();
10871081
#ifndef DBUG_OFF
10881082
else

sql/table.cc

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3770,17 +3770,6 @@ void append_unescaped(String *res, const char *pos, size_t length)
37703770

37713771
for (; pos != end ; pos++)
37723772
{
3773-
#if defined(USE_MB) && MYSQL_VERSION_ID < 40100
3774-
uint mblen;
3775-
if (use_mb(default_charset_info) &&
3776-
(mblen= my_ismbchar(default_charset_info, pos, end)))
3777-
{
3778-
res->append(pos, mblen);
3779-
pos+= mblen;
3780-
continue;
3781-
}
3782-
#endif
3783-
37843773
switch (*pos) {
37853774
case 0:/* Must be escaped for 'mysql' */
37863775
res->append('\\');

0 commit comments

Comments
 (0)