Ticket #1912 (closed defect: fixed)
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:
- Select a comment in the "Comments" menu.
- Set "Selected comments action" to "Publish".
- Press "ok".
An example is on the attached screenshots.
Attachments
Change History
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: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