Edgewall Software

Ticket #4437 (closed defect: worksforme)

Opened 2 years ago

Last modified 22 months ago

install error (mysql)

Reported by: anonymous Owned by: jonas
Priority: high Milestone:
Component: general Version:
Severity: blocker Keywords: mysql
Cc:

Description (last modified by cboos) (diff)

Hi,

$ trac-admin /usr/share/trac/projects/granite initenv

always give me this error:

---------------------------------------------------------------------------------
Creating and Initializing Project
Failed to create environment. (1064, "You have an error in your SQL syntax; chec
k the manual that corresponds to your MySQL server version for the right syntax
to use near 'version (\n    `name` text,\n    `time` int,\n    `description` tex
t,\n    PRIMARY K' at line 1")
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 execu
te
    self.errorhandler(self, exc, value)
  File "/usr/lib/python2.4/site-packages/MySQLdb/connections.py", line 35, in de
faulterrorhandler
    raise errorclass, errorvalue
ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual
 that corresponds to your MySQL server version for the right syntax to use near
'version (\n    `name` text,\n    `time` int,\n    `description` text,\n    PRIM
ARY K' at line 1")
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
---------------------------------------------------------------------------------

My config:

Linux Mandriva 2007
MySQL-server-4.1.21-0.glibc23 (rpm)
python-mysql-1.2.1-0.p2.2mdv2007.0 (rpm)
python-base-2.4.3-3mdv2007.0 (rpm)
clearsilver-0.10.4 (compiled)
subversion-server-1.3.2-5.1mdv2007.0 (rpm)

The problem comes with the table name version (should be put between double quotes), ie:

create table "version" (...);

Regards, Franck Wolff

Attachments

Change History

Changed 2 years ago by cboos

  • keywords mysql needinfo added
  • version 0.10.3 deleted
  • description modified (diff)

Mh, there's no table named "version" in 0.10.3, what release were you using?

(and sorry for the delay, the issue was not noticed when you submitted it)

Changed 22 months ago by cboos

  • keywords needinfo removed
  • status changed from new to closed
  • resolution set to worksforme

Sorry, there is of course a table named version in 0.10.3...

Possibly MySQL-server-4.1.21 has some issues with the version name? The strange thing is the people having added the MySQL support did test with 4.1 (see #923) and there have been a few renamings needed in the model, but not for version...

The original reporter found a workaround, so that's good, but I think unless we have other similar reports (and we haven't so far), we don't necessarily need to apply it on our side.

Add/Change #4437 (install error (mysql))

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from jonas. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.