Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-19040

Add a migration to convert MySQL/MariaDB table from COMPACT to DYNAMIC

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      The default in MySQL < 5.7 used to be COMPACT, unfortunately COMPACT rows kept the old 767 limit for keys.

      Here is an helper to do that manually prior to upgrade XWiki if the resize migration fail:

      DATABASE=some_db
      
      ROW_FORMAT=DYNAMIC
      #ROW_FORMAT=COMPRESSED
      
      TABLES=$(echo SHOW TABLES | mysql -s $DATABASE)
      
      for TABLE in $TABLES ; do
          echo "ALTER TABLE $TABLE ROW_FORMAT=$ROW_FORMAT;"
          echo "ALTER TABLE $TABLE ROW_FORMAT=$ROW_FORMAT" | mysql $DATABASE
      done
      

      Attachments

        Activity

          People

            tmortagne Thomas Mortagne
            tmortagne Thomas Mortagne
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: