Commit 37844322 authored by Michael Widenius's avatar Michael Widenius

Give a warning, not an error, if the log file size in innodb doesn't match what is on disk

This helps when moving from MariaDB 5.5 to MariaDB 10.0 as sometimes the log file size is rounded differently.

storage/innobase/srv/srv0start.c:
  Give a warning, not an error, if the log file size in innodb doesn't match what is on disk
storage/xtradb/srv/srv0start.c:
  Give a warning, not an error, if the log file size in innodb doesn't match what is on disk
parent 12c760ef
......@@ -621,7 +621,7 @@ open_or_create_log_file(
|| size_high != srv_calc_high32(srv_log_file_size)) {
fprintf(stderr,
"InnoDB: Error: log file %s is"
"InnoDB: Warning: log file %s is"
" of different size %lu %lu bytes\n"
"InnoDB: than specified in the .cnf"
" file %lu %lu bytes!\n",
......@@ -629,7 +629,8 @@ open_or_create_log_file(
(ulong) srv_calc_high32(srv_log_file_size),
(ulong) srv_calc_low32(srv_log_file_size));
return(DB_ERROR);
srv_log_file_size= size +
(((longlong) size_high) << 32);
}
} else {
*log_file_created = TRUE;
......
......@@ -624,7 +624,7 @@ open_or_create_log_file(
|| size_high != srv_calc_high32(srv_log_file_size)) {
fprintf(stderr,
"InnoDB: Error: log file %s is"
"InnoDB: Warning: log file %s is"
" of different size %lu %lu bytes\n"
"InnoDB: than specified in the .cnf"
" file %lu %lu bytes!\n",
......@@ -632,7 +632,9 @@ open_or_create_log_file(
(ulong) srv_calc_high32(srv_log_file_size),
(ulong) srv_calc_low32(srv_log_file_size));
return(DB_ERROR);
srv_log_file_size= ((size +
(((longlong) size_high) << 32)) /
UNIV_PAGE_SIZE);
}
} else {
*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