diff options
author | Nirbhay Choubey <nirbhay@skysql.com> | 2014-08-06 14:06:11 -0400 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@skysql.com> | 2014-08-06 14:06:11 -0400 |
commit | ec91eea8dbae4276ff6e31a0d80c0b523f88ed88 (patch) | |
tree | 8d1b9adecf56764c4198a42c3df6dbb1096ce49a /sql/log.cc | |
parent | e4e55f7968d961e0cb07800397bc3108f960956a (diff) | |
parent | c722e5f25f1f00b32f9b4b556f07489bda38095a (diff) | |
download | mariadb-git-ec91eea8dbae4276ff6e31a0d80c0b523f88ed88.tar.gz |
Local merge of mariadb-5.5.39
bzr merge -r4264 maria/5.5
Text conflict in sql/mysqld.cc
Text conflict in storage/xtradb/btr/btr0cur.c
Text conflict in storage/xtradb/buf/buf0buf.c
Text conflict in storage/xtradb/buf/buf0lru.c
Text conflict in storage/xtradb/handler/ha_innodb.cc
5 conflicts encountered.
Diffstat (limited to 'sql/log.cc')
-rw-r--r-- | sql/log.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/log.cc b/sql/log.cc index a09651ffe0f..b70a48ff508 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -2346,7 +2346,7 @@ static int find_uniq_filename(char *name) file_info= dir_info->dir_entry; for (i= dir_info->number_off_files ; i-- ; file_info++) { - if (memcmp(file_info->name, start, length) == 0 && + if (strncmp(file_info->name, start, length) == 0 && test_if_number(file_info->name+length, &number,0)) { set_if_bigger(max_found,(ulong) number); @@ -2625,9 +2625,10 @@ int MYSQL_LOG::generate_new_name(char *new_name, const char *log_name) { if (find_uniq_filename(new_name)) { - my_printf_error(ER_NO_UNIQUE_LOGFILE, ER(ER_NO_UNIQUE_LOGFILE), - MYF(ME_FATALERROR), log_name); - sql_print_error(ER(ER_NO_UNIQUE_LOGFILE), log_name); + if (current_thd) + my_printf_error(ER_NO_UNIQUE_LOGFILE, ER(ER_NO_UNIQUE_LOGFILE), + MYF(ME_FATALERROR), log_name); + sql_print_error(ER_DEFAULT(ER_NO_UNIQUE_LOGFILE), log_name); return 1; } } |