summaryrefslogtreecommitdiff
path: root/libmysqld/CMakeLists.txt
diff options
context:
space:
mode:
authorDavi Arnaut <Davi.Arnaut@Sun.COM>2010-05-25 17:01:38 -0300
committerDavi Arnaut <Davi.Arnaut@Sun.COM>2010-05-25 17:01:38 -0300
commit3c279d9a5a45d734c7cdd2b641520e199e342f95 (patch)
treefead1c9e257aedfb5c08da6db9ed7997e8af9fcf /libmysqld/CMakeLists.txt
parenta3c080be7ac95ce7f6f384a07f9ff0b31fd33a0f (diff)
downloadmariadb-git-3c279d9a5a45d734c7cdd2b641520e199e342f95.tar.gz
Bug#42643: InnoDB does not support replication of TRUNCATE TABLE
The problem was that TRUNCATE TABLE didn't take a exclusive lock on a table if it resorted to truncating via delete of all rows in the table. Specifically for InnoDB tables, this could break proper isolation as InnoDB ends up aborting some granted locks when truncating a table. The solution is to take a exclusive metadata lock before TRUNCATE TABLE can proceed. This guarantees that no other transaction is using the table. Incompatible change: Truncate via delete no longer fails if sql_safe_updates is activated (this was a undocumented side effect).
Diffstat (limited to 'libmysqld/CMakeLists.txt')
-rw-r--r--libmysqld/CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt
index fa5088f288b..1cdf8e41a74 100644
--- a/libmysqld/CMakeLists.txt
+++ b/libmysqld/CMakeLists.txt
@@ -63,7 +63,8 @@ SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
../sql/sql_class.cc ../sql/sql_crypt.cc ../sql/sql_cursor.cc
../sql/sql_db.cc ../sql/sql_delete.cc ../sql/sql_derived.cc
../sql/sql_do.cc ../sql/sql_error.cc ../sql/sql_handler.cc
- ../sql/sql_help.cc ../sql/sql_insert.cc
+ ../sql/sql_help.cc ../sql/sql_insert.cc ../sql/datadict.cc
+ ../sql/sql_truncate.cc
../sql/sql_lex.cc ../sql/keycaches.cc
../sql/sql_list.cc ../sql/sql_load.cc ../sql/sql_locale.cc
../sql/sql_binlog.cc ../sql/sql_manager.cc ../sql/sql_map.cc