Issue Bug Closed

#99547Wrong type for indexed_search column "metaphone"

Stefan Froemken 01/16/23, 10:27 updated 07/09/24, 12:46

Description

Hello,

one of our customers gets following error message while updating content records over TYPO3 backend:

An exception occurred while executing 'INSERT INTO `index_words` (`wid`, `baseword`, `metaphone`) VALUES (?, ?, ?)' with params: [123456789, "abc", ""]

Column “metaphone” in ext_tables.sql of indexed_search is INT and was untouched since 2004 (Commit of Kasper).

In core I found these lines:

// Metaphone value is also 60 only chars long
$metaphone = $this->enableMetaphoneSearch ? substr($this->metaphone($val, $this->storeMetaphoneInfoAsWords), 0, 60) : '';
$retArr[$val]['metaphone'] = $metaphone;

Both conditions are completely handled as strings. Further the value can be 60 chars long, but in DB just 11 digits can be stored.

I’m not a pro in indexed_search. What do you think? Can we just update INT to VARCHAR?

Stefan

Reviews 3

History 411

  1. Gerrit Code Review pushed patch set 2 for main to change 77390 status New Under Review 01/16/23, 10:54

  2. Gerrit Code Review pushed patch set 3 for main to change 77390 05/03/23, 09:28

  3. Gerrit Code Review pushed patch set 4 for main to change 77390 05/03/23, 11:53

  4. Benni Mack changed target version 06/05/23, 09:20

  5. Gerrit Code Review pushed patch set 5 for main to change 77390 07/06/23, 11:45

  6. Gerrit Code Review pushed patch set 1 for 12.4 to change 79817 07/06/23, 12:36

  7. Gerrit Code Review pushed patch set 1 for 11.5 to change 79818 07/06/23, 12:36

  8. Stefan Froemken commented and changed status Under Review Resolved done 0 % 100 % 07/06/23, 12:40

    Applied in changeset commit:91034b86a6eef53f9f619f7ce8d7de48d7dec99d.

  9. Gerrit Code Review pushed patch set 2 for 12.4 to change 79817 status Resolved Under Review 07/06/23, 13:35

  10. Stefan Froemken commented and changed status Under Review Resolved 07/06/23, 13:40

    Applied in changeset commit:331b87a73968a1cb49424940c1754107aef41d88.

  11. Benni Mack changed status Resolved Closed 07/09/24, 12:46