Ticket #1334 (closed defect: fixed)

Opened 20 months ago

Last modified 19 months ago

Wrong query in Doctrine_Search:readTableData method

Reported by: honza.trtik Owned by: jwage
Priority: major Milestone:
Component: Searchable Version: 1.0.0
Severity: Keywords:
Cc: Has Test: no
Status: Pending Core Response Has Patch: no

Description

Doctrine_Search:readTableData method is supposed to return array of record ids, which are not indexed

$query = 'SELECT * FROM ' . $conn->quoteIdentifier($tableName)
               . ' WHERE ' . $conn->quoteIdentifier($id)
               . ' IN (SELECT ' . $conn->quoteIdentifier($id)
               . ' FROM ' . $conn->quoteIdentifier($this->_table->getTableName())
               . ' WHERE keyword IS NULL)';

this query always returns empty array, i think, it should be replaced by something like

$query = 'SELECT * FROM ' . $conn->quoteIdentifier($tableName)
               . ' WHERE ' . $conn->quoteIdentifier($id)
               . ' NOT IN (SELECT ' . $conn->quoteIdentifier($id)
               . ' FROM ' . $conn->quoteIdentifier($this->_table->getTableName()) . ')';

Attachments

search_read_table_data.patch Download (380 bytes) - added by honza.trtik 20 months ago.
patch

Change History

Changed 20 months ago by honza.trtik

patch

Changed 19 months ago by jwage

  • status changed from new to closed
  • resolution set to fixed

(In [4840]) fixes #1334

Changed 19 months ago by jwage

  • version changed from 0.11 to 1.0
  • milestone changed from Unknown to 1.0.0-RC2

Changed 19 months ago by anonymous

  • milestone New deleted

Milestone New deleted

Note: See TracTickets for help on using tickets.