MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Ingo Strüwing Date:January 31 2008 10:07am
Subject:Re: bk commit into 4.1 tree (acurtis:1.2705) BUG#21413
View as plain text  
Hi Antony,

Ok to push from me with minor changes.

antony@stripped, 30.01.2008 22:04:
...
> ChangeSet@stripped, 2008-01-30 13:04:04-08:00, acurtis@stripped +1 -0
>   Bug#21413
>     "Engine table handler used by multiple threads in REPLACE DELAYED"
>     add code to avoid surplus calls to handler's extra() method in case of DELAYED.
>     Avoid calling storage engine from a different thread than expected.

Please add a short description of the problem. While the synopsis might
be enough for a server developer, repeating the same in other words
often helps to make things clearer. (And it is a requirement from our
policies.)

The last sentence confuses me. You did not implement anything to "avoid
calling storage engine from a different thread than expected". Or does
this sentence explain on a "higher" level what the other sentence says?
Please make it clearer. I learned that we do not want novels in the
changeset comment, but we surely have the space to use some full
sentences in real English.

...
> diff -Nrup a/sql/sql_insert.cc b/sql/sql_insert.cc
> --- a/sql/sql_insert.cc	2007-01-15 01:58:02 -08:00
> +++ b/sql/sql_insert.cc	2008-01-30 13:03:58 -08:00
> @@ -315,7 +315,8 @@ int mysql_insert(THD *thd,TABLE_LIST *ta
>    error=0;
>    id=0;
>    thd->proc_info="update";
> -  if (duplic != DUP_ERROR || ignore)
> +  if ((duplic != DUP_ERROR || ignore) &&
> +      (lock_type != TL_WRITE_DELAYED))
>      table->file->extra(HA_EXTRA_IGNORE_DUP_KEY);
>    /*
>      let's *try* to start bulk inserts. It won't necessary

After this comment another "if (lock_type != TL_WRITE_DELAYED)" follows.
I propose to move it up to include both statements (extra() +
start_bulk_insert()).

...
> @@ -930,9 +933,10 @@ static TABLE *delayed_get_table(THD *thd
>  	my_error(ER_OUT_OF_RESOURCES,MYF(0));
>  	goto err1;
>        }
> -      tmp->table_list= *table_list;			// Needed to open table
>        tmp->table_list.db= tmp->thd.db;
> +      tmp->table_list.db_length= table_list->db_length;
>        tmp->table_list.alias= tmp->table_list.real_name=tmp->thd.query;
> +      tmp->table_list.real_name_length= table_list->real_name_length;

This is probably correct. But are you indeed sure that the delayed
thread does not require any other elements from table_list?

...

Regards
Ingo
-- 
Ingo Strüwing, Senior Software Developer
MySQL GmbH, Dachauer Str. 37, D-80335 München
Geschäftsführer: Kaj Arnö - HRB München 162140
Thread
bk commit into 4.1 tree (acurtis:1.2705) BUG#21413antony30 Jan
  • Re: bk commit into 4.1 tree (acurtis:1.2705) BUG#21413Ingo Strüwing31 Jan