Thank you most important thing I learned today.
Re:Migrating Facebook to MySQL 8.0
by zaphirplane on Saturday July 24, 2021 @12:30AM
(#27938407)
What is an example where the order of execution is required, not contrived or bad practise. Looking for a good use case
Easiest I can imagine is a user-facing id that gets incremented by trigger (e.g. select max(col)+1 — autoincrement/serial doesn’t guarantee contiguity, or even reasonable increments…).
And then any second trigger that relies on that value
Re:Migrating Facebook to MySQL 8.0
by paulddraper on Saturday July 24, 2021 @11:24AM
(#27941701)
Oh, I think it's probably bad practice to knowingly depend on that.
But I also think that it's unnecessarily problematic to make the order non-deterministic.
Additionally, modifying a trigger by drop/creating it would change behavior, unless you also drop/create every trigger (in the original order)