diff options
author | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2010-05-27 18:11:55 -0300 |
---|---|---|
committer | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2010-05-27 18:11:55 -0300 |
commit | 3cc56cb5ad789bca8fac743007947d718980e774 (patch) | |
tree | ca61ea93a3213ce7dd2696e368401f3002a4743f /sql/sql_truncate.cc | |
parent | 2d3e5019d451d5f6b88b3dfd549e88ba3e5dce92 (diff) | |
download | mariadb-git-3cc56cb5ad789bca8fac743007947d718980e774.tar.gz |
Bug#42643: InnoDB does not support replication of TRUNCATE TABLE
Post-merge fix: Pass the right parameter type to open_and_lock_tables.
Passing FALSE ensures that derived table handling is disabled, truncate
only operates on base tables.
Diffstat (limited to 'sql/sql_truncate.cc')
-rw-r--r-- | sql/sql_truncate.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_truncate.cc b/sql/sql_truncate.cc index 8fc04588aaa..901ab8e987d 100644 --- a/sql/sql_truncate.cc +++ b/sql/sql_truncate.cc @@ -351,7 +351,7 @@ static bool open_and_lock_table_for_truncate(THD *thd, TABLE_LIST *table_ref, the MDL lock taken above and otherwise there is no way to wait for FLUSH TABLES in deadlock-free fashion. */ - if (open_and_lock_tables(thd, table_ref, TL_WRITE, + if (open_and_lock_tables(thd, table_ref, FALSE, MYSQL_OPEN_IGNORE_FLUSH | MYSQL_OPEN_SKIP_TEMPORARY)) DBUG_RETURN(TRUE); @@ -406,7 +406,7 @@ bool mysql_truncate_table(THD *thd, TABLE_LIST *table_ref) table and delete all rows. In such a manner this can in fact open several tables if it's a temporary MyISAMMRG table. */ - if (open_and_lock_tables(thd, table_ref, TL_WRITE, + if (open_and_lock_tables(thd, table_ref, FALSE, MYSQL_OPEN_TEMPORARY_ONLY)) DBUG_RETURN(TRUE); |