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

Fix ServiceBuilder MySQL 5.6 indexes generation compatibility issue

    Details

    • Branch Version/s:
      6.2.x
    • Backported to Branch:
      Committed
    • Story Points:
      1

      Description

      Steps to Reproduce - 6.2
      1- Configure Liferay to connect to MySQL 5.6
      2- Start the bundle and watch the console log entries:

      02 Mar 2017 12:37:36,101 INFO [localhost-startStop-1][BaseDB:74] Adding indexes
      02 Mar 2017 12:37:36,105 INFO [localhost-startStop-1][BaseDB:97] create index IX_7020130F on SCProductVersion (directDownloadURL);
      02 Mar 2017 12:37:36,109 WARN [localhost-startStop-1][BaseDB:105] Specified key was too long; max key length is 3072 bytes: create index IX_7020130F on SCProductVersion (directDownloadURL);
      02 Mar 2017 12:37:36,111 INFO [localhost-startStop-1][BaseDB:97] create index IX_89509087 on User_ (companyId, openId);
      02 Mar 2017 12:37:36,115 WARN [localhost-startStop-1][BaseDB:105] Specified key was too long; max key length is 3072 bytes: create index IX_89509087 on User_ (companyId, openId);
      

      Information

      • Make ServiceBuilder to keep the String type columns' length info inside the generated generic indexes sql file, in order to provide context info to BaseDB and all its sub-classes to do proper index length restriction.
      • Turn on mysql String type column index length restriction, set length to 255 according to MySQL 5.6's doc http://dev.mysql.com/doc/refman/5.6/en/innodb-restrictions.html
      • New property:
            #
            # Set the max length for string type of index.
            #
            database.string.index.max.length[mysql]=255
        

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              hong.zhao Hong Zhao (Inactive)
              Reporter:
              shuyang.zhou Shuyang Zhou
              Participants of an Issue:
              Recent user:
              Tibor Lipusz
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 50 weeks ago

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.0 Alpha 1