* Kristofer Pettersson <kpettersson@stripped> [08/09/10 15:55]:
> if (thr_upgrade_write_delay_lock(*thd.lock->locks))
> {
> - /* This can only happen if thread is killed by shutdown */
> -
> sql_print_error(ER(ER_DELAYED_CANT_CHANGE_LOCK),table->s->table_name.str);
> + /*
> + This can happen if thread is killed either by a shutdown
> + or if another thread is removing the current table definition
> + from the table cache.
> + */
> +
> + my_error(ER_DELAYED_CANT_CHANGE_LOCK,MYF(ME_FATALERROR),
> + table->s->table_name.str);
> goto err;
> }
OK.
> /* This should never happen */
> sql_print_error(ER(ER_DELAYED_CANT_CHANGE_LOCK),
> table->s->table_name.str);
> + DBUG_ASSERT(0);
Wrong alignment, but overall let's not take chances and push a
message here as well.
I looked at the code, and the comment doesn't seem to be right.
This comment is there since 3.23. I think it would be more fair to
say "No one has seen this happen so far".
--