summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-01-05 16:03:58 +0200
committerMichael Widenius <monty@askmonty.org>2011-01-05 16:03:58 +0200
commit215043b7c2ace7ce05dcf6c685c87a293ccf1cd7 (patch)
tree679d57ddbf9713b7129872db144ff408b0215b31 /sql/sql_table.cc
parent31a78529bc5c4431865eba06762e6cc66359f759 (diff)
parent6b03fbf9fcacc74cb2999ba7715d22d754f356c7 (diff)
downloadmariadb-git-215043b7c2ace7ce05dcf6c685c87a293ccf1cd7.tar.gz
Merge with 5.1
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index a9ed2a79df4..fcf78b4c5fb 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -7228,6 +7228,16 @@ view_err:
/* Non-primary unique key. */
needed_online_flags|= HA_ONLINE_ADD_UNIQUE_INDEX;
needed_fast_flags|= HA_ONLINE_ADD_UNIQUE_INDEX_NO_WRITES;
+ if (ignore)
+ {
+ /*
+ If ignore is used, we have to remove all duplicate rows,
+ which require a full table copy.
+ */
+ need_copy_table= ALTER_TABLE_DATA_CHANGED;
+ pk_changed= 2; // Don't change need_copy_table
+ break;
+ }
}
}
else