Fix customvariables in DB IDO MySQL are not case sensitive

fixes #6608
This commit is contained in:
Michael Friedrich 2014-07-23 18:06:57 +02:00
parent 409ea08673
commit 1e4ddc2a1a
9 changed files with 40 additions and 9 deletions

View File

@ -4,6 +4,12 @@ Please check doc/1-about.md.
## What's New
### What's New in Version 2.0.2
#### Changes
* DB IDO schema upgrade required (new schema version: 1.11.6)
### What's New in Version 2.0.1
* Bug #6316: application fails to start on wrong log file permissions but does not tell about it

View File

@ -33,7 +33,7 @@
using namespace icinga;
#define SCHEMA_VERSION "1.11.3"
#define SCHEMA_VERSION "1.11.6"
REGISTER_TYPE(IdoMysqlConnection);
REGISTER_STATSFUNCTION(IdoMysqlConnectionStats, &IdoMysqlConnection::StatsFunc);

View File

@ -337,7 +337,7 @@ CREATE TABLE IF NOT EXISTS icinga_customvariables (
object_id bigint unsigned default 0,
config_type smallint default 0,
has_been_modified smallint default 0,
varname varchar(255) character set latin1 default '',
varname varchar(255) character set latin1 collate latin1_general_cs default NULL,
varvalue TEXT character set latin1 default '',
PRIMARY KEY (customvariable_id),
UNIQUE KEY object_id_2 (object_id,config_type,varname),
@ -356,7 +356,7 @@ CREATE TABLE IF NOT EXISTS icinga_customvariablestatus (
object_id bigint unsigned default 0,
status_update_time timestamp default '0000-00-00 00:00:00',
has_been_modified smallint default 0,
varname varchar(255) character set latin1 default '',
varname varchar(255) character set latin1 collate latin1_general_cs default NULL,
varvalue TEXT character set latin1 default '',
PRIMARY KEY (customvariablestatus_id),
UNIQUE KEY object_id_2 (object_id,varname),
@ -1600,6 +1600,6 @@ CREATE INDEX commenthistory_delete_idx ON icinga_commenthistory (instance_id, co
-- -----------------------------------------
-- set dbversion
-- -----------------------------------------
INSERT INTO icinga_dbversion (name, version, create_time, modify_time) VALUES ('idoutils', '1.11.3', NOW(), NOW()) ON DUPLICATE KEY UPDATE version='1.11.3', modify_time=NOW();
INSERT INTO icinga_dbversion (name, version, create_time, modify_time) VALUES ('idoutils', '1.11.6', NOW(), NOW()) ON DUPLICATE KEY UPDATE version='1.11.6', modify_time=NOW();

View File

@ -8,3 +8,13 @@
-- -----------------------------------------
UPDATE icinga_objects SET name2 = NULL WHERE name2 = '';
ALTER TABLE `icinga_customvariables` MODIFY COLUMN `varname` varchar(255) character set latin1 collate latin1_general_cs default NULL;
ALTER TABLE `icinga_customvariablestatus` MODIFY COLUMN `varname` varchar(255) character set latin1 collate latin1_general_cs default NULL;
-- -----------------------------------------
-- update dbversion
-- -----------------------------------------
INSERT INTO icinga_dbversion (name, version, create_time, modify_time) VALUES ('idoutils', '1.11.6', NOW(), NOW()) ON DUPLICATE KEY UPDATE version='1.11.6', modify_time=NOW();

View File

@ -34,7 +34,7 @@
using namespace icinga;
#define SCHEMA_VERSION "1.11.3"
#define SCHEMA_VERSION "1.11.6"
REGISTER_TYPE(IdoPgsqlConnection);

View File

@ -1629,5 +1629,5 @@ CREATE INDEX commenthistory_delete_idx ON icinga_commenthistory (instance_id, co
-- set dbversion
-- -----------------------------------------
SELECT updatedbversion('1.11.3');
SELECT updatedbversion('1.11.6');

View File

@ -8,3 +8,10 @@
-- -----------------------------------------
UPDATE icinga_objects SET name2 = NULL WHERE name2 = '';
-- -----------------------------------------
-- update dbversion
-- -----------------------------------------
SELECT updatedbversion('1.11.6');

View File

@ -46,6 +46,12 @@ Icinga 2 is available as [Vagrant Demo VM](#vagrant).
## <a id="whats-new"></a> What's new
### What's New in Version 2.0.2
#### Changes
* DB IDO schema upgrade required (new schema version: 1.11.6)
### What's New in Version 2.0.1
* Bug #6316: application fails to start on wrong log file permissions but does not tell about it

View File

@ -451,9 +451,11 @@ by a number of projects including Icinga Web 1.x, Reporting or Icinga Web 2.
There is a separate module for each database back-end. At present support for
both MySQL and PostgreSQL is implemented.
Icinga 2 uses the Icinga 1.x IDOUtils database schema starting with version
`1.11.3`. Icinga 2 requires additional features not yet released with older
Icinga 1.x versions.
Icinga 2 uses the Icinga 1.x IDOUtils database schema. Icinga 2 requires additional
features not yet released with older Icinga 1.x versions.
* Current required schema version: `1.11.6`.
> **Tip**
>