summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorJan Lindström <jplindst@mariadb.org>2014-05-22 16:20:56 +0300
committerJan Lindström <jplindst@mariadb.org>2014-05-22 16:20:56 +0300
commit1adf9e7984f053d095bb005601941582323a6998 (patch)
tree2b602a4df7e3f9b6fb573c5d52d92da101011f45 /storage
parent75137522b904b611021288f59e51ad0f9c81c255 (diff)
downloadmariadb-git-1adf9e7984f053d095bb005601941582323a6998.tar.gz
MDEV-6257: MariaDB 5.5 fails to start with 10.0 InnoDB log files
Analysis: Can't disable the error message because you may get database started with incorrect log file size. Fix: Thus only improve the error message to give more information to users.
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/srv/srv0start.c27
-rw-r--r--storage/xtradb/srv/srv0start.c26
2 files changed, 35 insertions, 18 deletions
diff --git a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c
index 49705712d41..ffe18c47e18 100644
--- a/storage/innobase/srv/srv0start.c
+++ b/storage/innobase/srv/srv0start.c
@@ -625,16 +625,25 @@ open_or_create_log_file(
|| size_high != srv_calc_high32(srv_log_file_size)) {
/* By default 5.6 based InnoDB will create 48M log
- file but 5.5 only 5M. Actual size error must be
- tested later. */
+ file but 5.5 only 5M. Thus give hint to user. */
+ fprintf(stderr,
+ "InnoDB: Error: log file %s is"
+ " of different size %lu %lu bytes\n"
+ "InnoDB: than specified in the .cnf"
+ " file %lu %lu bytes!\n",
+ name, (ulong) size_high, (ulong) size,
+ (ulong) srv_calc_high32(srv_log_file_size),
+ (ulong) srv_calc_low32(srv_log_file_size));
+
fprintf(stderr,
- "InnoDB: Warning: log file %s is"
- " of different size %lu %lu bytes\n"
- "InnoDB: than specified in the .cnf"
- " file %lu %lu bytes!\n",
- name, (ulong) size_high, (ulong) size,
- (ulong) srv_calc_high32(srv_log_file_size),
- (ulong) srv_calc_low32(srv_log_file_size));
+ "InnoDB: Possible causes for this error:\n"
+ " (a) Incorrect log file is used or log file size is changed\n"
+ " (b) In case default size is used this log file is from 10.0\n"
+ " (c) Log file is corrupted or there was not enough disk space\n"
+ " In case (b) you need to set innodb_log_file_size = 48M\n");
+
+ return(DB_ERROR);
+
}
} else {
*log_file_created = TRUE;
diff --git a/storage/xtradb/srv/srv0start.c b/storage/xtradb/srv/srv0start.c
index d07fc6db1b3..223a48e5471 100644
--- a/storage/xtradb/srv/srv0start.c
+++ b/storage/xtradb/srv/srv0start.c
@@ -619,16 +619,24 @@ open_or_create_log_file(
|| size_high != srv_calc_high32(srv_log_file_size)) {
/* By default 5.6 based InnoDB will create 48M log
- file but 5.5 only 5M. Actual size error must be
- tested later. */
+ file but 5.5 only 5M. Thus give hint to user. */
+ fprintf(stderr,
+ "InnoDB: Error: log file %s is"
+ " of different size %lu %lu bytes\n"
+ "InnoDB: than specified in the .cnf"
+ " file %lu %lu bytes!\n",
+ name, (ulong) size_high, (ulong) size,
+ (ulong) srv_calc_high32(srv_log_file_size),
+ (ulong) srv_calc_low32(srv_log_file_size));
+
fprintf(stderr,
- "InnoDB: Warning: log file %s is"
- " of different size %lu %lu bytes\n"
- "InnoDB: than specified in the .cnf"
- " file %lu %lu bytes!\n",
- name, (ulong) size_high, (ulong) size,
- (ulong) srv_calc_high32(srv_log_file_size),
- (ulong) srv_calc_low32(srv_log_file_size));
+ "InnoDB: Possible causes for this error:\n"
+ " (a) Incorrect log file is used or log file size is changed\n"
+ " (b) In case default size is used this log file is from 10.0\n"
+ " (c) Log file is corrupted or there was not enough disk space\n"
+ " In case (b) you need to set innodb_log_file_size = 48M\n");
+
+ return(DB_ERROR);
}
} else {
*log_file_created = TRUE;