diff options
-rwxr-xr-x | Build-tools/mysql-copyright-2 | 2 | ||||
-rw-r--r-- | client/mysql.cc | 2 | ||||
-rw-r--r-- | sql/handler.cc | 7 | ||||
-rw-r--r-- | sql/sql_parse.cc | 2 |
4 files changed, 7 insertions, 6 deletions
diff --git a/Build-tools/mysql-copyright-2 b/Build-tools/mysql-copyright-2 index 447a2d7c164..e946ed217d1 100755 --- a/Build-tools/mysql-copyright-2 +++ b/Build-tools/mysql-copyright-2 @@ -93,7 +93,7 @@ sub add_copyright { $start_copyright="/* "; $line_copyright= " "; - $end_copyright= " */"; + $end_copyright= "*/"; } elsif ($ARGV =~ /-x86\.s$/) { diff --git a/client/mysql.cc b/client/mysql.cc index cf80a5594e4..14fb1e1f917 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -2406,7 +2406,7 @@ com_shell(String *buffer, char *line __attribute__((unused))) char *shell_cmd; /* Skip space from line begin */ - while (isspace(*line)) + while (my_isspace(charset_info, *line)) line++; if (!(shell_cmd = strchr(line, ' '))) { diff --git a/sql/handler.cc b/sql/handler.cc index f8eca1b93ef..9acd55db0b1 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -103,15 +103,16 @@ TYPELIB tx_isolation_typelib= {array_elements(tx_isolation_names)-1,"", enum db_type ha_resolve_by_name(const char *name, uint namelen) { - if (!my_strcasecmp(&my_charset_latin1, name, "DEFAULT")) { - return(enum db_type) current_thd->variables.table_type; + THD *thd=current_thd; + if (thd && !my_strcasecmp(&my_charset_latin1, name, "DEFAULT")) { + return (enum db_type) thd->variables.table_type; } show_table_type_st *types; for (types= sys_table_types; types->type; types++) { if (!my_strcasecmp(&my_charset_latin1, name, types->type)) - return(enum db_type)types->db_type; + return (enum db_type) types->db_type; } return DB_TYPE_UNKNOWN; } diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index f2458068633..58b125b3ddc 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -4613,7 +4613,7 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables, mysql_bin_log.new_file(1); mysql_slow_log.new_file(1); #ifdef HAVE_REPLICATION - if (expire_logs_days) + if (mysql_bin_log.is_open() && expire_logs_days) { long purge_time= time(0) - expire_logs_days*24*60*60; if (purge_time >= 0) |