Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add index to frames #1116

Merged
merged 5 commits into from Oct 22, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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