Commit 7bdb8d12 authored by Marko Mäkelä's avatar Marko Mäkelä

Cleanup: Remove the error code DB_MUST_GET_MORE_FILE_SPACE

Ever since MDEV-24589, MDEV-18518 and other recent changes corrected the
rollback of CREATE and DROP operations, there is no need to crash the
server if we run out of space during a DROP operation. We can simply
let the transaction be rolled back.
parent 9eb4ad57
...@@ -453,7 +453,7 @@ restore: t1 .ibd and .cfg files ...@@ -453,7 +453,7 @@ restore: t1 .ibd and .cfg files
SET SESSION debug_dbug=@saved_debug_dbug; SET SESSION debug_dbug=@saved_debug_dbug;
SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure"; SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure";
ALTER TABLE t1 IMPORT TABLESPACE; ALTER TABLE t1 IMPORT TABLESPACE;
ERROR HY000: Got error 43 'Tablespace not found' from ./test/t1.ibd ERROR HY000: Got error 42 'Tablespace not found' from ./test/t1.ibd
SET SESSION debug_dbug=@saved_debug_dbug; SET SESSION debug_dbug=@saved_debug_dbug;
restore: t1 .ibd and .cfg files restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_check_bitmap_failure"; SET SESSION debug_dbug="+d,ib_import_check_bitmap_failure";
...@@ -922,7 +922,7 @@ ERROR HY000: Tablespace has been discarded for table `t1` ...@@ -922,7 +922,7 @@ ERROR HY000: Tablespace has been discarded for table `t1`
restore: t1 .ibd and .cfg files restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,dict_tf_to_fsp_flags_failure"; SET SESSION debug_dbug="+d,dict_tf_to_fsp_flags_failure";
ALTER TABLE t1 IMPORT TABLESPACE; ALTER TABLE t1 IMPORT TABLESPACE;
ERROR HY000: Got error 38 'Data structure corruption' from ./test/t1.ibd ERROR HY000: Got error 37 'Data structure corruption' from ./test/t1.ibd
SET SESSION debug_dbug=@saved_debug_dbug; SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE t1; DROP TABLE t1;
unlink: t1.ibd unlink: t1.ibd
......
...@@ -88,7 +88,7 @@ restore: t1 .ibd and .cfg files ...@@ -88,7 +88,7 @@ restore: t1 .ibd and .cfg files
SET SESSION debug_dbug=@saved_debug_dbug; SET SESSION debug_dbug=@saved_debug_dbug;
SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure"; SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure";
ALTER TABLE t1 IMPORT TABLESPACE; ALTER TABLE t1 IMPORT TABLESPACE;
ERROR HY000: Got error 43 'Tablespace not found' from ./test/t1.ibd ERROR HY000: Got error 42 'Tablespace not found' from ./test/t1.ibd
SET SESSION debug_dbug=@saved_debug_dbug; SET SESSION debug_dbug=@saved_debug_dbug;
restore: t1 .ibd and .cfg files restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_check_bitmap_failure"; SET SESSION debug_dbug="+d,ib_import_check_bitmap_failure";
...@@ -388,7 +388,7 @@ ERROR HY000: Tablespace has been discarded for table `t1` ...@@ -388,7 +388,7 @@ ERROR HY000: Tablespace has been discarded for table `t1`
restore: t1 .ibd and .cfg files restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,dict_tf_to_fsp_flags_failure"; SET SESSION debug_dbug="+d,dict_tf_to_fsp_flags_failure";
ALTER TABLE t1 IMPORT TABLESPACE; ALTER TABLE t1 IMPORT TABLESPACE;
ERROR HY000: Got error 38 'Data structure corruption' from ./test/t1.ibd ERROR HY000: Got error 37 'Data structure corruption' from ./test/t1.ibd
SET SESSION debug_dbug=@saved_debug_dbug; SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE t1; DROP TABLE t1;
unlink: t1.ibd unlink: t1.ibd
......
...@@ -1462,14 +1462,10 @@ dict_create_or_check_foreign_constraint_tables(void) ...@@ -1462,14 +1462,10 @@ dict_create_or_check_foreign_constraint_tables(void)
ut_ad(err == DB_OUT_OF_FILE_SPACE ut_ad(err == DB_OUT_OF_FILE_SPACE
|| err == DB_TOO_MANY_CONCURRENT_TRXS); || err == DB_TOO_MANY_CONCURRENT_TRXS);
trx->rollback(); trx->rollback();
} else {
if (err == DB_OUT_OF_FILE_SPACE) { trx_commit_for_mysql(trx);
err = DB_MUST_GET_MORE_FILE_SPACE;
}
} }
trx_commit_for_mysql(trx);
row_mysql_unlock_data_dictionary(trx); row_mysql_unlock_data_dictionary(trx);
trx->free(); trx->free();
...@@ -1552,14 +1548,10 @@ dict_create_or_check_sys_virtual() ...@@ -1552,14 +1548,10 @@ dict_create_or_check_sys_virtual()
ut_ad(err == DB_OUT_OF_FILE_SPACE ut_ad(err == DB_OUT_OF_FILE_SPACE
|| err == DB_TOO_MANY_CONCURRENT_TRXS); || err == DB_TOO_MANY_CONCURRENT_TRXS);
trx->rollback(); trx->rollback();
} else {
if (err == DB_OUT_OF_FILE_SPACE) { trx_commit_for_mysql(trx);
err = DB_MUST_GET_MORE_FILE_SPACE;
}
} }
trx_commit_for_mysql(trx);
row_mysql_unlock_data_dictionary(trx); row_mysql_unlock_data_dictionary(trx);
trx->free(); trx->free();
......
/***************************************************************************** /*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2015, 2018, MariaDB Corporation. Copyright (c) 2015, 2021, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software the terms of the GNU General Public License as published by the Free Software
...@@ -49,8 +49,6 @@ enum dberr_t { ...@@ -49,8 +49,6 @@ enum dberr_t {
rollback segment */ rollback segment */
DB_CLUSTER_NOT_FOUND = 30, DB_CLUSTER_NOT_FOUND = 30,
DB_TABLE_NOT_FOUND, DB_TABLE_NOT_FOUND,
DB_MUST_GET_MORE_FILE_SPACE, /*!< the database has to be stopped
and restarted with more file space */
DB_TOO_BIG_RECORD, /*!< a record in an index would not fit DB_TOO_BIG_RECORD, /*!< a record in an index would not fit
on a compressed page, or it would on a compressed page, or it would
become bigger than 1/2 free space in become bigger than 1/2 free space in
......
...@@ -760,12 +760,6 @@ row_mysql_handle_errors( ...@@ -760,12 +760,6 @@ row_mysql_handle_errors(
trx->rollback(); trx->rollback();
break; break;
case DB_MUST_GET_MORE_FILE_SPACE:
ib::fatal() << "The database cannot continue operation because"
" of lack of space. You must add a new data file"
" to my.cnf and restart the database.";
break;
case DB_CORRUPTION: case DB_CORRUPTION:
case DB_PAGE_CORRUPTED: case DB_PAGE_CORRUPTED:
ib::error() << "We detected index corruption in an InnoDB type" ib::error() << "We detected index corruption in an InnoDB type"
...@@ -3617,21 +3611,6 @@ row_drop_table_for_mysql( ...@@ -3617,21 +3611,6 @@ row_drop_table_for_mysql(
} }
break; break;
case DB_OUT_OF_FILE_SPACE:
err = DB_MUST_GET_MORE_FILE_SPACE;
trx->error_state = err;
row_mysql_handle_errors(&err, trx, NULL, NULL);
/* raise error */
ut_error;
break;
case DB_TOO_MANY_CONCURRENT_TRXS:
/* Cannot even find a free slot for the
the undo log. We can directly exit here
and return the DB_TOO_MANY_CONCURRENT_TRXS
error. */
default: default:
/* This is some error we do not expect. Print /* This is some error we do not expect. Print
the error number and rollback the transaction */ the error number and rollback the transaction */
......
...@@ -364,8 +364,6 @@ ut_strerr( ...@@ -364,8 +364,6 @@ ut_strerr(
return("Cluster not found"); return("Cluster not found");
case DB_TABLE_NOT_FOUND: case DB_TABLE_NOT_FOUND:
return("Table not found"); return("Table not found");
case DB_MUST_GET_MORE_FILE_SPACE:
return("More file space needed");
case DB_TOO_BIG_RECORD: case DB_TOO_BIG_RECORD:
return("Record too big"); return("Record too big");
case DB_TOO_BIG_INDEX_COL: case DB_TOO_BIG_INDEX_COL:
......
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