Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Trac: Tickets

[The Trac Project] #3659: View Ticket does not work properly with MySQL

 

 

Trac tickets RSS feed   Index | Next | Previous | View Threaded


noreply at edgewall

Sep 3, 2006, 11:40 AM

Post #1 of 6 (1422 views)
Permalink
[The Trac Project] #3659: View Ticket does not work properly with MySQL

#3659: View Ticket does not work properly with MySQL
--------------------------------------------------+-------------------------
Reporter: Martin Burger <mburger [at] netbeyond> | Owner: jonas
Type: defect | Status: new
Priority: normal | Milestone:
Component: general | Version: devel
Severity: major | Keywords:
--------------------------------------------------+-------------------------
I have some problems with Trac 0.10b1 and MySQL 4.1.11-Debian_4sarge5-log.

When I try to use a database with collation "utf8_general_ci" with trac-
admin, I get the following error:

{{{
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.3/site-packages/trac/scripts/admin.py", line 611,
in do_initenv
options=options)
File "/usr/lib/python2.3/site-packages/trac/env.py", line 124, in
__init__
self.create(options)
File "/usr/lib/python2.3/site-packages/trac/env.py", line 228, in create
DatabaseManager(self).init_db()
File "/usr/lib/python2.3/site-packages/trac/db/api.py", line 65, in
init_db
connector.init_db(**args)
File "/usr/lib/python2.3/site-packages/trac/db/mysql_backend.py", line
50, in init_db
cursor.execute(stmt)
File "/usr/lib/python2.3/site-packages/trac/db/util.py", line 48, in
execute
return self.cursor.execute(sql)
File "/usr/lib/python2.3/site-packages/MySQLdb/cursors.py", line 137, in
execute
self.errorhandler(self, exc, value)
File "/usr/lib/python2.3/site-packages/MySQLdb/connections.py", line 33,
in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (1071, 'Specified key was too long; max key length is
1000 bytes')
Failed to initialize environment. 1
}}}

So, using collation "utf8_general_ci" trac-admin cannot create the
environment. However, using collation "latin1_general_ci", trac-admin is
able to finish it's work.

But: while viewing tickets, I get the following error:

{{{
Traceback (most recent call last):
File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 335, in
dispatch_request
dispatcher.dispatch(req)
File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 220, in
dispatch
resp = chosen_handler.process_request(req)
File "/usr/lib/python2.3/site-packages/trac/ticket/web_ui.py", line 287,
in process_request
get_reporter_id(req, 'author'))
File "/usr/lib/python2.3/site-packages/trac/ticket/web_ui.py", line 600,
in _insert_ticket_data
for change in self.grouped_changelog_entries(ticket, db):
File "/usr/lib/python2.3/site-packages/trac/ticket/web_ui.py", line 647,
in grouped_changelog_entries
changelog = ticket.get_changelog(when=when, db=db)
File "/usr/lib/python2.3/site-packages/trac/ticket/model.py", line 297,
in get_changelog
"ORDER BY time", (self.id, str(self.id), self.id))
File "/usr/lib/python2.3/site-packages/trac/db/util.py", line 47, in
execute
return self.cursor.execute(sql_escape_percent(sql), args)
File "/usr/lib/python2.3/site-packages/trac/db/util.py", line 47, in
execute
return self.cursor.execute(sql_escape_percent(sql), args)
File "/usr/lib/python2.3/site-packages/MySQLdb/cursors.py", line 137, in
execute
self.errorhandler(self, exc, value)
File "/usr/lib/python2.3/site-packages/MySQLdb/connections.py", line 33,
in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (1267, "Illegal mix of collations
(latin1_general_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation
'UNION'")
}}}

To summarize:

* latin1_general_ci: I can create the environment but I cannot view
tickets
* utf8_general_ci: I cannot create the environment

--
Ticket URL: <http://trac.edgewall.org/ticket/3659>
The Trac Project <http://trac.edgewall.org/>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Tickets" group.
To post to this group, send email to trac-tickets [at] googlegroups
To unsubscribe from this group, send email to trac-tickets-unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.se/group/trac-tickets
-~----------~----~----~----~------~----~------~--~---


noreply at edgewall

Sep 3, 2006, 11:55 AM

Post #2 of 6 (1394 views)
Permalink
Re: [The Trac Project] #3659: View Ticket does not work properly with MySQL [In reply to]

#3659: View Ticket does not work properly with MySQL
--------------------------------------------------+-------------------------
Reporter: Martin Burger <mburger [at] netbeyond> | Owner: jonas
Type: defect | Status: new
Priority: normal | Milestone:
Component: general | Version: devel
Severity: major | Resolution:
Keywords: |
--------------------------------------------------+-------------------------
Comment (by Martin Burger <mburger [at] netbeyond>):

Quick fix:

