[BUGFIX] DBAL: Fix retrieving the last insert id 87/43187/2
authorMorton Jonuschat <m.jonuschat@mojocode.de>
Fri, 11 Sep 2015 08:06:16 +0000 (10:06 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 11 Sep 2015 09:38:15 +0000 (11:38 +0200)
commitaf79a94fad4ed01f90a9edb98d52b172f5130cb6
tree88235c4ccb2be7560106434fb20c1f71d47b684f
parent533f2505e326e97d6a43882b432a7ec0a861d674
[BUGFIX] DBAL: Fix retrieving the last insert id

Only retrieve the last insert id if the table actually has an auto
incrementing field, otherwise trying to retrieve the last inserted
id can result in errors and transaction rollbacks.

The last inserted id is also retrieved on plain INSERT statements, not
only for INSERT statements that require a subsequent UPDATE to store
BLOB/CLOB values.

Resolves: #67077
Releases: master
Change-Id: I87b62cb004a3f9356d47e18ad4dd5fb78c7c71fa
Reviewed-on: http://review.typo3.org/43187
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/dbal/Classes/Database/DatabaseConnection.php