Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

#4901 closed defect (duplicate)

MySQL: Specified key was too long; max key length is 1000 bytes

Reported by: azymux@… Owned by: Jonas Borgström
Priority: normal Milestone:
Component: general Version: 0.10.3
Severity: normal Keywords: mysql
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Christian Boos)

I'm not entirely sure which table is having this problem and I did not find an existing ticket with this information. It appears to have a key that is too large when you have UTF8 using 3 bytes per character.

Trac Admin Console 0.10.3
MySQL 5.0.32-Debian_7-log
Python 2.4.4 

CREATE DATABASE `trac2` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

Database connection string [sqlite:db/trac.db]> mysql://trac2:trac2@localhost/trac2

Creating and Initializing Project
Failed to create environment. (1071, 'Specified key was too long; max key length is 1000 bytes')
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/trac/scripts/admin.py", line 613, in do_initenv
    options=options)
  File "/usr/lib/python2.4/site-packages/trac/env.py", line 124, in __init__
    self.create(options)
  File "/usr/lib/python2.4/site-packages/trac/env.py", line 229, in create
    DatabaseManager(self).init_db()
  File "/usr/lib/python2.4/site-packages/trac/db/api.py", line 69, in init_db
    connector.init_db(**args)
  File "/usr/lib/python2.4/site-packages/trac/db/mysql_backend.py", line 50, in init_db
    cursor.execute(stmt)
  File "/usr/lib/python2.4/site-packages/trac/db/util.py", line 51, in execute
    return self.cursor.execute(sql)
  File "/usr/lib/python2.4/site-packages/MySQLdb/cursors.py", line 163, in execute
    self.errorhandler(self, exc, value)
  File "/usr/lib/python2.4/site-packages/MySQLdb/connections.py", line 35, in defaulterrorhandler
    raise errorclass, errorvalue
OperationalError: (1071, 'Specified key was too long; max key length is 1000 bytes')
Failed to initialize environment. 1
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/trac/scripts/admin.py", line 617, in do_initenv
    sys.exit(1)
SystemExit: 1

Attachments (0)

Change History (1)

comment:1 by Christian Boos, 18 years ago

Description: modified (diff)
Resolution: duplicate
Status: newclosed

See #3676 (already fixed for the upcoming 0.10.4 release, see TracDownload#Tracstable.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.