Skip to content

Commit

Permalink
Merge pull request #1116 from ZoneMinder/add-index-to-frames
Browse files Browse the repository at this point in the history
Add index to frames
  • Loading branch information
Andrew Bauer committed Oct 22, 2015
2 parents d0e5dd6 + 030792d commit 5608884
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -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")

Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions db/zm_create.sql.in
Expand Up @@ -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`),
KEY `Type` (`Type`),
KEY `TimeStamp` (`TimeStamp`)
) ENGINE=@ZM_MYSQL_ENGINE@;
Expand Down
22 changes: 22 additions & 0 deletions 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`)"
));

PREPARE stmt FROM @s;
EXECUTE stmt;


2 changes: 1 addition & 1 deletion version
@@ -1 +1 @@
1.28.107
1.28.108

0 comments on commit 5608884

Please sign in to comment.