List:Commits« Previous MessageNext Message »
From:Davi Arnaut Date:May 25 2011 10:28am
Subject:Re: bzr commit into mysql-next-mr-wl5569 branch (andrei.elkin:3280)
WL#5569 WL#5754
View as plain text  
On 5/25/11 4:36 AM, Andrei Elkin wrote:
>
> +static int32 incr_slave_open_temp_tables(THD *thd, int inc)

incr_slave_open_temp_tables -> inc_slave_open_temp_tables

Drop return value, it's not used.

> +{
> +  int32 ret;
> +
> +  if (thd->system_thread == SYSTEM_THREAD_SLAVE_WORKER)
> +  {
> +    my_atomic_rwlock_wrlock(&slave_open_temp_tables_lock);
> +    ret= my_atomic_add32(&slave_open_temp_tables, inc);
> +    my_atomic_rwlock_wrlock(&slave_open_temp_tables_unlock);
> +    ret += inc;
> +  }
> +  else
> +    ret= (slave_open_temp_tables += inc);
> +
> +  return ret;
> +}
>
>   /**
>      Total number of TABLE instances for tables in the table definition cache
> @@ -2133,7 +2149,7 @@ void close_temporary_table(THD *thd, TAB
>     {
>       /* natural invariant of temporary_tables */
>       DBUG_ASSERT(slave_open_temp_tables || !thd->temporary_tables);
> -    slave_open_temp_tables--;
> +    incr_slave_open_temp_tables(thd, -1);
>     }
>     close_temporary(table, free_share, delete_table);
>     DBUG_VOID_RETURN;
> @@ -5858,7 +5874,7 @@ TABLE *open_table_uncached(THD *thd, con
>       thd->temporary_tables= tmp_table;
>       thd->temporary_tables->prev= 0;
>       if (thd->slave_thread)
> -      slave_open_temp_tables++;
> +      incr_slave_open_temp_tables(thd, 1);
>     }
>     tmp_table->pos_in_table_list= 0;
>     DBUG_PRINT("tmptable", ("opened table: '%s'.'%s' 0x%lx",
> tmp_table->s->db.str,

Thread
bzr commit into mysql-next-mr-wl5569 branch (andrei.elkin:3280) WL#5569WL#5754Andrei Elkin25 May
  • Re: bzr commit into mysql-next-mr-wl5569 branch (andrei.elkin:3280)WL#5569 WL#5754Davi Arnaut25 May