Edgewall Software
Modify

Opened 20 years ago

Closed 20 years ago

#1348 closed defect (invalid)

db_default.py generates some bogus tables

Reported by: outi <outi@…> Owned by: Christopher Lenz
Priority: normal Milestone:
Component: general Version: 0.8.1
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I tried to get the post-commit script to work, but failed. So i took a closer look at the script and it's sql-queries. During doing so i realised that the database layout of 2 tables was different than it supposed to be. The problem with db_default.py are the comments placed in the structure of table layout. On my Systems (all FreeBSD 5.3-Stable and SQLlite 2.8.16) the generated tables have some bogus columns and are missing some other. Very stange is that trac keeps working! Only post-commit hook fails. Maybe there are some functions that suffer from this bug, but i didn't trigger them yet.

Table "ticket" with comments in file:

ColumnType
idinteger PRIMARY KEY
timeinteger
problem description (long) keywords text
componenttext
severitytext
prioritytext
ownertext
cctext
resolutiontext
summarytext

Table "ticket" without comments:

ColumnType
idinteger PRIMARY KEY
timeinteger
changetimeinteger
componenttext
severitytext
prioritytext
ownertext
reportertext
cctext
urltext
versiontext
milestonetext
statustext
resolutiontext
summarytext
descriptiontext
keywordstext

Tables "permission" and since some revisions "node_change", too. I'll attach a patch for this. Hopefully someone can verify this bug.

Attachments (1)

db_default.patch (3.1 KB ) - added by outi <outi@…> 20 years ago.
Patch for db_default.py based on Revision 1435

Download all attachments as: .zip

Change History (5)

by outi <outi@…>, 20 years ago

Attachment: db_default.patch added

Patch for db_default.py based on Revision 1435

comment:1 by outi <outi@…>, 20 years ago

Owner: changed from Jonas Borgström to Christopher Lenz

reassign to some more "active" person. IMHO this is a blocker or some really weird thing that i want to get solved.

comment:2 by Mark Rowe, 20 years ago

The patch that you have provided simply removes all comments from the SQL. If this resolves the problem for you, this suggests that the problem is with the SQLite installation that you are using rather than Trac itself. I think it is a safe assumption on Trac's behalf that SQLite will interpret and treat SQL comments appropriately.

Alternately, it could be possible that the db_default.py file that you are using has incorrect line-endings for the operating system that you are using. This could lead to SQLite treating the comment as ending later than when intended.

comment:3 by Christopher Lenz, 20 years ago

The line ending hint makes sense.

Really, if the SQL comments in db_default.py themselves were really a problem, we'd have noticed long before.

comment:4 by Christopher Lenz, 20 years ago

Milestone: 0.8.2
Priority: highestnormal
Resolution: invalid
Severity: blockernormal
Status: newclosed

Pretty sure this is invalid, see previous comments.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christopher Lenz 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.