• Resolved SimonGiddings

    (@simongiddings)


    MySql version – 5.5.30
    MySql client version – 5.0.45
    PHP version – 5.2.5
    OS : Windows XP

    I am developing a shop site using WooCommerce.
    During its initialisation, WooCommerce adds extra tables to the database.
    Here is an example of the table name causing problems :
    prefix_woocommerce_downloadable_product_permissions
    It has 51 characters.
    When the plugin generates the temporary table name, it gives this :
    1444147631184_prefix_woocommerce_downloadable_product_permissions
    It has 65 characters.
    The temporary table creation fails as the name exceeds the 64 character limit.

    Note that the log entry is misleading, here are two lines for information :
    [Tuesday 6th October 2015 : 06:10:49pm] Creating table prefix_woocommerce_downloadable_product_permissions has been failed.
    [Tuesday 6th October 2015 : 06:10:51pm] Table 1444147631184_prefix_woocommerce_downloadable_product_permissions has been created, BUT inserting rows failed. This happens sometimes when a table had been updated during staging process. Exclude this table from copying and try again. Offset: 0

    This is not a major problem for me as the table is empty, but it blocks the staging process.

    https://wordpress.org/plugins/wp-staging/

Viewing 1 replies (of 1 total)
  • Plugin Author Rene Hermenau

    (@renehermi)

    This is a very good catch! I try to catch the max. table name length limit so that the error notice will be more clear in the future

    In the meantime, please use a short staging name to prevent this e.g. dev than the name converts to: dev_prefix_woocommerce_downloadable_product_permissions which iws withing that character limit.

Viewing 1 replies (of 1 total)

The topic ‘Error when creating temporary table’ is closed to new replies.