Commit 1adf9e79 authored by Jan Lindström's avatar Jan Lindström

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.
parent 75137522
...@@ -625,16 +625,25 @@ open_or_create_log_file( ...@@ -625,16 +625,25 @@ open_or_create_log_file(
|| size_high != srv_calc_high32(srv_log_file_size)) { || size_high != srv_calc_high32(srv_log_file_size)) {
/* By default 5.6 based InnoDB will create 48M log /* By default 5.6 based InnoDB will create 48M log
file but 5.5 only 5M. Actual size error must be file but 5.5 only 5M. Thus give hint to user. */
tested later. */ 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, fprintf(stderr,
"InnoDB: Warning: log file %s is" "InnoDB: Possible causes for this error:\n"
" of different size %lu %lu bytes\n" " (a) Incorrect log file is used or log file size is changed\n"
"InnoDB: than specified in the .cnf" " (b) In case default size is used this log file is from 10.0\n"
" file %lu %lu bytes!\n", " (c) Log file is corrupted or there was not enough disk space\n"
name, (ulong) size_high, (ulong) size, " In case (b) you need to set innodb_log_file_size = 48M\n");
(ulong) srv_calc_high32(srv_log_file_size),
(ulong) srv_calc_low32(srv_log_file_size)); return(DB_ERROR);
} }
} else { } else {
*log_file_created = TRUE; *log_file_created = TRUE;
......
...@@ -619,16 +619,24 @@ open_or_create_log_file( ...@@ -619,16 +619,24 @@ open_or_create_log_file(
|| size_high != srv_calc_high32(srv_log_file_size)) { || size_high != srv_calc_high32(srv_log_file_size)) {
/* By default 5.6 based InnoDB will create 48M log /* By default 5.6 based InnoDB will create 48M log
file but 5.5 only 5M. Actual size error must be file but 5.5 only 5M. Thus give hint to user. */
tested later. */ 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, fprintf(stderr,
"InnoDB: Warning: log file %s is" "InnoDB: Possible causes for this error:\n"
" of different size %lu %lu bytes\n" " (a) Incorrect log file is used or log file size is changed\n"
"InnoDB: than specified in the .cnf" " (b) In case default size is used this log file is from 10.0\n"
" file %lu %lu bytes!\n", " (c) Log file is corrupted or there was not enough disk space\n"
name, (ulong) size_high, (ulong) size, " In case (b) you need to set innodb_log_file_size = 48M\n");
(ulong) srv_calc_high32(srv_log_file_size),
(ulong) srv_calc_low32(srv_log_file_size)); return(DB_ERROR);
} }
} else { } else {
*log_file_created = TRUE; *log_file_created = TRUE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment