summaryrefslogtreecommitdiff
path: root/innobase/row
diff options
context:
space:
mode:
authorunknown <marko@hundin.mysql.fi>2005-01-28 12:18:33 +0200
committerunknown <marko@hundin.mysql.fi>2005-01-28 12:18:33 +0200
commit264f83f07612d34c53d3d4e7478d441989997bab (patch)
treeee6668b6383795ee433d0de358fdf584cafde011 /innobase/row
parent9aad0ae359881bbe39431714f30e49bbed29aa97 (diff)
downloadmariadb-git-264f83f07612d34c53d3d4e7478d441989997bab.tar.gz
InnoDB: Allow concurrent TRUNCATE and INSERT on a table. (Bug #8144)
innobase/include/rem0rec.ic: Improve formatting of comments innobase/include/trx0trx.h: dict_operation: document the effect of setting the flag innobase/row/row0mysql.c: Do not set the dict_operation flag. (Bug #8144) Allow MySQL to have open handles to the table being truncated. sql/ha_innodb.cc: store_lock(): Do not weaken TL_WRITE locks taken by TRUNCATE TABLE.
Diffstat (limited to 'innobase/row')
-rw-r--r--innobase/row/row0mysql.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c
index 6aaa0cbcf1b..2c4eebedaf7 100644
--- a/innobase/row/row0mysql.c
+++ b/innobase/row/row0mysql.c
@@ -2561,17 +2561,6 @@ do not allow the TRUNCATE. We also reserve the data dictionary latch. */
goto funct_exit;
}
- if (table->n_mysql_handles_opened > 1) {
- ut_print_timestamp(stderr);
-fputs(" InnoDB: Warning: MySQL is trying to truncate table ", stderr);
- ut_print_name(stderr, trx, table->name);
- fputs("\n"
-"InnoDB: though there are still open handles to it.\n", stderr);
- err = DB_ERROR;
-
- goto funct_exit;
- }
-
/* TODO: could we replace the counter n_foreign_key_checks_running
with lock checks on the table? Acquire here an exclusive lock on the
table, and rewrite lock0lock.c and the lock wait in srv0srv.c so that
@@ -2594,7 +2583,6 @@ fputs(" InnoDB: Warning: MySQL is trying to truncate table ", stderr);
lock_reset_all_on_table(table);
- trx->dict_operation = TRUE;
trx->table_id = table->id;
/* scan SYS_INDEXES for all indexes of the table */