~ubuntu-dev/ubuntu/lucid/zabbix/lucid-201002110857

« back to all changes in this revision

Viewing changes to upgrades/dbpatches/1.0beta3_to_1.0beta4/mysql/patch.sql

  • Committer: Bazaar Package Importer
  • Author(s): Michael Ablassmeier
  • Date: 2007-07-02 09:06:51 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070702090651-8l6fl3fjw9rh6l2u
Tags: 1:1.4.1-2
Add patch from SVN in order to fix Incorrect processing of character '%'
in user parameters and remote commands.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
update items set history=history/(24*3600);
2
 
 
3
 
update config set alert_history=alert_history/(24*3600);
4
 
update config set alarm_history=alarm_history/(24*3600);
5
 
 
6
 
alter table triggers add status int(4) DEFAULT '0' NOT NULL;
7
 
alter table triggers add value int(4) DEFAULT '0' NOT NULL;
8
 
 
9
 
alter table alerts add status int(4) DEFAULT '0' NOT NULL;
10
 
alter table alerts add retries int(4) DEFAULT '0' NOT NULL;
11
 
create index status_retries on alerts (status,retries);
12
 
 
13
 
alter table items add trapper_hosts varchar(255) DEFAULT '' NOT NULL;
14
 
 
15
 
update triggers set status=0 where istrue in (0,1,3);
16
 
update triggers set status=1 where istrue in (2);
17
 
update triggers set status=2 where istrue in (4);
18
 
 
19
 
update triggers set value=0 where istrue in (0);
20
 
update triggers set value=1 where istrue in (1);
21
 
update triggers set value=2 where istrue in (2,3,4);
22
 
 
23
 
alter table triggers drop istrue;
24
 
 
25
 
alter table alarms add value int(4) DEFAULT '0' NOT NULL;
26
 
update alarms set value=0 where istrue in (0);
27
 
update alarms set value=1 where istrue in (1);
28
 
update alarms set value=2 where istrue not in (0,1);
29
 
 
30
 
alter table services add algorithm int(1) DEFAULT '0' NOT NULL;
31
 
 
32
 
insert into items_template (itemtemplateid,description,key_,delay,value_type)
33
 
        values (69,'Host status','status', 60, 0);
34
 
insert into triggers_template (triggertemplateid,itemtemplateid,description,expression)
35
 
        values (69,69,'Server %s is unreachable','{:.last(0)}=2');
36
 
 
37
 
insert into users (userid,alias,name,surname,passwd) values (2,'guest','Default','User','d41d8cd98f00b204e9800998ecf8427e');
38
 
insert into rights (rightid,userid,name,permission,id) values (3,2,'Default permission','R',0);
39
 
 
40
 
--
41
 
--
42
 
 
43
 
CREATE TABLE sessions (
44
 
  sessionid             varchar(32)     NOT NULL DEFAULT '',
45
 
  userid                int(4)          NOT NULL DEFAULT '0',
46
 
  lastaccess            int(4)          NOT NULL DEFAULT '0',
47
 
  PRIMARY KEY (sessionid)
48
 
);