[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15270153#comment-15270153
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9340:
--------------------------------------------

Github user koushik-das commented on the pull request:

    https://github.com/apache/cloudstack/pull/1466#issuecomment-216751340
  
    I am getting this error during deploy DB "Specified key was too long; max 
key length is 767 bytes". I have provided another inline comment in the code 
which is failing. Mysql version is 5.6.12.
    
    ========> Processing upgrade: com.cloud.upgrade.DatabaseUpgradeChecker
    [WARNING] 
    java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
        at java.lang.Thread.run(Thread.java:724)
    Caused by: com.cloud.utils.exception.CloudRuntimeException: Unable to 
upgrade the database
        at 
com.cloud.upgrade.DatabaseUpgradeChecker.upgrade(DatabaseUpgradeChecker.java:394)
        at 
com.cloud.upgrade.DatabaseUpgradeChecker.check(DatabaseUpgradeChecker.java:490)
        at com.cloud.upgrade.DatabaseCreator.main(DatabaseCreator.java:217)
        ... 6 more
    Caused by: com.cloud.utils.exception.CloudRuntimeException: Unable to 
execute upgrade script: 
/Users/koushik/code/cloudstack-apache/cloudstack/developer/target/db/db/schema-481to490.sql
        at 
com.cloud.upgrade.DatabaseUpgradeChecker.runScript(DatabaseUpgradeChecker.java:306)
        at 
com.cloud.upgrade.DatabaseUpgradeChecker.upgrade(DatabaseUpgradeChecker.java:363)
        ... 8 more
    Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 
Specified key was too long; max key length is 767 bytes
        at com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:185)
        at com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:87)
        at 
com.cloud.upgrade.DatabaseUpgradeChecker.runScript(DatabaseUpgradeChecker.java:297)
        ... 9 more
    [INFO] 
------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] 
------------------------------------------------------------------------
    [INFO] Total time: 40.361 s
    [INFO] Finished at: 2016-05-04T11:07:42+05:30
    [INFO] Final Memory: 70M/263M
    [INFO] 
------------------------------------------------------------------------
    [ERROR] Failed to execute goal 
org.codehaus.mojo:exec-maven-plugin:1.2.1:java (create-schema) on project 
cloud-developer: An exception occured while executing the Java class. null: 
InvocationTargetException: Unable to upgrade the database: Unable to execute 
upgrade script: 
/Users/koushik/code/cloudstack-apache/cloudstack/developer/target/db/db/schema-481to490.sql:
 Specified key was too long; max key length is 767 bytes -> [Help 1]
    [ERROR] 
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR] 
    [ERROR] For more information about the errors and possible solutions, 
please read the following articles:
    [ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException


> General DB Optimization
> -----------------------
>
>                 Key: CLOUDSTACK-9340
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9340
>             Project: CloudStack
>          Issue Type: Improvement
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>    Affects Versions: 4.9.0
>            Reporter: Nicolas Vazquez
>              Labels: database
>             Fix For: 4.9.0
>
>
> h2. General DB Optimization
> In some production environments there were being experimented delays in most 
> of the jobs. A search for DB optimization was taken and some deficiencies 
> were discovered, we can group them in 4 groups:
> * Incorrect PRIMARY key
> * Duplicate PRIMARY KEY
> * Missing indexes (Add indexes to avoid full table scans)
> * Some views query (Change view to improve account retrieval speed)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to