[TYPO3-core] RFC: Bug 4581: Duplicate entry on cache_pagesection on reloading twice
Michael Stucki
michael at typo3.org
Wed Jan 24 16:35:30 CET 2007
After discussing this with Oliver:
+1 if Karsten confirms that mysql_info() will be easy to port
Otherwise -1, because the cost of loosing compatibility is higher than the
gain we have with this.
Michael
Ingmar Schlecht wrote:
> Hi Dmity,
>
> Dmitry Dulepov wrote:
>> I would not give +1 because I believe that this solution does not solve
>> the problem :(
>
> Did you closely read Oliver's description? I think it sounds very
> reasonable, what he's saying.
>
> Here's what Oliver wrote again:
>> mysql_affected_rows [1] also fails (returns zero) if the records exists
>> but wasn't updated because old values were equal to new values. And then
>> also an INSERT is sent. And this produces the "duplicate entry" error.
>
> That clearly shows that it's useful to use sql_info() instead of
> mysql_affected_rows(), doesn't it?
>
> Without Oliver's patch:
> (1) UPDATE -> succeeds
> (2) UPDATE -> succeeds, but TYPO3 thinks it didn't because
> mysql_affected_rows() == 0
> (2) INSERT -> fails
>
> With Oliver's patch:
> (1) UPDATE -> succeeds
> (2) UPDATE -> succeeds, and TYPO3 knows that it succeeds because
> $sql_info['rowsmatched'] == 1
>
> +1 from me, but I would like to hear Karsten's opinion first as he might
> know better whether it's a good idea to introduce sql_info() to t3lib_db
> from an DBAL perspective.
>
> cheers
> Ingmar
--
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/
More information about the TYPO3-team-core
mailing list