mirror of
https://github.com/Cacti/cacti.git
synced 2026-11-09 14:02:54 +09:00
Add index to user_log
git-svn-id: svn+ssh://repo.cacti.net/var/data/svnroot/cacti/cacti/branches/0.8.7@7064 860744bd-22fc-0310-8c96-e9fe5004b5ca
This commit is contained in:
1 parent
47ca029bfb
commit
4e87dccd32
3 files changed
+19
-14
No files matched your search
@@ -2036,9 +2036,9 @@ INSERT INTO host_template_snmp_query VALUES (7,8);
|
||||
INSERT INTO host_template_snmp_query VALUES (7,9);
|
||||
INSERT INTO host_template_snmp_query VALUES (8,6);
|
||||
|
||||
--
|
||||
--
|
||||
-- Table structure for table `plugin_config`
|
||||
--
|
||||
--
|
||||
|
||||
CREATE TABLE `plugin_config` (
|
||||
`id` int(8) NOT NULL auto_increment,
|
||||
@@ -2053,9 +2053,9 @@ CREATE TABLE `plugin_config` (
|
||||
KEY `directory` (`directory`)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
--
|
||||
--
|
||||
-- Table structure for table `plugin_hooks`
|
||||
--
|
||||
--
|
||||
|
||||
CREATE TABLE `plugin_hooks` (
|
||||
`id` int(8) NOT NULL auto_increment,
|
||||
@@ -2069,9 +2069,9 @@ CREATE TABLE `plugin_hooks` (
|
||||
KEY `status` (`status`)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
--
|
||||
--
|
||||
-- Table structure for table `plugin_realms`
|
||||
--
|
||||
--
|
||||
|
||||
CREATE TABLE `plugin_realms` (
|
||||
`id` int(8) NOT NULL auto_increment,
|
||||
@@ -2082,9 +2082,9 @@ CREATE TABLE `plugin_realms` (
|
||||
KEY `plugin` (`plugin`)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
--
|
||||
--
|
||||
-- Table structure for table `plugin_db_changes`
|
||||
--
|
||||
--
|
||||
|
||||
CREATE TABLE `plugin_db_changes` (
|
||||
`id` int(10) NOT NULL auto_increment,
|
||||
@@ -2662,7 +2662,8 @@ CREATE TABLE user_log (
|
||||
result tinyint(1) NOT NULL default '0',
|
||||
ip varchar(40) NOT NULL default '',
|
||||
PRIMARY KEY (username,user_id,time),
|
||||
KEY username (username)
|
||||
KEY username (username),
|
||||
KEY user_id (user_id)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
--
|
||||
|
||||
+2
-1
@@ -28,6 +28,7 @@ Cacti CHANGELOG
|
||||
-bug: Graph settings and settings check boxes do not allow unchecking to be saved
|
||||
-bug: Fix minor issue with plugin library caused by non-session
|
||||
-bug: Fix SQL error on data input save for non-templated graphs
|
||||
-bug: user_log index added to increase performance
|
||||
-feature: Merge Plugin Architecture into Cacti
|
||||
|
||||
0.8.7i
|
||||
@@ -70,7 +71,7 @@ Cacti CHANGELOG
|
||||
-bug#0001626: Symbol ($) does not appear in labels/gprint strings to rrdtool during graph generation
|
||||
-bug#0001632: Script server treats quoted arguments with spaces incorrectly as multiple separate arguments
|
||||
-bug#0001646: MySQL SSL connection support
|
||||
-bug#0001660: Modifying data template values does not proprogate as expected
|
||||
-bug#0001660: Modifying data template values does not propagate as expected
|
||||
-bug#0001678: Adding graphs to a device fails to add entries to poller_item if using the script server
|
||||
-bug#0001768: Perform consistency check on ds maximum vs. ds minimum
|
||||
-bug#0001783: Graph Export export date is incorrect
|
||||
|
||||
@@ -29,7 +29,7 @@ function upgrade_to_0_8_8() {
|
||||
db_install_execute("0.8.8", "ALTER TABLE poller_item MODIFY COLUMN host_id MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0'");
|
||||
cacti_log(__FUNCTION__ . " upgrade table poller_item", false, "UPGRADE");
|
||||
}
|
||||
|
||||
|
||||
$_keys = array_rekey(db_fetch_assoc("SHOW KEYS FROM poller_output"), "Key_name", "Key_name");
|
||||
if (in_array("PRIMARY", $_keys)) {
|
||||
db_install_execute("0.8.8", "ALTER TABLE `poller_output` DROP PRIMARY KEY");
|
||||
@@ -38,9 +38,12 @@ function upgrade_to_0_8_8() {
|
||||
db_install_execute("0.8.8", "ALTER TABLE `poller_output` ADD PRIMARY KEY (`local_data_id`, `rrd_name`, `time`) USING BTREE");
|
||||
cacti_log(__FUNCTION__ . " upgrade table poller_output", false, "UPGRADE");
|
||||
|
||||
/* speed up user management */
|
||||
db_install_execute("0.8.8", "ALTER TABLE `user_log` ADD INDEX (`user_id`)");
|
||||
cacti_log(__FUNCTION__ . " upgrade table user_log", false, "UPGRADE");
|
||||
|
||||
/* Plugin Architecture
|
||||
* be prepared to find those data already present
|
||||
* be prepared to find those data already present
|
||||
* in case of upgrade of a cacti+PIA installation */
|
||||
$sql = "CREATE TABLE IF NOT EXISTS `plugin_config` (
|
||||
`id` int(8) unsigned NOT NULL auto_increment,
|
||||
@@ -95,8 +98,8 @@ function upgrade_to_0_8_8() {
|
||||
db_install_execute("0.8.8", $sql);
|
||||
cacti_log(__FUNCTION__ . " install table plugin_realms", false, "UPGRADE");
|
||||
|
||||
/* fill initial data into plugin tables
|
||||
* be prepared to find those data already present
|
||||
/* fill initial data into plugin tables
|
||||
* be prepared to find those data already present
|
||||
* in case of upgrade of a cacti+PIA installation */
|
||||
db_install_execute("0.8.8", "REPLACE INTO `plugin_realms` VALUES (1, 'internal', 'plugins.php', 'Plugin Management')");
|
||||
db_install_execute("0.8.8", "REPLACE INTO `plugin_hooks` VALUES (1, 'internal', 'config_arrays', '', 'plugin_config_arrays', 1)");
|
||||
|
||||
Reference in new issue
Block a user