List:Commits« Previous MessageNext Message »
From:Sergei Golubchik Date:July 3 2007 8:47am
Subject:Re: bk commit into 5.1 tree (ramil:1.2522) BUG#29353
View as plain text  
Hi!

On Jul 03, Ramil Kalimullin wrote:
> 
> Thanks for the review.
> Could you please look at the proposed changes bellow?

Two comments:
 
> ===== storage/csv/ha_tina.cc 1.79 vs edited =====
> --- 1.79/storage/csv/ha_tina.cc 2007-07-03 13:14:39 +05:00
> +++ edited/storage/csv/ha_tina.cc       2007-07-03 12:56:31 +05:00
> @@ -45,8 +45,6 @@ TODO:
>  #pragma implementation        // gcc: Class implementation
>  #endif
> 
> -#define MYSQL_SERVER 1
> -
>  #include "mysql_priv.h"
>  #include <mysql/plugin.h>
>  #include "ha_tina.h"
> @@ -587,6 +585,7 @@ int ha_tina::chain_append()
>  */
>  int ha_tina::find_current_row(uchar *buf)
>  {
> +  THD *thd= ha_thd();
>    off_t end_offset, curr_offset= current_position;
>    int eoln_len;
>    my_bitmap_map *org_bitmap;
> @@ -679,6 +678,7 @@ int ha_tina::find_current_row(uchar *buf
>          goto err;
>      }
>    }
> +  thd_inc_row_count(thd);

This looks wrong. You'll interfere with the thd->row_count counter that
is used for INSERT, UPDATE, LOAD, etc.

You only can do it in repair and check.

>    next_position= end_offset + eoln_len;
>    error= 0;
> 
> @@ -1014,7 +1014,7 @@ int ha_tina::rnd_init(bool scan)
>    stats.records= 0;
>    records_is_known= 0;
>    chain_ptr= chain;
> -  thd->count_cuted_fields= CHECK_FIELD_WARN;    // To find wrong values
> +  thd_field_check_level(thd, CHECK_FIELD_WARN); // To find wrong values

You know, I'm thinking now that you were right and 

   field->store(..., CHECK_FIELD_WARN)

is a better approach. Same reason as above - side effects. If it's set
once, it'll affect not only field->store() call in ha_tina.cc, but also,
possibly, many unrelated places in the server, and we don't want it, do
we ?

Regards / Mit vielen Grüssen,
Sergei

-- 
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <serg@stripped>
 / /|_/ / // /\ \/ /_/ / /__  Principal Software Developer
/_/  /_/\_, /___/\___\_\___/  MySQL GmbH, Radlkoferstr. 2, D-81373 München
       <___/                  Geschäftsführer: Kaj Arnö - HRB
München 162140
Thread
bk commit into 5.1 tree (ramil:1.2522) BUG#29353ramil27 Jun
  • Re: bk commit into 5.1 tree (ramil:1.2522) BUG#29353Sergei Golubchik2 Jul
    • Re: bk commit into 5.1 tree (ramil:1.2522) BUG#29353Ramil Kalimullin3 Jul
      • Re: bk commit into 5.1 tree (ramil:1.2522) BUG#29353Sergei Golubchik3 Jul