From 0e9194114ffdc6f972011a99147c8c50f86801b8 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Mon, 12 Jul 2010 10:08:22 -0700 Subject: [PATCH] Add index to userLoginLog so that DeleteExpiredSessions can scale. Fixes bug #11708 --- docs/changelog/7.x.x.txt | 1 + docs/upgrades/upgrade_7.9.8-7.9.9.pl | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index c79a662fc..d432cd111 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -7,6 +7,7 @@ - fixed #11672: UTF-Error in message body (from DataForm) - fixed #11709: Shop - i18n error - fixed #11710: Weird license in json.js might be taken as non free + - fixed #11708: Activity DeleteExpiredSessions is too slow 7.9.8 - fixed #11651: First Day of Week is a string... diff --git a/docs/upgrades/upgrade_7.9.8-7.9.9.pl b/docs/upgrades/upgrade_7.9.8-7.9.9.pl index 548cf5576..8d496fa14 100644 --- a/docs/upgrades/upgrade_7.9.8-7.9.9.pl +++ b/docs/upgrades/upgrade_7.9.8-7.9.9.pl @@ -31,6 +31,7 @@ my $quiet; # this line required my $session = start(); # this line required # upgrade functions go here +addIndexToUserSessionLog($session); finish($session); # this line required @@ -44,6 +45,15 @@ finish($session); # this line required # print "DONE!\n" unless $quiet; #} +#---------------------------------------------------------------------------- +# Describe what our function does +sub addIndexToUserSessionLog { + my $session = shift; + print "\tAdd index to UserSessionLogTable... " unless $quiet; + $session->db->write(q|alter table userLoginLog add index sessionId (sessionId)|); + print "DONE!\n" unless $quiet; +} + # -------------- DO NOT EDIT BELOW THIS LINE --------------------------------