summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-10-01 14:49:27 +0000
committersasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-10-01 14:49:27 +0000
commit559fa40b0e8794372c4d6275b88f522082f9ead6 (patch)
tree41e238ba9705d957c8482a2dea1231d3b970ebaf
parente2919d9724b95a51dddad4af375b1ad8bd268c9b (diff)
downloadzabbix-559fa40b0e8794372c4d6275b88f522082f9ead6.tar.gz
zabbix-559fa40b0e8794372c4d6275b88f522082f9ead6.tar.xz
zabbix-559fa40b0e8794372c4d6275b88f522082f9ead6.zip
- [ZBX-89] Unused fields:history_lastid, ..str_lastid & ..uint_lastid (Sasha)
[svn merge svn://svn.zabbix.com/branches/1.4 -r4816:4819] git-svn-id: svn://svn.zabbix.com/trunk@4820 97f52cf1-0a1b-0410-bd0e-c28be96e8082
-rw-r--r--ChangeLog1
-rw-r--r--create/schema/schema.sql3
-rw-r--r--frontends/php/include/nodes.inc.php4
-rw-r--r--src/zabbix_server/nodewatcher/history.c21
4 files changed, 6 insertions, 23 deletions
diff --git a/ChangeLog b/ChangeLog
index b5131185..ffc7a9f4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,7 @@ Changes for 1.5:
Changes for 1.4.3:
+ - [ZBX-89] Unused fields:history_lastid, ..str_lastid & ..uint_lastid (Sasha)
- [ZBX-88] Chenged method to "get" in all forms which affects display info (Artem)
- [ZBX-57] Problem in zbx_tcp_check_security 127.0.0.1 != 127.0.00.1 (Sasha)
- [ZBX-80] Master node does not display configuration of slave nodes (Sasha)
diff --git a/create/schema/schema.sql b/create/schema/schema.sql
index 1ba46c52..800de1d3 100644
--- a/create/schema/schema.sql
+++ b/create/schema/schema.sql
@@ -127,9 +127,6 @@ FIELD |port |t_integer |'10051'|NOT NULL |ZBX_SYNC
FIELD |slave_history |t_integer |'30' |NOT NULL |ZBX_SYNC
FIELD |slave_trends |t_integer |'365' |NOT NULL |ZBX_SYNC
FIELD |event_lastid |t_id |'0' |NOT NULL |0
-FIELD |history_lastid |t_bigint |'0' |NOT NULL |0
-FIELD |history_str_lastid|t_bigint |'0' |NOT NULL |0
-FIELD |history_uint_lastid|t_bigint |'0' |NOT NULL |0
FIELD |nodetype |t_integer |'0' |NOT NULL |ZBX_SYNC
FIELD |masterid |t_integer |'0' |NOT NULL |0
diff --git a/frontends/php/include/nodes.inc.php b/frontends/php/include/nodes.inc.php
index 19987371..0cffb431 100644
--- a/frontends/php/include/nodes.inc.php
+++ b/frontends/php/include/nodes.inc.php
@@ -88,9 +88,9 @@
}
$result = DBexecute('insert into nodes (nodeid,name,timezone,ip,port,slave_history,slave_trends,'.
- 'event_lastid,history_lastid,nodetype,masterid) values ('.
+ 'event_lastid,nodetype,masterid) values ('.
$new_nodeid.','.zbx_dbstr($name).','.$timezone.','.zbx_dbstr($ip).','.$port.','.$slave_history.','.$slave_trends.','.
- '0,0,'.$nodetype.','.$masterid.')');
+ '0,'.$nodetype.','.$masterid.')');
if($result && $node_type == ZBX_NODE_MASTER)
{
diff --git a/src/zabbix_server/nodewatcher/history.c b/src/zabbix_server/nodewatcher/history.c
index 8cbb1b07..097f9d9f 100644
--- a/src/zabbix_server/nodewatcher/history.c
+++ b/src/zabbix_server/nodewatcher/history.c
@@ -93,17 +93,13 @@ static int process_node_history_str(int nodeid, int master_nodeid)
if( ((CONFIG_NODE_NOHISTORY !=0) && (CONFIG_NODEID == nodeid)) ||
send_to_node("new history_str", master_nodeid, nodeid, data) == SUCCEED)
{
-/* zabbix_log( LOG_LEVEL_WARNING, "Updating nodes.history_lastid");*/
- DBexecute("update nodes set history_str_lastid=" ZBX_FS_UI64 " where nodeid=%d",
- id,
- nodeid);
DBexecute("delete from history_str_sync where nodeid=%d and id<=" ZBX_FS_UI64,
nodeid,
id);
}
else
{
- zabbix_log( LOG_LEVEL_DEBUG, "Not updating nodes.history_str_lastid");
+ zabbix_log( LOG_LEVEL_DEBUG, "process_node_history_str() FAIL");
}
}
DBfree_result(result);
@@ -181,17 +177,13 @@ static int process_node_history_uint(int nodeid, int master_nodeid)
if( ((CONFIG_NODE_NOHISTORY !=0) && (CONFIG_NODEID == nodeid)) ||
send_to_node("new history_uint", master_nodeid, nodeid, data) == SUCCEED)
{
-/* zabbix_log( LOG_LEVEL_WARNING, "Updating nodes.history_lastid"); */
- DBexecute("update nodes set history_uint_lastid=" ZBX_FS_UI64 " where nodeid=%d",
- id,
- nodeid);
DBexecute("delete from history_uint_sync where nodeid=%d and id<=" ZBX_FS_UI64,
nodeid,
id);
}
else
{
- zabbix_log( LOG_LEVEL_DEBUG, "Not updating nodes.history_uint_lastid");
+ zabbix_log( LOG_LEVEL_DEBUG, "process_node_history_uint() FAIL");
}
}
DBfree_result(result);
@@ -275,17 +267,13 @@ static int process_node_history(int nodeid, int master_nodeid)
if( ((CONFIG_NODE_NOHISTORY !=0) && (CONFIG_NODEID == nodeid)) ||
send_to_node("new history", master_nodeid, nodeid, data) == SUCCEED)
{
-/* zabbix_log( LOG_LEVEL_WARNING, "Updating nodes.history_lastid=" ZBX_FS_UI64, id); */
- DBexecute("update nodes set history_lastid=" ZBX_FS_UI64 " where nodeid=%d",
- id,
- nodeid);
DBexecute("delete from history_sync where nodeid=%d and id<=" ZBX_FS_UI64,
nodeid,
id);
}
else
{
- zabbix_log( LOG_LEVEL_DEBUG, "Not updating nodes.history_lastid");
+ zabbix_log( LOG_LEVEL_DEBUG, "process_node_history() FAIL");
}
}
DBfree_result(result);
@@ -345,7 +333,6 @@ void main_historysender()
{
DB_RESULT result;
DB_ROW row;
- zbx_uint64_t lastid;
int nodeid;
int master_nodeid;
@@ -362,8 +349,6 @@ void main_historysender()
while((row = DBfetch(result)))
{
nodeid=atoi(row[0]);
- ZBX_STR2UINT64(lastid,row[1])
-
process_node(nodeid, master_nodeid);
}
DBfree_result(result);