Opened 14 years ago
Last modified 14 years ago
#9138 closed defect
mysql database upgrade problem — at Version 7
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | high | Milestone: | 0.12 |
Component: | database backend | Version: | 0.12dev |
Severity: | blocker | Keywords: | mysq, upgrade, database verify |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description (last modified by )
than i trying to upgrade trac mysql database from 0.12svn to newer 0.12svn i have problem, it looks like mysql database design problem, but i have very limited mysql knowledge to fix it by myself, than i trying to run upgrade i see this:
trac-admin . upgrade OperationalError: (1071, 'Specified key was too long; max key length is 1000 bytes')
Change History (7)
comment:1 by , 14 years ago
comment:3 by , 14 years ago
Keywords: | needinfo added |
---|---|
Milestone: | next-minor-0.12.x |
Please show us the whole traceback, which maybe will contain more information. If you don't have it and the log doesn't contain it, then enable SQL statement tracing using the TracIni [trac] debug_sql = true
setting.
Make sure you have the proper database requirements, notably concerning character sets, as explained in MySqlDb.
comment:4 by , 14 years ago
2010-03-20 02:56:08,778 Trac[console] ERROR: Exception in trac-admin command: Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/trac/admin/console.py", line 107, in onecmd rv = cmd.Cmd.onecmd(self, line) or 0 File "/usr/lib/python2.6/cmd.py", line 218, in onecmd return self.default(line) File "/usr/lib/python2.6/site-packages/trac/admin/console.py", line 251, in default return cmd_mgr.execute_command(*args) File "/usr/lib/python2.6/site-packages/trac/admin/api.py", line 118, in execute_command return f(*fargs) File "/usr/lib/python2.6/site-packages/trac/env.py", line 773, in _do_upgrade self.env.upgrade(backup=no_backup is None) File "/usr/lib/python2.6/site-packages/trac/env.py", line 507, in upgrade @with_transaction(self) File "/usr/lib/python2.6/site-packages/trac/db/util.py", line 36, in transaction_wrapper fn(dbtmp) File "/usr/lib/python2.6/site-packages/trac/env.py", line 519, in do_upgrade participant.upgrade_environment(db) File "/usr/lib/python2.6/site-packages/trac/env.py", line 585, in upgrade_environment script.do_upgrade(self.env, i, cursor) File "/usr/lib/python2.6/site-packages/trac/upgrades/db23.py", line 36, in do_upgrade cursor.execute(stmt) File "/usr/lib/python2.6/site-packages/trac/db/util.py", line 81, in execute r = self.cursor.execute(sql) File "/usr/lib/python2.6/site-packages/MySQLdb/cursors.py", line 173, in execute self.errorhandler(self, exc, value) File "/usr/lib/python2.6/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler raise errorclass, errorvalue OperationalError: (1071, 'Specified key was too long; max key length is 1000 bytes')
comment:5 by , 14 years ago
source:trunk/trac/upgrades/db23.py@9372#L36
Ok, the longer key=('repos', 'rev', 'path', 'change_type')
is problematic.
And what about the MySQL information? What version/engine/charsets are you using?
comment:6 by , 14 years ago
version of mysql bindings is dev-python/mysql-python-1.2.3_rc1, and charset is utf8_unicode_ci
comment:7 by , 14 years ago
Description: | modified (diff) |
---|---|
Keywords: | verify added; needinfo removed |
Milestone: | → 0.12 |
While it should have been utf8_unicode_bin
(please people, if you want to use MySQL, conform to the instructions given in MySqlDb!), I think this doesn't make a difference concerning the problem at hand.
I'll try the upgrade again (thought I did?), and if it doesn't work it's indeed a blocker, otherwise I suspect it's probably because an unsupported engine was used (MyISAM?).
software details: dev-lang/python-2.6.4 dev-db/mysql-5.1.44