Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed and reviewed
    • Affects versions: 1.3
    • Fix versions: 1.3
    • Components: Backend Software
    • Labels:
      None
    • Severity:
      Incorrectly Functioning With Workaround
    • Steps to reproduce:
      Hide
      Steps to reproduce:
      1. Create a new MySQL database on Centos 5.5 using the latest mysql5.sql

       Actual Results:

      mysql> source ../mysql5.sql
      Query OK, 12 rows affected (0.00 sec)

      Query OK, 1 row affected (0.00 sec)

      Database changed
      Query OK, 0 rows affected (0.00 sec)

      Query OK, 0 rows affected (0.00 sec)

      ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes
      ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes

      Query OK, 0 rows affected (0.00 sec)

      Query OK, 0 rows affected (0.00 sec)

      Query OK, 0 rows affected (0.00 sec)

      Query OK, 0 rows affected (0.00 sec)

      ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes
      Query OK, 0 rows affected (0.01 sec)

      Query OK, 0 rows affected (0.00 sec)

       
       
       Expected Results:

      Tables which have a PRIMARY KEY of multiple columns where UTF8 is used and the column is VARCHAR(255) generated this error. UTF-8 is computed at 3 or 4 bytes per character causing the 1000 character limit to be exceeded.
       
       
       Workaround (if any):

      You can reduce to VARCHAR(128) which will get rid of the error, but this maybe is not the correct solution. Example:

      CREATE TABLE capture_agent_state (
      organization VARCHAR(128) NOT NULL,
      id VARCHAR(128) NOT NULL,
      configuration TEXT(65535),
      state TEXT(65535) NOT NULL,
      last_heard_from BIGINT NOT NULL,
      url TEXT(65535),
      PRIMARY KEY (
      organization,
      id)
      );

      Not sure what the correct fix is. Using Latin1 will reduce character size encoding, but I don't think that is the right move.
       





      Show
      Steps to reproduce: 1. Create a new MySQL database on Centos 5.5 using the latest mysql5.sql  Actual Results: mysql> source ../mysql5.sql Query OK, 12 rows affected (0.00 sec) Query OK, 1 row affected (0.00 sec) Database changed Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec)      Expected Results: Tables which have a PRIMARY KEY of multiple columns where UTF8 is used and the column is VARCHAR(255) generated this error. UTF-8 is computed at 3 or 4 bytes per character causing the 1000 character limit to be exceeded.      Workaround (if any): You can reduce to VARCHAR(128) which will get rid of the error, but this maybe is not the correct solution. Example: CREATE TABLE capture_agent_state ( organization VARCHAR(128) NOT NULL, id VARCHAR(128) NOT NULL, configuration TEXT(65535), state TEXT(65535) NOT NULL, last_heard_from BIGINT NOT NULL, url TEXT(65535), PRIMARY KEY ( organization, id) ); Not sure what the correct fix is. Using Latin1 will reduce character size encoding, but I don't think that is the right move.  
    • Tags (folksonomy):

      TestRail: Results

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                greg_logan Greg Logan
                Reporter:
                hankm Hank Magnuski
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  TestRail: Cases