Skip to content

Conversation

@RZivaralam
Copy link

To Reproduce

This confirms that the exception is triggered in valid and expected situations, for example when:

multiple users perform the same search query at nearly the same time, or

the same search term is executed repeatedly within the same second.

In these cases:

the UPDATE statement does find the row (correct sequence_id)

but writes identical values (keywords and second-based tstamp)

MySQL / MariaDB correctly returns affectedRows = 0

the current logic incorrectly interprets this as “row not found”

@dkd-kaehm dkd-kaehm changed the base branch from release-12.0.x to main December 10, 2025 16:14
@dkd-kaehm dkd-kaehm changed the title [BUG] #4499 [BUGFIX] Use the return value of the UPDATE statement correctly in the LastSearchesRepository::update method Dec 10, 2025
…e `LastSearchesRepository::update` method

executeStatement() returns:
* false → SQL execution failed (real error)
* 0 → UPDATE executed successfully, but no data changed
* 1+ → UPDATE executed and changed data

Fixes: TYPO3-Solr#4499
@dkd-kaehm
Copy link
Collaborator

Are you sure about that statement?:

grafik grafik

There is no boolean return value on TYPO3 12 and 13 LTS Stacks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants