diff options
author | Michael Widenius <monty@askmonty.org> | 2013-10-13 23:20:57 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2013-10-13 23:20:57 +0300 |
commit | 3784432256a30e4d453dde10c875d8446519e7c1 (patch) | |
tree | f27037e51230ad96b2b289a68ea72aaa944e1bc8 | |
parent | 12c760ef71167a1ce6e1adaa084fb196b88e2e55 (diff) | |
download | mariadb-git-3784432256a30e4d453dde10c875d8446519e7c1.tar.gz |
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
-rw-r--r-- | storage/innobase/srv/srv0start.c | 5 | ||||
-rw-r--r-- | storage/xtradb/srv/srv0start.c | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c index 86669a50895..0cf3eb6c6b7 100644 --- a/storage/innobase/srv/srv0start.c +++ b/storage/innobase/srv/srv0start.c @@ -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; diff --git a/storage/xtradb/srv/srv0start.c b/storage/xtradb/srv/srv0start.c index 9e0477253cd..bafbd00e654 100644 --- a/storage/xtradb/srv/srv0start.c +++ b/storage/xtradb/srv/srv0start.c @@ -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; |