Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

#4437 closed defect (worksforme)

install error (mysql)

Reported by: anonymous Owned by: Jonas Borgström
Priority: high Milestone:
Component: general Version:
Severity: blocker Keywords: mysql
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Christian Boos)

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 (0)

Change History (2)

comment:1 by Christian Boos, 18 years ago

Description: modified (diff)
Keywords: mysql needinfo added
Version: 0.10.3

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)

comment:2 by Christian Boos, 18 years ago

Keywords: needinfo removed
Resolution: worksforme
Status: newclosed

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.

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.