shlomi-noach / openarkkit

Automatically exported from code.google.com/p/openarkkit
24 stars 16 forks source link

patch to move BEFORE triggers for oak-online-alter-table #16

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
No ‘AFTER’ triggers are defined on the table (the utility creates its own 
triggers for the duration of the operation)

The description misled me that the tool moves other triggers except AFTER ones 
:)
I have tables with BEFORE triggers to alter, so I wrote a patch. I'll be very 
happy if you guys also think it useful and merge it.

Original issue reported on code.google.com by i%h2l.n...@gtempaccount.com on 4 Jul 2011 at 8:19

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks.
At which point in time do you intend for move_triggers() to be called?

Original comment by shlomi.n...@gmail.com on 4 Jul 2011 at 9:00

GoogleCodeExporter commented 9 years ago
after syncing data and before renaming tables.

Original comment by i%h2l.n...@gtempaccount.com on 4 Jul 2011 at 4:13

GoogleCodeExporter commented 9 years ago
I've had issues before with DROP TRIGGER and CREATE TRIGGER while locking 
tables, which is why I originally did not perform those operations.

Which version of MySQL have you tested with? If I recall correctly, the issues 
I had were with 5.0 and earlier versions of 5.1

Original comment by shlomi.n...@gmail.com on 4 Jul 2011 at 5:23

GoogleCodeExporter commented 9 years ago
I think you mean this:
http://bugs.mysql.com/bug.php?id=23713
I am out of my work env, but the version I am using should be 5.1.4x.

Original comment by i%h2l.n...@gtempaccount.com on 4 Jul 2011 at 5:41

GoogleCodeExporter commented 9 years ago
Actually I didn't mean that bug. I had cases where even if I locked tables 
myself, I could not create/remove trigger.

I'll give this further look.

Original comment by shlomi.n...@gmail.com on 5 Jul 2011 at 9:24