diff options
author | unknown <heikki@hundin.mysql.fi> | 2004-12-29 17:06:26 +0200 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2004-12-29 17:06:26 +0200 |
commit | 49501611aa534efcd18d3ee3bf94ec1ba13aa6f2 (patch) | |
tree | 6fc18051681f82527defbb12245528642794574e /innobase/srv/srv0start.c | |
parent | a77d4ce2725a0d8e2310b3d7e1c3aed7908ea143 (diff) | |
download | mariadb-git-49501611aa534efcd18d3ee3bf94ec1ba13aa6f2.tar.gz |
srv0start.c:
Print a more descriptive error and refuse to start InnoDB if the size of ibdata files is smaller than what is stored in the tablespace header; innodb_force_recovery will override this
innobase/srv/srv0start.c:
Print a more descriptive error and refuse to start InnoDB if the size of ibdata files is smaller than what is stored in the tablespace header; innodb_force_recovery will override this
Diffstat (limited to 'innobase/srv/srv0start.c')
-rw-r--r-- | innobase/srv/srv0start.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/innobase/srv/srv0start.c b/innobase/srv/srv0start.c index c91db1f0dcc..7a61a885ef9 100644 --- a/innobase/srv/srv0start.c +++ b/innobase/srv/srv0start.c @@ -1528,6 +1528,21 @@ NetWare. */ "InnoDB: the sum of data file sizes is %lu pages\n", (ulong) tablespace_size_in_header, (ulong) sum_of_data_file_sizes); + + if (srv_force_recovery == 0 + && sum_of_data_file_sizes < tablespace_size_in_header) { + /* This is a fatal error, the tail of a tablespace is + missing */ + + fprintf(stderr, +"InnoDB: Cannot start InnoDB. The tail of the system tablespace is\n" +"InnoDB: missing. Have you edited innodb_data_file_path in my.cnf in an\n" +"InnoDB: inappropriate way, removing ibdata files from there?\n" +"InnoDB: You can set innodb_force_recovery=1 in my.cnf to force\n" +"InnoDB: a startup if you are trying to recover a badly corrupt database.\n"); + + return(DB_ERROR); + } } if (srv_auto_extend_last_data_file @@ -1538,6 +1553,18 @@ NetWare. */ "InnoDB: the sum of data file sizes is only %lu pages\n", (ulong) tablespace_size_in_header, (ulong) sum_of_data_file_sizes); + + if (srv_force_recovery == 0) { + + fprintf(stderr, +"InnoDB: Cannot start InnoDB. The tail of the system tablespace is\n" +"InnoDB: missing. Have you edited innodb_data_file_path in my.cnf in an\n" +"InnoDB: inappropriate way, removing ibdata files from there?\n" +"InnoDB: You can set innodb_force_recovery=1 in my.cnf to force\n" +"InnoDB: a startup if you are trying to recover a badly corrupt database.\n"); + + return(DB_ERROR); + } } /* Check that os_fast_mutexes work as expected */ |