Eric Hodel (drbrain) wrote,
Eric Hodel

MySQL Sucks

Here's some lovely gems from the MySQL reference manual:

From 15.5 InnoDB Startup Options:

InnoDB uses checksum validation on all pages read from the disk to ensure extra fault tolerance against broken hardware or data files. However, under some rare circumstances (such as when running benchmarks) this ``extra safety'' feature is unneeded. In such cases, this option (which is enabled by default) can be turned off with --skip-innodb-checksums. This option was added in MySQL 5.0.3.

Disabling a feature you should be using in a production environment to look better on benchmarks is cheating.

From 5.9.4 The Binary Log:

The primary purpose of the binary log is to be able to update the database during a restore operation as fully as possible, because the binary log contains all updates done after a backup was made.

... so without the binary log enabled, you can't guarantee the integrity of your database, great! (Note the bin log is required for replication, but seems to be disabled by default.)

But then you keep reading:

By default, the binary log is not synchronized to disk at each write. So if the operating system or machine (not only the MySQL server) crashes there is a chance that the last statements of the binary log are lost. To prevent this, you can make the binary log be synchronized to disk after every Nth binary log write, with the sync_binlog global variable (1 being the safest value, but also the slowest).

... so unless you have binary logging enabled and you sync on every write, your data's integrity is not guaranteed. No, that's wrong too:

Even with [sync_binlog] set to 1, there is still the chance of an inconsistency between the tables content and the binary log content in case of crash. [...] This problem can be solved with the --innodb-safe-binlog option (available starting from MySQL 4.1.3), which adds consistency between the content of InnoDB tables and the binary log. For this option to really bring safety to you, the MySQL server should also be configured to synchronize to disk, at every transaction, the binary log (sync_binlog=1) and (which is true by default) the InnoDB logs.

To get data integrity, you have to set 3 options in the configuration file to get data consistency. How lame!

  • (no subject)

    I dreamed I was in a grocery store with my mom reading Seattle Weekly from sometime late at night until 11AM. The Seattle Weekly had an article about…

  • Free Microwave! (and stuff)

    I have a convection oven microwave (this means you could bake a cake in a metal pan in it) I'd like to get rid of. If you or anyone you know would…

  • Tools!

    Today I used several of my tools. My new Collector Vehicle plate arrived, so I retired the 948-MPC plates to my closet and attached the new plate.…

  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.