Edgewall Software

Ticket #1348 (closed defect: invalid)

Opened 4 years ago

Last modified 4 years ago

db_default.py generates some bogus tables

Reported by: outi <outi@…> Owned by: cmlenz
Priority: normal Milestone:
Component: general Version: 0.8.1
Severity: normal Keywords:
Cc:

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

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

Change History

Changed 4 years ago by outi <outi@…>

Patch for db_default.py based on Revision 1435

Changed 4 years ago by outi <outi@…>

  • owner changed from jonas to cmlenz

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

Changed 4 years ago by mrowe

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.

Changed 4 years ago by cmlenz

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.

Changed 4 years ago by cmlenz

  • priority changed from highest to normal
  • status changed from new to closed
  • resolution set to invalid
  • severity changed from blocker to normal
  • milestone 0.8.2 deleted

Pretty sure this is invalid, see previous comments.

Add/Change #1348 (db_default.py generates some bogus tables )

Author



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