Add index to userLoginLog so that DeleteExpiredSessions can scale. Fixes bug #11708

This commit is contained in:
Colin Kuskie 2010-07-12 10:08:22 -07:00
parent 8938685b9b
commit 0e9194114f
2 changed files with 11 additions and 0 deletions

View file

@ -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...

View file

@ -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 --------------------------------