[Systems] Maintenance downtime today for OS upgrades

Aleksey Lim me at alsroot.su
Wed Jul 27 05:06:01 EDT 2016


July 27 2016 6:32 AM, "Samuel Cantero" <scanterog at gmail.com> wrote:
> Hello guys,
> 
> I just realized that the statistics for aslo is not working. I execute the daily zzz-aslo cron job
> manually and I get the following error:
> 
> PHP Notice: MySQL Error 1690: BIGINT UNSIGNED value is out of range in
> '(`activities`.`collections`.`upvotes` - `activities`.`collections`.`downvotes`)'

diff --git a/bin/maintenance.php b/bin/maintenance.php
index 39ae95b..0a4c00d 100755
--- a/bin/maintenance.php
+++ b/bin/maintenance.php
@@ -592,7 +592,7 @@ switch ($action) {
             UPDATE collections
             SET rating=
               IFNULL(
-                CAST(upvotes - downvotes AS SIGNED) * LN(upvotes + downvotes),
+                (CAST(upvotes AS SIGNED) - CAST(downvotes AS SIGNED)) * LN(upvotes + downvotes),
                 0)
         ");
         $affected_rows = mysql_affected_rows();

-- 
Aleksey


More information about the Systems mailing list