Bug #28563
closedIncorrect handler detected with DELETE, INSERT and UPDATE queries
100%
Description
exec_DELETEquery(), exec_INSERTquery() and exec_UPDATEquery() (maybe others too) fail to use the correct handler. exec_SELECTquery() and exec_SELECTgetRows() work correctly when used with an extra MySQL database, but I suspect that it fails when using a different DBMS.
The problem is that the handler ($this->lastHandlerKey) is selected based on the not-yet-mapped table(s) instead of the mapped table name(s). Inside SELECTquery() this operation is repeated with the mapped table name, so in the end it will select the right handler if both the default handler and the correct handler are 'native' (MySQL).
DELETEquery() does not set the lastHandlerKey again and will thus use the default handler.
INSERTquery() and UPDATEquery() analyse the handler again, but set a local variable with the result; the query will be executed by the default handler.
Solution would be to select the handler in the exec_* family of functions based on the mapped table name(s) and not the original table name(s).
Updated by Xavier Perseguers over 13 years ago
- Project changed from TYPO3 Core to 329
- Category deleted (
999)
Updated by Mr. Hudson over 13 years ago
Patch set 1 of change I1d1c607ae7dc294feb621aff2b70a205b02b14b0 has been pushed to the review server.
It is available at http://review.typo3.org/3902
Updated by Xavier Perseguers over 13 years ago
- Status changed from New to Under Review
- Target version set to 4.6.0
Updated by Xavier Perseguers over 13 years ago
- % Done changed from 0 to 50
Merged for master (4.6)
Still pending for 4.5
Updated by Mr. Hudson over 13 years ago
Patch set 1 of change I1d1c607ae7dc294feb621aff2b70a205b02b14b0 has been pushed to the review server.
It is available at http://review.typo3.org/3989
Updated by Mr. Hudson over 13 years ago
Patch set 1 of change I316d5a987641a058e51d8b6ce08f0c187ceb6535 has been pushed to the review server.
It is available at http://review.typo3.org/3990
Updated by Jigal van Hemert over 13 years ago
- Status changed from Under Review to Resolved
- % Done changed from 50 to 100
Applied in changeset commit:cd1ea21d4af38095ed78c288808fcc327691fede.
Updated by Michael Stucki about 11 years ago
- Project changed from 329 to TYPO3 Core
Updated by Riccardo De Contardi over 7 years ago
- Status changed from Resolved to Closed