Fess up. You know it was you.

  • Clent@lemmy.world
    link
    fedilink
    arrow-up
    19
    ·
    9 months ago

    UPDATE ON articles SET status = 0 WHERE body LIKE ‘%…%’

    On master production server, running myisam, against a text column, millions of rows.

    This causes queries to stack because table locks

    Rather than waiting for the query to finish. a slave was promoted to master.

    Lesson: don’t trust mysqladmin to not do something bad.

    • EmasXP@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      9 months ago

      Table locks can be a real pain. You know you need to do the change, but the system is constantly running queries towards it. Now days it’s a bit easier with algorithm=inplace and lock=none, but in the good old days you were on your own. Your only friend was luck. Large migrations like that still gives me shivers