summaryrefslogtreecommitdiff
path: root/sql/ha_innodb.cc
diff options
context:
space:
mode:
authorunknown <marko@hundin.mysql.fi>2005-03-01 16:09:22 +0200
committerunknown <marko@hundin.mysql.fi>2005-03-01 16:09:22 +0200
commit22e0b300a47321ec8dfef0bb8bc5f7c0f1449ce1 (patch)
tree8ec58b239525ce62926f52413f6429569464bb82 /sql/ha_innodb.cc
parent8873e5cc1c975208ae91990682c7ce3250857904 (diff)
downloadmariadb-git-22e0b300a47321ec8dfef0bb8bc5f7c0f1449ce1.tar.gz
InnoDB: Commit inserts to the temporary tables created by
CREATE INDEX and DROP INDEX every 10,000 rows, similar to ALTER TABLE. sql/ha_innodb.cc: Commit inserts to the temporary tables created by CREATE INDEX and DROP INDEX every 10,000 rows, similar to ALTER TABLE. sql/ha_innodb.h: Remove duplicate declaration of srv_max_purge_lag.
Diffstat (limited to 'sql/ha_innodb.cc')
-rw-r--r--sql/ha_innodb.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index 4f32bb08e9a..0fbac13be28 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -2316,7 +2316,9 @@ ha_innobase::write_row(
if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_INSERT)
table->timestamp_field->set_time();
- if (user_thd->lex->sql_command == SQLCOM_ALTER_TABLE
+ if ((user_thd->lex->sql_command == SQLCOM_ALTER_TABLE
+ || user_thd->lex->sql_command == SQLCOM_CREATE_INDEX
+ || user_thd->lex->sql_command == SQLCOM_DROP_INDEX)
&& num_write_row >= 10000) {
/* ALTER TABLE is COMMITted at every 10000 copied rows.
The IX table lock for the original table has to be re-issued.