• Resolved dxylott54

    (@dxylott54)


    I’m Japanese.
    I don’t speak English, so I use translation software.
    I’m sorry if I’m using strange language.

    I have updated “EWWW Image Optimizer” to 6.2.4.
    After that, when I opened the “Slimstat Analytics” Plugin, the message “EWWW Image Optimizer needs to upgrade the image log table. [Upgrade]” was displayed at the top.
    After pressing the Upgrade button, the message disappeared.

    I have never seen such a message in my life.
    A search on Google did not yield any information on this message.
    What is the reason why this message is displayed?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author nosilver4u

    (@nosilver4u)

    Hopefully you can translate this back to Japanese, and yes this is the first manual table upgrade we have ever needed for EWWW Image Optimizer.

    Simple version:
    The wp_ewwwio_images table is used by the plugin to keep track of the results of image compression. One of the columns in that table needed to be modified to make the data more accurate. Normally we prefer to do such things automatically so you don’t have to bother about them, but in this case, a manual upgrade was needed to avoid crashing the database server.

    Full details:
    The ‘updated’ column was previously set to a default of 1970-01-01 00:00:00 (the beginning of “Unix time”). When that default was chosen, I was unaware that MySQL would account for timezone differences automatically, so that when we provided a time in UTC, MySQL would assume that the time provided was in the local timezone. If your server was not using UTC, this would skew the “last optimized” time displayed under Tools->Show Optimized Images. The fix was to set the column default to “CURRENT_TIMESTAMP()”.
    There is a very quick query to set the default, but due to a bug in MySQL 5.7 and MariaDB 10.1 (and older), a slower query is required for those versions. If said query is run automatically on a busy & large site, the slow query could be run multiple times and make the database unreachable until it catches up (or crashes).
    A manual upgrade ensures the query is only ever run once, and database crashing is avoided ??

    Thread Starter dxylott54

    (@dxylott54)

    Thank you for your answer.
    I was able to translate it properly.
    I was relieved to know the reason. ??

    Thank you for publishing a great plugin!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘EWWW Image Optimizer needs to upgrade the image log table. [Upgrade]’ is closed to new replies.