[icinga-checkins] icinga.org: icinga2/master: DB IDO: Fix overflow in current_notification_number column (MySQL)

git at icinga.org git at icinga.org
Wed Jun 22 12:14:18 CEST 2016


Module: icinga2
Branch: master
Commit: 067cb8d283cfda02d9c8a9590ebf63ba5351a43d
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=067cb8d283cfda02d9c8a9590ebf63ba5351a43d

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Wed Jun 22 12:13:49 2016 +0200

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 882438b..27fd99e 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 0fa2385..8f6f396 100644
--- a/lib/db_ido_mysql/schema/upgrade/2.5.0.sql
+++ b/lib/db_ido_mysql/schema/upgrade/2.5.0.sql
@@ -22,6 +22,13 @@ 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
 -- -----------------------------------------
 INSERT INTO icinga_dbversion (name, version, create_time, modify_time) VALUES ('idoutils', '1.14.1', NOW(), NOW()) ON DUPLICATE KEY UPDATE version='1.14.1', modify_time=NOW();



More information about the icinga-checkins mailing list