The MySqlDb (http://trac.edgewall.org/wiki/MySqlDb MySqlDb)
instructions include a step to alter the default character set and
collate for each table:
ALTER TABLE `table_name` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
Is the above correct or should it be a CONVERT command instead?
ALTER TABLE `table_name` CONVERT TO CHARACTER SET utf8 COLLATE
utf8_bin;
My character set now is utf8 with a collation of utf8_general_ci. Is
this OK?
Today, I created a mysqldump of our trac database; ran a script to
change trac from using MyISAM to InnoDB (using the DEFAULT and not
CONVERT); viewed various items in trac (i.e. reports, wiki, timeline,
roadmap, tickets, depgraph) and everything looked good; added a
comment to an issue and Trac gave an error and lost connection to
MySQL server during query; so I restored trac database from the
mysqldump file I had created.
I did notice that after running the script (before restoring from the
dumpfile), the collation was still showing utf8_general_ci when I
used
"SHOW FULL COLUMNS FROM ticket_change;"
"SELECT table_name, engine FROM information_schema.tables WHERE
table_schema=DATABASE();"
showed engine as InnoDB on all the table after running my script.
The trac.log file contained:
2009-03-18 07:26:49,508 Trac[web_ui] ERROR: Failure sending
notification on change to ticket #400: OperationalError: (2013, 'Lost
connection to MySQL server during query')
2009-03-18 07:26:49,542 Trac[main] ERROR: Exception caught while post-
processing request:
Traceback (most recent call last):
File "/usr/local/lib64/python2.5/site-packages/Trac-0.11.3-py2.5.egg/
trac/web/api.py", line 367, in send_error
'text/html')
File "/usr/local/lib64/python2.5/site-packages/Trac-0.11.3-py2.5.egg/
trac/web/chrome.py", line 714, in render_template
stream |= self._filter_stream(req, method, filename, stream, data)
File "build/bdist.linux-x86_64/egg/genshi/core.py", line 128, in
__or__
return Stream(_ensure(function(self)), serializer=self.serializer)
File "/usr/local/lib64/python2.5/site-packages/Trac-0.11.3-py2.5.egg/
trac/web/chrome.py", line 818, in inner
data)
File "/usr/local/trac/mistic/plugins/TracTicketDep-0.11_20081224-
py2.5.egg/ticketdep/web_ui.py", line 92, in filter_stream
parser = XMLParser(StringIO(dep_str))
File "/usr/lib64/python2.5/StringIO.py", line 57, in __init__
buf = str(buf)
File "build/bdist.linux-x86_64/egg/genshi/builder.py", line 111, in
__str__
return str(self.generate())
File "build/bdist.linux-x86_64/egg/genshi/core.py", line 243, in
__str__
return self.render()
File "build/bdist.linux-x86_64/egg/genshi/core.py", line 179, in
render
return encode(generator, method=method, encoding=encoding,
out=out)
File "build/bdist.linux-x86_64/egg/genshi/output.py", line 60, in
encode
return _encode(u''.join(list(iterator)))
File "build/bdist.linux-x86_64/egg/genshi/output.py", line 210, in
__call__
for kind, data, pos in stream:
File "build/bdist.linux-x86_64/egg/genshi/output.py", line 592, in
__call__
for kind, data, pos in stream:
File "build/bdist.linux-x86_64/egg/genshi/output.py", line 698, in
__call__
for kind, data, pos in chain(stream, [(None, None, None)]):
File "build/bdist.linux-x86_64/egg/genshi/output.py", line 532, in
__call__
for ev in stream:
File "build/bdist.linux-x86_64/egg/genshi/core.py", line 283, in
_ensure
for event in stream:
File "build/bdist.linux-x86_64/egg/genshi/builder.py", line 272, in
_generate
for kind, data, pos in Fragment._generate(self):
File "build/bdist.linux-x86_64/egg/genshi/builder.py", line 143, in
_generate
for event in child:
File "build/bdist.linux-x86_64/egg/genshi/builder.py", line 272, in
_generate
for kind, data, pos in Fragment._generate(self):
File "build/bdist.linux-x86_64/egg/genshi/builder.py", line 140, in
_generate
for event in child._generate():
File "build/bdist.linux-x86_64/egg/genshi/builder.py", line 272, in
_generate
for kind, data, pos in Fragment._generate(self):
File "build/bdist.linux-x86_64/egg/genshi/builder.py", line 143, in
_generate
for event in child:
File "/usr/local/trac/mistic/plugins/TracTicketDep-0.11_20081224-
py2.5.egg/ticketdep/render.py", line 94, in _generate_rows
tkt = trac.ticket.model.Ticket(self.env, ticket)
File "/usr/local/lib64/python2.5/site-packages/Trac-0.11.3-py2.5.egg/
trac/ticket/model.py", line 47, in __init__
self._fetch_ticket(tkt_id, db)
File "/usr/local/lib64/python2.5/site-packages/Trac-0.11.3-py2.5.egg/
trac/ticket/model.py", line 95, in _fetch_ticket
% ','.join(std_fields), (tkt_id,))
File "/usr/local/lib64/python2.5/site-packages/Trac-0.11.3-py2.5.egg/
trac/db/util.py", line 50, in execute
return self.cursor.execute(sql_escape_percent(sql), args)
File "build/bdist.linux-x86_64/egg/MySQLdb/cursors.py", line 166, in
execute
self.errorhandler(self, exc, value)
File "build/bdist.linux-x86_64/egg/MySQLdb/connections.py", line 35,
in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (2006, 'MySQL server has gone away')
My configuration is:
Trac: 0.11.3
Python: 2.5.1 (r251:54863, Sep 21 2007, 22:46:31) [GCC 4.2.1 (SUSE
Linux)]
setuptools: 0.6c8
MySQL: server: "5.0.67-community", client: "5.0.67", thread-safe: 0
MySQLdb: 1.2.2
Genshi: 0.5.1
mod_python: 3.3.1
Subversion: 1.5.6 (r36142)
jQuery: 1.2.6
PLEASE NOTE MySQL above says "thread-safe: 0"
The start up for mysql uses /usr/bin/mysqld_safe but our apache
startup also starts php which may be causing the thread-safe: 0.
(http://groups.google.com/group/trac-dev/browse_thread/thread/
5130263ff2c804bc?hl=en)
Does InnoDB require thread-safe: 1 (true) ?
Do I need to address the thread-safe issue prior to the InnoDB issue?
Or are they unrelated issues?
Thanks in advance for any advice or suggestions.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---