diff options
author | Sergei Golubchik <sergii@pisem.net> | 2012-03-28 01:04:46 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2012-03-28 01:04:46 +0200 |
commit | 20e706689df1eb87c696304797e9d6184c0a75bb (patch) | |
tree | ff3eab8fa3e060b34687c6e9819cb559ac67d5c5 /sql/ha_partition.cc | |
parent | 3d0775e9af2fcf3fe92b7f19e299ea23068eca1e (diff) | |
parent | bfaebe3f5e4b917c4498e234bad7a9d45d07ca62 (diff) | |
download | mariadb-git-20e706689df1eb87c696304797e9d6184c0a75bb.tar.gz |
mysql-5.5.22 merge
mysql-test/suite/innodb/t/group_commit_crash.test:
remove autoincrement to avoid rbr being used for insert ... select
mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test:
remove autoincrement to avoid rbr being used for insert ... select
mysys/my_addr_resolve.c:
a pointer to a buffer is returned to the caller -> the buffer cannot be on the stack
mysys/stacktrace.c:
my_vsnprintf() is ok here, in 5.5
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r-- | sql/ha_partition.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 36d5da94b11..955d8b0fc90 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -3670,14 +3670,14 @@ int ha_partition::truncate_partition(Alter_info *alter_info, bool *binlog_stmt) uint num_parts= m_part_info->num_parts; uint num_subparts= m_part_info->num_subparts; uint i= 0; - uint num_parts_set= alter_info->partition_names.elements; - uint num_parts_found= set_part_state(alter_info, m_part_info, - PART_ADMIN); DBUG_ENTER("ha_partition::truncate_partition"); /* Only binlog when it starts any call to the partitions handlers */ *binlog_stmt= false; + if (set_part_state(alter_info, m_part_info, PART_ADMIN)) + DBUG_RETURN(HA_ERR_NO_PARTITION_FOUND); + /* TRUNCATE also means resetting auto_increment. Hence, reset it so that it will be initialized again at the next use. @@ -3687,10 +3687,6 @@ int ha_partition::truncate_partition(Alter_info *alter_info, bool *binlog_stmt) table_share->ha_part_data->auto_inc_initialized= FALSE; unlock_auto_increment(); - if (num_parts_set != num_parts_found && - (!(alter_info->flags & ALTER_ALL_PARTITION))) - DBUG_RETURN(HA_ERR_NO_PARTITION_FOUND); - *binlog_stmt= true; do @@ -6099,7 +6095,7 @@ int ha_partition::extra(enum ha_extra_function operation) 0 Success DESCRIPTION - Called at end of each statement to reste buffers + Called at end of each statement to reset buffers */ int ha_partition::reset(void) |