From 067cb8d283cfda02d9c8a9590ebf63ba5351a43d Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Wed, 22 Jun 2016 12:13:49 +0200 Subject: [PATCH] DB IDO: Fix overflow in current_notification_number column (MySQL) fixes #11962 --- lib/db_ido_mysql/schema/mysql.sql | 4 ++-- lib/db_ido_mysql/schema/upgrade/2.5.0.sql | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/db_ido_mysql/schema/mysql.sql b/lib/db_ido_mysql/schema/mysql.sql index 882438b75..27fd99e88 100644 --- a/lib/db_ido_mysql/schema/mysql.sql +++ b/lib/db_ido_mysql/schema/mysql.sql @@ -735,7 +735,7 @@ CREATE TABLE IF NOT EXISTS icinga_hoststatus ( notifications_enabled smallint default 0, problem_has_been_acknowledged smallint default 0, acknowledgement_type smallint default 0, - current_notification_number smallint default 0, + current_notification_number int unsigned default 0, passive_checks_enabled smallint default 0, active_checks_enabled smallint default 0, event_handler_enabled smallint default 0, @@ -1223,7 +1223,7 @@ CREATE TABLE IF NOT EXISTS icinga_servicestatus ( notifications_enabled smallint default 0, problem_has_been_acknowledged smallint default 0, acknowledgement_type smallint default 0, - current_notification_number smallint default 0, + current_notification_number int unsigned default 0, passive_checks_enabled smallint default 0, active_checks_enabled smallint default 0, event_handler_enabled smallint default 0, diff --git a/lib/db_ido_mysql/schema/upgrade/2.5.0.sql b/lib/db_ido_mysql/schema/upgrade/2.5.0.sql index 0fa238598..8f6f39660 100644 --- a/lib/db_ido_mysql/schema/upgrade/2.5.0.sql +++ b/lib/db_ido_mysql/schema/upgrade/2.5.0.sql @@ -21,6 +21,13 @@ ALTER TABLE icinga_servicestatus MODIFY COLUMN check_source varchar(255) charact CREATE INDEX idx_comments_object_id on icinga_comments(object_id); CREATE INDEX idx_scheduleddowntime_object_id on icinga_scheduleddowntime(object_id); +-- ----------------------------------------- +-- #11962 +-- ----------------------------------------- + +ALTER TABLE icinga_hoststatus MODIFY COLUMN current_notification_number int unsigned default 0; +ALTER TABLE icinga_servicestatus MODIFY COLUMN current_notification_number int unsigned default 0; + -- ----------------------------------------- -- set dbversion -- -----------------------------------------