From 746e69544862c027455cb348865d16c81cebc024 Mon Sep 17 00:00:00 2001 From: Kyle Johnson Date: Thu, 22 Oct 2015 11:25:32 -0600 Subject: [PATCH 1/5] Add index to Frames table upon new creation --- db/zm_create.sql.in | 1 + 1 file changed, 1 insertion(+) diff --git a/db/zm_create.sql.in b/db/zm_create.sql.in index 000540c33..e98c63c12 100644 --- a/db/zm_create.sql.in +++ b/db/zm_create.sql.in @@ -244,6 +244,7 @@ CREATE TABLE `Frames` ( `Delta` decimal(8,2) NOT NULL default '0.00', `Score` smallint(5) unsigned NOT NULL default '0', PRIMARY KEY (`Id`), + INDEX `EventId_idx` (`EventId ASC`), KEY `Type` (`Type`), KEY `TimeStamp` (`TimeStamp`) ) ENGINE=@ZM_MYSQL_ENGINE@; From 356fadbff81437ea032873d9dd9f0649ec4e89ab Mon Sep 17 00:00:00 2001 From: Kyle Johnson Date: Thu, 22 Oct 2015 11:36:55 -0600 Subject: [PATCH 2/5] Add index to Frames table for people updating --- db/zm_update-1.28.108.sql | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 db/zm_update-1.28.108.sql diff --git a/db/zm_update-1.28.108.sql b/db/zm_update-1.28.108.sql new file mode 100644 index 000000000..72a6a5097 --- /dev/null +++ b/db/zm_update-1.28.108.sql @@ -0,0 +1,22 @@ +-- +-- This updates a 1.28.107 database to 1.28.108 +-- + +-- +-- Update Frame table to have an Index on EventId, per the change made in 1.28.107 +-- +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.STATISTICS + WHERE table_name = 'Frames' + AND table_schema = DATABASE() + AND index_name='EventId_idx'; + ) > 0, +"SELECT 'EventId Index already exists on Frames table'", +"CREATE INDEX `EventId_idx` ON `Frames` (`EventId ASC`)" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + + From 9dcb3e1df36564da8f9ac997f21fae048bb1a4e0 Mon Sep 17 00:00:00 2001 From: Kyle Johnson Date: Thu, 22 Oct 2015 11:40:25 -0600 Subject: [PATCH 3/5] Add Index to Frames table. Fixes #1085. --- .project | 11 ++++++++++ CMakeLists.txt | 2 +- configure.ac | 2 +- src/.cproject | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/.project | 27 +++++++++++++++++++++++++ version | 2 +- 6 files changed, 96 insertions(+), 3 deletions(-) create mode 100644 .project create mode 100644 src/.cproject create mode 100644 src/.project diff --git a/.project b/.project new file mode 100644 index 000000000..fff76a9aa --- /dev/null +++ b/.project @@ -0,0 +1,11 @@ + + + ZoneMinder + + + + + + + + diff --git a/CMakeLists.txt b/CMakeLists.txt index d770645c5..2f1b44109 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ # cmake_minimum_required (VERSION 2.6) project (zoneminder) -set(zoneminder_VERSION "1.28.107") +set(zoneminder_VERSION "1.28.108") # make API version a minor of ZM version set(zoneminder_API_VERSION "${zoneminder_VERSION}.1") diff --git a/configure.ac b/configure.ac index a05248d1b..436be34cf 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ # For instructions on building with cmake, please see INSTALL # AC_PREREQ(2.59) -AC_INIT(zm,1.28.107,[http://www.zoneminder.com/forums/ - Please check FAQ first],zoneminder,http://www.zoneminder.com/downloads.html) +AC_INIT(zm,1.28.108,[http://www.zoneminder.com/forums/ - Please check FAQ first],zoneminder,http://www.zoneminder.com/downloads.html) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR(src/zm.h) AC_CONFIG_HEADERS(config.h) diff --git a/src/.cproject b/src/.cproject new file mode 100644 index 000000000..fc77ce963 --- /dev/null +++ b/src/.cproject @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/.project b/src/.project new file mode 100644 index 000000000..9871da5ba --- /dev/null +++ b/src/.project @@ -0,0 +1,27 @@ + + + ZoneMinder + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + diff --git a/version b/version index 0234b6353..ca2c9c84c 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.28.107 +1.28.108 From e51ff0677f024e533fb8707feb0d0442c5bfc0ff Mon Sep 17 00:00:00 2001 From: Kyle Johnson Date: Thu, 22 Oct 2015 12:12:56 -0600 Subject: [PATCH 4/5] Fix typo in Frames index creation. I hope --- db/zm_create.sql.in | 2 +- db/zm_update-1.28.108.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/db/zm_create.sql.in b/db/zm_create.sql.in index e98c63c12..53bfa1fa8 100644 --- a/db/zm_create.sql.in +++ b/db/zm_create.sql.in @@ -244,7 +244,7 @@ CREATE TABLE `Frames` ( `Delta` decimal(8,2) NOT NULL default '0.00', `Score` smallint(5) unsigned NOT NULL default '0', PRIMARY KEY (`Id`), - INDEX `EventId_idx` (`EventId ASC`), + INDEX `EventId_idx` (`EventId`), KEY `Type` (`Type`), KEY `TimeStamp` (`TimeStamp`) ) ENGINE=@ZM_MYSQL_ENGINE@; diff --git a/db/zm_update-1.28.108.sql b/db/zm_update-1.28.108.sql index 72a6a5097..b22fccaba 100644 --- a/db/zm_update-1.28.108.sql +++ b/db/zm_update-1.28.108.sql @@ -13,7 +13,7 @@ SET @s = (SELECT IF( AND index_name='EventId_idx'; ) > 0, "SELECT 'EventId Index already exists on Frames table'", -"CREATE INDEX `EventId_idx` ON `Frames` (`EventId ASC`)" +"CREATE INDEX `EventId_idx` ON `Frames` (`EventId`)" )); PREPARE stmt FROM @s; From 030792d8616a37660661dc8b1953c8e5fc4e6b71 Mon Sep 17 00:00:00 2001 From: Kyle Johnson Date: Thu, 22 Oct 2015 12:15:38 -0600 Subject: [PATCH 5/5] Remove files accidentally added in 9dcb3e1df36564da8f9ac997f21fae048bb1a4e0 --- .project | 11 ----------- src/.cproject | 55 --------------------------------------------------- src/.project | 27 ------------------------- 3 files changed, 93 deletions(-) delete mode 100644 .project delete mode 100644 src/.cproject delete mode 100644 src/.project diff --git a/.project b/.project deleted file mode 100644 index fff76a9aa..000000000 --- a/.project +++ /dev/null @@ -1,11 +0,0 @@ - - - ZoneMinder - - - - - - - - diff --git a/src/.cproject b/src/.cproject deleted file mode 100644 index fc77ce963..000000000 --- a/src/.cproject +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/.project b/src/.project deleted file mode 100644 index 9871da5ba..000000000 --- a/src/.project +++ /dev/null @@ -1,27 +0,0 @@ - - - ZoneMinder - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - -