2015-10-23 01:36:55 +08:00
|
|
|
--
|
|
|
|
-- 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()
|
2015-10-25 05:58:20 +08:00
|
|
|
AND index_name = 'EventId_idx'
|
2015-10-23 01:36:55 +08:00
|
|
|
) > 0,
|
|
|
|
"SELECT 'EventId Index already exists on Frames table'",
|
2015-10-23 02:12:56 +08:00
|
|
|
"CREATE INDEX `EventId_idx` ON `Frames` (`EventId`)"
|
2015-10-23 01:36:55 +08:00
|
|
|
));
|
|
|
|
|
|
|
|
PREPARE stmt FROM @s;
|
|
|
|
EXECUTE stmt;
|
|
|
|
|
|
|
|
|