mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
row0mysql.c:
Allow CREATE TABLE and DROP TABLE even if innodb_force_recovery is used, the user can drop a problematic table innobase/row/row0mysql.c: Allow CREATE TABLE and DROP TABLE even if innodb_force_recovery is used, the user can drop a problematic table
This commit is contained in:
@@ -1186,7 +1186,12 @@ row_create_table_for_mysql(
|
|||||||
ut_ad(trx->mysql_thread_id == os_thread_get_curr_id());
|
ut_ad(trx->mysql_thread_id == os_thread_get_curr_id());
|
||||||
ut_ad(mutex_own(&(dict_sys->mutex)));
|
ut_ad(mutex_own(&(dict_sys->mutex)));
|
||||||
|
|
||||||
if (srv_created_new_raw || srv_force_recovery) {
|
/* We create table also if innodb_force_recovery is used. This
|
||||||
|
enables the user to stop a runaway rollback or a crash caused by
|
||||||
|
a temporary table #sql... He can use the trick explained in the
|
||||||
|
manual to rename the temporary table, and the drop it. */
|
||||||
|
|
||||||
|
if (srv_created_new_raw) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"InnoDB: A new raw disk partition was initialized or\n"
|
"InnoDB: A new raw disk partition was initialized or\n"
|
||||||
"InnoDB: innodb_force_recovery is on: we do not allow\n"
|
"InnoDB: innodb_force_recovery is on: we do not allow\n"
|
||||||
@@ -1705,7 +1710,13 @@ row_drop_table_for_mysql(
|
|||||||
ut_ad(trx->mysql_thread_id == os_thread_get_curr_id());
|
ut_ad(trx->mysql_thread_id == os_thread_get_curr_id());
|
||||||
ut_a(name != NULL);
|
ut_a(name != NULL);
|
||||||
|
|
||||||
if (srv_created_new_raw || srv_force_recovery) {
|
/* Note that we allow dropping of a table even if innodb_force_recovery
|
||||||
|
is used. If a rollback or purge would crash because of a corrupt
|
||||||
|
table, the user can try dropping it to avoid the crash. This is also
|
||||||
|
a nice way to stop a runaway rollback caused by a failing big
|
||||||
|
table import in a single transaction. */
|
||||||
|
|
||||||
|
if (srv_created_new_raw) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"InnoDB: A new raw disk partition was initialized or\n"
|
"InnoDB: A new raw disk partition was initialized or\n"
|
||||||
"InnoDB: innodb_force_recovery is on: we do not allow\n"
|
"InnoDB: innodb_force_recovery is on: we do not allow\n"
|
||||||
|
Reference in New Issue
Block a user