From 07492c76cd8ba3759f21b695c87e0c345d03a0ec Mon Sep 17 00:00:00 2001 From: glix08 Date: Mon, 21 May 2012 17:58:20 +0000 Subject: [PATCH] r419 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Предотвращение ошибки #001690 BIGINT UNSIGNED value is out of range, проявляющейся в MySQL 5.5 (http://torrentpier.me/threads/498/). git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@419 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293 --- upload/config.php | 4 ++-- upload/includes/functions_admin.php | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/upload/config.php b/upload/config.php index e22aaf282..e3f8edd76 100644 --- a/upload/config.php +++ b/upload/config.php @@ -56,8 +56,8 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do // Increase number of revision after update $bb_cfg['tp_version'] = '2.5 Beta'; -$bb_cfg['tp_release_state'] = 'R418'; -$bb_cfg['tp_release_date'] = '18-05-2012'; +$bb_cfg['tp_release_state'] = 'R419'; +$bb_cfg['tp_release_date'] = '21-05-2012'; // Database $charset = 'utf8'; diff --git a/upload/includes/functions_admin.php b/upload/includes/functions_admin.php index d5676175c..355712ac3 100644 --- a/upload/includes/functions_admin.php +++ b/upload/includes/functions_admin.php @@ -68,6 +68,9 @@ function sync ($type, $id) $tmp_sync_topics = 'tmp_sync_topics'; + // Проверка на остаточные записи об уже удаленных топиках (критично в MySQL 5.5) + DB()->query("DELETE FROM ". BB_TOPICS ." WHERE topic_first_post_id NOT IN (SELECT post_id FROM ". BB_POSTS .")"); + DB()->query(" CREATE TEMPORARY TABLE $tmp_sync_topics ( topic_id MEDIUMINT UNSIGNED NOT NULL DEFAULT '0',