{{{
--- mysql_backend.py.BAK 2006-09-03 20:43:48.580402627 +0200
+++ mysql_backend.py 2006-09-03 20:53:32.394345764 +0200
@@ -141,7 +141,7 @@
else:
cnx = MySQLdb.connect(db=path, user=user, passwd=password,
host=host, port=port, use_unicode=True)
- self._set_character_set(cnx, 'utf8')
+ self._set_character_set(cnx, 'latin1')
ConnectionWrapper.__init__(self, cnx)

def cast(self, column, type):
}}}

--
Ticket URL: <http://trac.edgewall.org/ticket/3659#comment:1>
The Trac Project <http://trac.edgewall.org/>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Tickets" group.
To post to this group, send email to trac-tickets [at] googlegroups
To unsubscribe from this group, send email to trac-tickets-unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.se/group/trac-tickets
-~----------~----~----~----~------~----~------~--~---


noreply at edgewall

Sep 5, 2006, 4:58 AM

Post #3 of 6 (1397 views)
Permalink
Re: [The Trac Project] #3659: View Ticket does not work properly with MySQL [In reply to]

#3659: View Ticket does not work properly with MySQL
--------------------------------------------------+-------------------------
Reporter: Martin Burger <mburger [at] netbeyond> | Owner: jonas
Type: defect | Status: new
Priority: normal | Milestone:
Component: general | Version: devel
Severity: major | Resolution:
Keywords: |
--------------------------------------------------+-------------------------
Comment (by Martin Burger <mburger [at] netbeyond>):

I just created another project. Using latin1 I was not able to create the
project, I had to use utf8. But afterwards, I needed to switch to latin1
in order to view the tickets. Very strange... (?)

--
Ticket URL: <http://trac.edgewall.org/ticket/3659#comment:2>
The Trac Project <http://trac.edgewall.org/>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Tickets" group.
To post to this group, send email to trac-tickets [at] googlegroups
To unsubscribe from this group, send email to trac-tickets-unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.se/group/trac-tickets
-~----------~----~----~----~------~----~------~--~---


noreply at edgewall

Sep 6, 2006, 7:29 AM

Post #4 of 6 (1386 views)
Permalink
Re: [The Trac Project] #3659: View Ticket does not work properly with MySQL [In reply to]

#3659: View Ticket does not work properly with MySQL
--------------------------------------------------+-------------------------
Reporter: Martin Burger <mburger [at] netbeyond> | Owner: jonas
Type: defect | Status: new
Priority: normal | Milestone:
Component: general | Version: devel
Severity: major | Resolution:
Keywords: |
--------------------------------------------------+-------------------------
Comment (by Martin Burger <mburger [at] netbeyond>):

See #3673

--
Ticket URL: <http://trac.edgewall.org/ticket/3659#comment:3>
The Trac Project <http://trac.edgewall.org/>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Tickets" group.
To post to this group, send email to trac-tickets [at] googlegroups
To unsubscribe from this group, send email to trac-tickets-unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.se/group/trac-tickets
-~----------~----~----~----~------~----~------~--~---


noreply at edgewall

Sep 6, 2006, 8:53 AM

Post #5 of 6 (1388 views)
Permalink
Re: [The Trac Project] #3659: View Ticket does not work properly with MySQL [In reply to]

#3659: View Ticket does not work properly with MySQL
--------------------------------------------------+-------------------------
Reporter: Martin Burger <mburger [at] netbeyond> | Owner: jonas
Type: defect | Status: new
Priority: normal | Milestone:
Component: general | Version: devel
Severity: major | Resolution:
Keywords: mysql utf8 |
--------------------------------------------------+-------------------------
Changes (by Martin Burger <mburger [at] netbeyond>):

* keywords: => mysql utf8

--
Ticket URL: <http://trac.edgewall.org/ticket/3659#comment:4>
The Trac Project <http://trac.edgewall.org/>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Tickets" group.
To post to this group, send email to trac-tickets [at] googlegroups
To unsubscribe from this group, send email to trac-tickets-unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.se/group/trac-tickets
-~----------~----~----~----~------~----~------~--~---


noreply at edgewall

Oct 7, 2006, 5:40 AM

Post #6 of 6 (1368 views)
Permalink
Re: [The Trac Project] #3659: smart+question [In reply to]

#3659: smart+question
--------------------------------------------------+-------------------------
Reporter: Martin Burger <mburger [at] netbeyond> | Owner: jonas
Type: defect | Status: new
Priority: normal | Milestone:
Component: general | Version: devel
Severity: major | Resolution:
Keywords: mysql utf8 |
--------------------------------------------------+-------------------------
Changes (by Humphrey):

* summary: View Ticket does not work properly with MySQL =>
smart+question

Comment:

hello guys! http://hometown.aol.com/skylineblog/

--
Ticket URL: <http://trac.edgewall.org/ticket/3659#comment:5>
The Trac Project <http://trac.edgewall.org/>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Tickets" group.
To post to this group, send email to trac-tickets [at] googlegroups
To unsubscribe from this group, send email to trac-tickets-unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.se/group/trac-tickets
-~----------~----~----~----~------~----~------~--~---

Trac tickets RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.