Bug #91660

DBAL-DriverException in IndexedSearch indexer on PostgreSQL

Added by Stephan Großberndt 16 days ago. Updated 15 days ago.

Status:
Under Review
Priority:
Must have
Category:
Indexed Search
Target version:
-
Start date:
2020-06-16
Due date:
% Done:

0%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

When the indexed_search indexer is called on a page of a site using PostgreSQL a DBAL-DriverException occurs:

Core: Exception handler (WEB): Uncaught TYPO3 Exception: An exception occurred while executing '
INSERT INTO "index_rel" ("phash", "wid", "count", "first", "freq", "flags") VALUES 
(?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?)'
with params
[79503457, 232976733, 2, 0, 22857.142857142855, 128, 79503457, 33134531, 2, 0, 22857.142857142855, 128, 79503457, 142534212, 3, 2, 32000, 0, 79503457, 206349347, 2, 3, 22857.142857142855, 0, 79503457, 257362240, 2, 4, 22857.142857142855, 0, 79503457, 140886208, 2, 5, 22857.142857142855, 0, 79503457, 140542595, 1, 6, 11428.571428571428, 0, 79503457, 49039618, 1, 7, 11428.571428571428, 0, 79503457, 221124326, 3, 8, 32000, 0, 79503457, 242808131, 3, 9, 32000, 0, 79503457, 46935156, 2, 10, 22857.142857142855, 0, 79503457, 267908178, 1, 11, 11428.571428571428, 0, 79503457, 105049209, 1, 12, 11428.571428571428, 0, 79503457, 95445454, 1, 13, 11428.571428571428, 0, 79503457, 53275072, 1, 14, 11428.571428571428, 0, 79503457, 243331443, 1, 18, 11428.571428571428, 0]:
SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "22857.142857143" | Doctrine\DBAL\Exception\DriverException thrown in file /vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php in line 79.

The exception happens because table index_rel defines freq as smallint(5) but tries to insert floats in it:

CREATE TABLE index_rel (
  freq smallint(5) unsigned DEFAULT '0' NOT NULL,
);

History

#1 Updated by Gerrit Code Review 16 days ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64902

#2 Updated by Gerrit Code Review 15 days ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64902

Also available in: Atom PDF