← Back to team overview

maria-developers team mailing list archive

Re: review of mdev-5095 (executing triggers on slave)

 

Hi!

>>>>> "Oleksandr" == Oleksandr Byelkin <sanja@xxxxxxxxxxxxxxxx> writes:

<cut>

>> One last question:
>> 
>> Do you happen to know why we in select_create::prepare() call
table-> mark_columns_needed_for_insert();
>> but not
>> prepare_triggers_for_insert_stmt() ?
>> 
>> Does this mean:
>> 1) This is a bug, we should instead call prepare_triggers_for_insert_stmt().
>> 2) prepare_triggers_for_insert_stmt() is called later
>> (and thus table->mark_columns_needed_for_insert() is called twice).
>> 3) prepare_triggers_for_insert_stmt() is not needed in this case ???
>> 
>> My guess would be that we are calling mark_columns_needed_for_insert()
>> twice and we can delete one of the calls, probably in select_create::prepare(),
>> but I didn't have time to verify this.

Oleksandr> I hope that I have understand the question correctly.

Oleksandr> I checked mark_columns_needed_for_insert() it always called only once.

Oleksandr> SELECT ... CREATE has no trigger preparation because there is no way to 
Oleksandr> get triggers on the table we are creating in the same statement.

Ok.

I had forgot that MySQL changed how CREATE ... SELECT works.

Originally we did execute the SELECT even if the table existed but now
we ignore the whole statement if the table exists, so there can't be
any triggers.

Regards,
Monty


References