Skip to content
Snippets Groups Projects
Commit 7f40b8f3 authored by Thomas Hohn's avatar Thomas Hohn Committed by Christian Kuhn
Browse files

[TASK] Speed up SysLogSerializationUpdate

Speed up the SysLogSerializationUpdate migration wizard
for trivial cases like a:0:{} and a:1:{i:0;s:0:"";}.

Resolves: #100932
Releases: main, 12.4
Change-Id: I6dd35036f18778a1dac012362dbf6ee4fa614703
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/79245


Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarMarkus Klein <markus.klein@typo3.org>
Tested-by: default avatarNikita Hovratov <nikita.h@live.de>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarMarkus Klein <markus.klein@typo3.org>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarNikita Hovratov <nikita.h@live.de>
parent a0455ba3
Branches
Tags
No related merge requests found
......@@ -58,6 +58,20 @@ class SysLogSerializationUpdate implements UpgradeWizardInterface
{
$connection = $this->getConnectionPool()->getConnectionForTable(self::TABLE_NAME);
// Perform fast update of a:0:{}, since it evaluates to []
$connection->update(
self::TABLE_NAME,
['log_data' => '[]'],
['log_data' => 'a:0:{}']
);
// Perform fast update of a:1:{i:0;s:0:"";}, since it evaluates to [""]
$connection->update(
self::TABLE_NAME,
['log_data' => '[""]'],
['log_data' => 'a:1:{i:0;s:0:"";}']
);
foreach ($this->getRecordsToUpdate() as $record) {
$logData = $this->unserializeLogData($record['log_data'] ?? '');
$connection->update(
......
......@@ -3,3 +3,4 @@
,1,"Stage for record was changed to -10. Comment was: """"","a:0:{}"
,2,"New version created of table '%s', uid '%s'. UID of new version is '%s'","a:3:{i:0;s:18:""sys_file_reference"";i:1;i:27421;i:2;i:27422;}"
,3,"Record '%s' (%s) was deleted from page '%s' (%s)","a:5:{i:0;s:19:""gabrielle-bugat.png"";i:1;s:24:""sys_file_reference:32134"";i:2;s:10:""Management"";i:3;i:373;s:12:""originalUser"";i:41;}"
,4,"Stage for record was changed to -20. Comment was: """"","a:1:{i:0;s:0:"""";}"
......@@ -3,3 +3,4 @@
,1,"Stage for record was changed to -10. Comment was: """"","[]"
,2,"New version created of table '%s', uid '%s'. UID of new version is '%s'","[""sys_file_reference"",27421,27422]"
,3,"Record '%s' (%s) was deleted from page '%s' (%s)","{""0"":""gabrielle-bugat.png"",""1"":""sys_file_reference:32134"",""2"":""Management"",""3"":373,""originalUser"":41}"
,4,"Stage for record was changed to -20. Comment was: """"","[""""]"
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment