From 62bc9c2e8ec75c85cab7358205691d8d61df7e26 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Sun, 9 Nov 2008 00:53:54 +0000 Subject: Mantis#2591. Thank you kindly, Ruud Lathrop for a patch that: This patch is two script that fixes a issue when adding more then 1 avatar to estateban/estatemanager list. It removes a key and adds a index to the tables. --- OpenSim/Data/MSSQL/Resources/002_EstateStore.sql | 25 ++++++++++++++++++++++++ OpenSim/Data/MSSQL/Resources/003_EstateStore.sql | 25 ++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 OpenSim/Data/MSSQL/Resources/002_EstateStore.sql create mode 100644 OpenSim/Data/MSSQL/Resources/003_EstateStore.sql (limited to 'OpenSim/Data') diff --git a/OpenSim/Data/MSSQL/Resources/002_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/002_EstateStore.sql new file mode 100644 index 0000000..86c5cb6 --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/002_EstateStore.sql @@ -0,0 +1,25 @@ +BEGIN TRANSACTION + +ALTER TABLE dbo.estate_managers DROP CONSTRAINT PK_estate_managers + +CREATE NONCLUSTERED INDEX IX_estate_managers ON dbo.estate_managers + ( + EstateID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +ALTER TABLE dbo.estate_groups DROP CONSTRAINT PK_estate_groups + +CREATE NONCLUSTERED INDEX IX_estate_groups ON dbo.estate_groups + ( + EstateID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + + +ALTER TABLE dbo.estate_users DROP CONSTRAINT PK_estate_users + +CREATE NONCLUSTERED INDEX IX_estate_users ON dbo.estate_users + ( + EstateID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/003_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/003_EstateStore.sql new file mode 100644 index 0000000..7dd0ec8 --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/003_EstateStore.sql @@ -0,0 +1,25 @@ +BEGIN TRANSACTION + +CREATE TABLE dbo.Tmp_estateban + ( + EstateID int NOT NULL, + bannedUUID varchar(36) NOT NULL, + bannedIp varchar(16) NULL, + bannedIpHostMask varchar(16) NULL, + bannedNameMask varchar(64) NULL + ) ON [PRIMARY] + +IF EXISTS(SELECT * FROM dbo.estateban) + EXEC('INSERT INTO dbo.Tmp_estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask) + SELECT EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask FROM dbo.estateban') + +DROP TABLE dbo.estateban + +EXECUTE sp_rename N'dbo.Tmp_estateban', N'estateban', 'OBJECT' + +CREATE NONCLUSTERED INDEX IX_estateban ON dbo.estateban + ( + EstateID + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +COMMIT -- cgit v1.1