Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-66048

Executing the Data Partitioning control SQL file causes errors

    Details

    • Fix Priority:
      5

      Description

      See 62xDump&Output.zip for files used in the steps below.

      Steps to reproduce:

      1. Start Portal 6.2 CE GA6
      2. Create 2 virtual instances (www.able.com, www.baker.com)
      3. Add a page with a blog entry in the main instance and the 2 virtual instances
      4. Stop this instance and dump the database to a sql file
      5. Use the partitioning tool to create control, delete, and paritioned sql files for each instance (expect 9 sql files in total)
        • java -classpath "mysql.jar;com.liferay.portal.tools.data.partitioning.sql.builder-1.0.0.jar;com.liferay.portal.tools.data.partitioning.sql.builder.mysql-1.0.0.jar" com.liferay.portal.tools.data.partitioning.sql.builder.Main --properties-file portal-upgrade-database.properties --schema-name lportal --company-ids 20155,20533,20844 --output-dir ./output/
      6. Create a clean database to execute the control and partition sql files corresponding to the www.able.com instance against
        • create database NewSchemaForAble character set utf8;
      7. Execute the control and partition sql files against NewSchemaForAble

      Result: Executing the sql files corresponding to www.able.com against NewSchemaForAble cause errors.

      L:\partition\output>mysql NewSchemaForAble < lportal-20533-control.sql
      ERROR 1146 (42S02) at line 1: Table 'test.browsertracker' doesn't exist
      
      L:\partition\output>mysql NewSchemaForAble < lportal-20533-partitioned.sql
      ERROR 1146 (42S02) at line 1: Table 'test.account_' doesn't exist
      

      Workaround:

      1. Instead of executing the control and partition files, copy the original database (should contain all 3 instances)
      2. Run the delete sql commands against this copy
        • mysql NewSchemaForAble < lportal-20155-delete.sql
          mysql NewSchemaForAble < lportal-20844-delete.sql
      3. Start up portal on 6.2
      4. Assert that www.able.com is the only instance
      5. Assert that page with blog entry exists

      Reproduced on:
      Tomcat 7.0.62 + MySQL 5.6.26
      Portal 6.2 CE GA6
      Portal Master Git Hash (ID used to create sql.builder jars): ade88b6847a5a0f9a097e7b6e14543ba0b1ffff1

        Attachments

          Activity

            People

            Assignee:
            albert.lee Albert Lee
            Reporter:
            albert.lee Albert Lee
            Participants of an Issue:
            Recent user:
            Esther Sanz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              4 years, 34 weeks, 5 days ago

                Packages

                Version Package
                7.0.1 CE GA2