Actions
Bug #1356
closedxxv 1.7.0 USER: DBD::mysql::st execute failed: Option 'SQL_CACHE' used twice in statement at /home/alex/compilate/xxv/xxv/bin/../lib/XXV/MODULES/USER.pm line 936
Description
Bedingungen :
xxv 1.7.0. git
mysql 5.5.31-0ubuntu0.12.04.1 (Ubuntu)
ubuntu precise 12.04 LTS
doppelter SQL_Cache Eintrag.
Fehlermeldung :
USER: DBD::mysql::st execute failed: Option 'SQL_CACHE' used twice in statement at /home/alex/compilate/xxv/xxv/bin/../lib/XXV/MODULES/USER.pm line 936
Lösung :
diff -Nru ./pure_xxv/xxv/lib/XXV/MODULES/USER.pm ./xxv/xxv/lib/XXV/MODULES/USER.pm --- ./pure_xxv/xxv/lib/XXV/MODULES/USER.pm 2013-05-02 14:09:23.167693859 +0200 +++ ./xxv/xxv/lib/XXV/MODULES/USER.pm 2013-04-26 13:58:05.875354289 +0200 @@ -928,7 +928,7 @@ my $user; # check User - my $sth = $self->{dbh}->prepare('SELECT SQL_CACHE SQL_CACHE USER.Id as Id,Name,Level,Prefs,UserPrefs,Deny,MaxLifeTime,MaxPriority,sid from USER,SESSION where USER.Id = SESSION.uid and SESSION.sid = ( ? ) and SESSION.source = ( ? ) and SESSION.expires > NOW()'); + my $sth = $self->{dbh}->prepare('SELECT SQL_CACHE USER.Id as Id,Name,Level,Prefs,UserPrefs,Deny,MaxLifeTime,MaxPriority,sid from USER,SESSION where USER.Id = SESSION.uid and SESSION.sid = ( ? ) and SESSION.source = ( ? ) and SESSION.expires > NOW()'); $sth->execute($sid, $ip) or return error sprintf("Couldn't execute query: %s.",$sth->errstr); $user = $sth->fetchrow_hashref(); </pre
Actions