Dotclear

Ticket #1912 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

publishing a comment in 2.6.1 throws an `near "tc": syntax error (1)' error

Reported by: czk Owned by: bruno
Priority: normal Milestone: 2.6.2
Component: module:core Version: 2.6.1
Severity: major Keywords: comments
Cc: msieczka@…

Description

In 2.6.1 with SQLlite DB, trying to publish a comment throws an error:

near "tc": syntax error (1)

To reproduce:

  1. Select a comment in the "Comments" menu.
  1. Set "Selected comments action" to "Publish".
  1. Press "ok".

An example is on the attached screenshots.

Attachments

publish_comment_1.png Download (23.3 KB) - added by czk 12 years ago.
publish_comment_2.png Download (14.5 KB) - added by czk 12 years ago.

Change History

Changed 12 years ago by czk

Changed 12 years ago by czk

comment:1 Changed 12 years ago by actatux

I triggered this bug today with dotclear 2.6.1. This error is thrown when a user is trying to modify or delete a comment.

It took me some time to find the SQL statement which failed (even with DC_DEBUG == DC_DEV == true), but here is an example:

sqlite> DELETE FROM dc_comment tc USING dc_post tp WHERE tc.post_id = tp.post_id AND tp.blog_id = 0 AND comment_id IN (7);
Error: near "tc": syntax error

This is a non standard SQL statement, and SQLite does not support it:  http://www.sqlite.org/syntaxdiagrams.html#delete-stmt

PostgreSQL supports it, but it is stated that this is a PostgreSQL extension:  http://www.postgresql.org/docs/9.3/static/sql-delete.html, section Compatibility.

comment:2 Changed 12 years ago by bruno

  • Owner changed from team to bruno

comment:3 Changed 12 years ago by bruno

  • Status changed from new to assigned

comment:4 Changed 12 years ago by Dsls

  • Status changed from assigned to closed
  • Resolution set to fixed

(In [8082d2ad2e34]) Removed pgsql/mysql specific code on comments processing, now working with sqlite closes #1912

comment:5 Changed 12 years ago by czk

Just excellent! Big thanks.

Note: See TracTickets for help on using tickets.

Sites map