List:Commits« Previous MessageNext Message »
From:Sergei Golubchik Date:September 27 2007 3:28pm
Subject:Re: bk commit into 5.1 tree (svoj:1.2569) BUG#30583
View as plain text  
Hi!

On Sep 13, Sergey Vojtovich wrote:
> ChangeSet@stripped, 2007-09-13 18:33:40+05:00, svoj@stripped +3 -0
>   BUG#30583 - Partition on DOUBLE key + INNODB + count(*) == crash
>   
>   Issuing SELECT COUNT(*) against partitioned InnoDB table may cause
>   server crash.
>   
>   Fixed that not all required fields were included into read_set.
> 
> diff -Nrup a/sql/ha_partition.cc b/sql/ha_partition.cc
> --- a/sql/ha_partition.cc	2007-08-02 09:50:52 +05:00
> +++ b/sql/ha_partition.cc	2007-09-13 18:33:37 +05:00
> @@ -3324,6 +3324,22 @@ int ha_partition::index_init(uint inx, b
>    */
>    if (m_lock_type == F_WRLCK)
>      bitmap_union(table->read_set, &m_part_info->full_part_field_set);
> +  else if (sorted && m_table_flags & HA_PARTIAL_COLUMN_READ)
> +  {
> +    /*
> +      An ordered scan is requested and necessary fields aren't in read_set.
> +      This may happen e.g. with SELECT COUNT(*) FROM t1. We must ensure
> +      that all fields of current key are included into read_set, as
> +      partitioning requires them for sorting
> +      (see ha_partition::handle_ordered_index_scan).
> +
> +      TODO: handle COUNT(*) queries via unordered scan.
> +    */

This comment is much better!
ok to push

Regards / Mit vielen Grüssen,
Sergei

-- 
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <serg@stripped>
 / /|_/ / // /\ \/ /_/ / /__  Principal Software Developer
/_/  /_/\_, /___/\___\_\___/  MySQL GmbH, Dachauer Str. 37, D-80335 München
       <___/                  Geschäftsführer: Kaj Arnö - HRB
München 162140
Thread
bk commit into 5.1 tree (svoj:1.2569) BUG#30583Sergey Vojtovich13 Sep
  • Re: bk commit into 5.1 tree (svoj:1.2569) BUG#30583Sergei Golubchik27 Sep