[TYPO3-core] RFC: Versioning fix for mysql 3.23

Dmitry Dulepov dima at spamcop.net
Sun Jan 22 17:47:40 CET 2006


This is a CVS patch request

Type: bugfix

Branch: TYPO3_4-0

Problem: versioning extension corrupts tables in mysql 3.23 by attempting to
insert a negative value to autoincrement column. Once this operation is
performed, no futher insert to tables possible. Related bug reports:
http://bugs.typo3.org/view.php?id=378 (resolved but not helpful to users)
http://bugs.typo3.org/view.php?id=2109 (about workspaces)

Solution: do not use negative UIDs. Insert a copy of the record with new
non-negative uid and work with a copy. Delete the original record if copy was
inserted successfully.

This patch is verified on mysql 3.23 server.

There was another solution that uses temporaty tables (see bug 2109).
Unfortunately it is too old for current versioning management. I also decided to
avoid temporary tables. The only drawback for my patch is that it increases
autoincrement number with each publishing. The maximum autoincrement number in
mysql is 2,147,483,647, so not a big deal (though still I am not happy about
it). As before, the online page id is not affected - links to the page will be
always valid.

*** We need this (or another similar) patch for proper workspaces functiong in
mysql 3.23. If we do not resolve this issue, we have to disable workspace module
when user works with this mysql version! ***

Dmitry.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mysql_versioning.txt
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20060122/114d5f41/attachment.txt 


More information about the TYPO3-team-core mailing list