From faee1cd58ec98c4f3fd8885f154c61add8159c7c Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Thu, 30 May 2024 18:16:56 +0100 Subject: [PATCH 1/2] MDL-82047 analytics: remove 32-bit integer checks for maximum time. --- analytics/classes/analysable.php | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/analytics/classes/analysable.php b/analytics/classes/analysable.php index bbcebd5c465..8b75087eeba 100644 --- a/analytics/classes/analysable.php +++ b/analytics/classes/analysable.php @@ -14,18 +14,8 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . -/** - * Any element analysers can analyse. - * - * @package core_analytics - * @copyright 2016 David Monllao {@link http://www.davidmonllao.com} - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ - namespace core_analytics; -defined('MOODLE_INTERNAL') || die(); - /** * Any element analysers can analyse. * @@ -37,9 +27,8 @@ interface analysable { /** * Max timestamp. - * We are limited by both PHP's max int value and DB (cross-db) max int allowed. Use the smallest one. */ - const MAX_TIME = PHP_INT_MAX < SQL_INT_MAX ? PHP_INT_MAX : SQL_INT_MAX; + const MAX_TIME = SQL_INT_MAX; /** * The analysable unique identifier in the site. From 113b64c2decbf936052d61d6108efebd041dbfc3 Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Fri, 31 May 2024 07:19:23 +0100 Subject: [PATCH 2/2] MDL-82047 dml: correct constant name in large integer test docblock. --- lib/dml/tests/dml_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dml/tests/dml_test.php b/lib/dml/tests/dml_test.php index 584d3ba691f..ae0fb3bf960 100644 --- a/lib/dml/tests/dml_test.php +++ b/lib/dml/tests/dml_test.php @@ -4674,7 +4674,7 @@ EOD; } /** - * Test that the SQL_MAX_INT constant can be used for all insert, update, select and delete queries + * Test that the SQL_INT_MAX constant can be used for all insert, update, select and delete queries */ public function test_sql_max_int(): void { $DB = $this->tdb;