From: Eric Bollengier Date: Mon, 1 Sep 2008 19:41:23 +0000 (+0000) Subject: ebl Fix the mysql creation script that double-created an X-Git-Tag: Release-3.0.0~1029 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8a3c4a25d51daef54f8e59d77bf56c4b59de3344;p=bacula%2Fbacula ebl Fix the mysql creation script that double-created an index of the same field on the Media table. Add an index to on VolumeName to the Media table for mysql. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7544 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/cats/make_mysql_tables.in b/bacula/src/cats/make_mysql_tables.in index 14a1d6c012..e8245c4a0a 100644 --- a/bacula/src/cats/make_mysql_tables.in +++ b/bacula/src/cats/make_mysql_tables.in @@ -210,13 +210,10 @@ CREATE TABLE Media ( RecyclePoolId INTEGER UNSIGNED DEFAULT 0 REFERENCES Pool, Comment BLOB, PRIMARY KEY(MediaId), + UNIQUE (VolumeName(128)), INDEX (PoolId) ); -CREATE INDEX inx8 ON Media (PoolId); - - - CREATE TABLE Pool ( PoolId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, Name TINYBLOB NOT NULL, diff --git a/bacula/src/cats/update_mysql_tables.in b/bacula/src/cats/update_mysql_tables.in index 2b981eaf35..d262f24f4f 100644 --- a/bacula/src/cats/update_mysql_tables.in +++ b/bacula/src/cats/update_mysql_tables.in @@ -15,6 +15,10 @@ USE ${db_name}; -- Create a table like Job for long term statistics CREATE TABLE JobStat (LIKE Job); +-- Fix bad index on Media table +DROP INDEX inx8; +CREATE UNIQUE INDEX inx8 ON Media (VolumeName(128)); + DELETE FROM Version; INSERT INTO Version (VersionId) VALUES (11); diff --git a/bacula/technotes-2.5 b/bacula/technotes-2.5 index f4e55012b9..d796d2b11b 100644 --- a/bacula/technotes-2.5 +++ b/bacula/technotes-2.5 @@ -32,6 +32,10 @@ separator in console (!$%&'()*+,-/:;<>?[]^`{|}~) General: +01Sep08 +ebl Fix the mysql creation script that double-created an + index of the same field on the Media table. + Add an index to on VolumeName to the Media table for mysql. 30Aug08 kes Another try at fixing Vbackup. It looks much better this time. Disable file index sanity check in FD with value stored in