1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

merge of bug#58147, including rename of the new argument,

to_binlog -> binlog_stmt.
This commit is contained in:
Mattias Jonsson
2010-12-03 10:33:29 +01:00
5 changed files with 112 additions and 6 deletions

View File

@ -3428,7 +3428,7 @@ int ha_partition::truncate()
ALTER TABLE t TRUNCATE PARTITION ...
*/
int ha_partition::truncate_partition(Alter_info *alter_info)
int ha_partition::truncate_partition(Alter_info *alter_info, bool *binlog_stmt)
{
int error= 0;
List_iterator<partition_element> part_it(m_part_info->partitions);
@ -3440,6 +3440,9 @@ int ha_partition::truncate_partition(Alter_info *alter_info)
PART_ADMIN);
DBUG_ENTER("ha_partition::truncate_partition");
/* Only binlog when it starts any call to the partitions handlers */
*binlog_stmt= false;
/*
TRUNCATE also means resetting auto_increment. Hence, reset
it so that it will be initialized again at the next use.
@ -3453,6 +3456,8 @@ int ha_partition::truncate_partition(Alter_info *alter_info)
(!(alter_info->flags & ALTER_ALL_PARTITION)))
DBUG_RETURN(HA_ERR_NO_PARTITION_FOUND);
*binlog_stmt= true;
do
{
partition_element *part_elem= part_it++;