2013-02-11 1 views
3

Windows 시스템에 Sonar 3.4.1 및 Mysql 5.6.10을 설치했습니다.Windows에서 Sonar 및 MySQL 5.6을 사용하여 스키마 설정이 실패합니다.

"sonar"라는 mysql 스키마를 만들고 "sonar"사용자에게 모든 권한을 부여했습니다. 이 사용자를 사용하기 위해 sonar를 구성했습니다. 나는 the codehaus sonar page에 관한 지침에 따라 이것을했다.

소나를 시작할 때 스키마에 테이블을 만들기 시작합니다. 어떤 시점에서 "지정된 키가 너무 길어서 최대 키 길이가 767 바이트"라는 오류가 발생합니다 (끝에는 전체 오류 메시지가 표시됨).

this question에 따르면 인덱스 길이는 mysql에서 제한됩니다. 이것이 문서화 되었기 때문에 Sonar가 한계보다 긴 인덱스를 생성하지 않을 것으로 기대합니다. 분명히 그렇게하려고합니다.

중요한 구성을 놓치거나 sonar와 mysql의 두 버전이 호환되지 않습니까? 이 버전에서 작동하도록하려면 어떻게해야합니까?

전체 오류 메시지 : 네 말이 맞아

 
INFO | jvm 1 | 2013/02/11 11:28:25 | 
INFO | jvm 1 | 2013/02/11 11:28:25 | == CreateProperties: migrating =============================================== 
INFO | jvm 1 | 2013/02/11 11:28:25 | -- create_table("properties") 
INFO | jvm 1 | 2013/02/11 11:28:25 | -> 0.0320s 
INFO | jvm 1 | 2013/02/11 11:28:25 | -> 0 rows 
INFO | jvm 1 | 2013/02/11 11:28:25 | -- add_index(:properties, :prop_key, {:name=>"properties_key"}) 
2013.02.11 11:28:25 ERROR jruby.rack unable to create shared application instance 
org.jruby.rack.RackInitializationException: An error has occurred, all later migrations canceled: 

ActiveRecord::JDBCError: Specified key was too long; max key length is 767 bytes: CREATE INDEX `properties_key` ON `properties` (`prop_key`) 
    from D:/Programs/sonar-3.4.1/war/sonar-server/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/jdbc/adapter.rb:183:in `execute' 
[stacktrace omitted] 
org.jruby.exceptions.RaiseException: (StandardError) An error has occurred, all later migrations canceled: 

ActiveRecord::JDBCError: Specified key was too long; max key length is 767 bytes: CREATE INDEX `properties_key` ON `properties` (`prop_key`) 
2013.02.11 11:28:25 ERROR jruby.rack Error: application initialization failed 
org.jruby.rack.RackInitializationException: An error has occurred, all later migrations canceled: 

ActiveRecord::JDBCError: Specified key was too long; max key length is 767 bytes: CREATE INDEX `properties_key` ON `properties` (`prop_key`) 
    from D:/Programs/sonar-3.4.1/war/sonar-server/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/jdbc/adapter.rb:183:in `execute' 
[stacktrace omitted] 
org.jruby.exceptions.RaiseException: (StandardError) An error has occurred, all later migrations canceled: 

ActiveRecord::JDBCError: Specified key was too long; max key length is 767 bytes: CREATE INDEX `properties_key` ON `properties` (`prop_key`) 
INFO | jvm 1 | 2013/02/11 11:28:25 | 2013-02-11 11:28:25.421:INFO::Started [email protected]:9000 
+0

MySQL 5.5.30으로 테스트를 거쳤습니다. SONAR docs에 따르면 모든 MySQL 5.x가 지원됩니다. 나는 [JIRA Issue] (http://jira.codehaus.org/browse/SONAR-4137)를 만들었으며이 질문을 업데이트 할 것입니다. –

답변

2

은, 일부 인덱스는 최대 한계보다 큰 길이 만들어집니다. 문제는 MySQL 5.6이 자동으로 인덱스를 자르지 않는다는 것입니다. 이 동작은 예상대로되지 않습니다 (http://dev.mysql.com/doc/refman/5.6/en/innodb-restrictions.htmlhttp://bugs.mysql.com/bug.php?id=68453 버그 참조).

소나 3.5는 정확한 길이의 색인을 생성하여이 문제를 해결합니다 (http://jira.codehaus.org/browse/SONAR-4137 참조).

+0

흥미 롭다면, MySQL 버그가 "Not a Bug"이벤트로 닫혔지만, 문서가 명시 적으로 언급하고 있지만, 고유하지 않은 인덱스는 잘 렸습니다. 답변에 추가하면 해당 음파 탐지기 3.4.1 및 mysql 5.6은 호환되지 않아 함께 실행되지 않고 답변을 수락 할 수 있습니다. –

관련 문제