From 07609565617aa7936758acba5fd625877564a10d Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Thu, 19 Feb 2009 18:09:10 +0000
Subject: * Apply http://opensimulator.org/mantis/view.php?id=3142 * Changes
 varchar(36) columns to UUID type in MSSQL - this will be much more efficient
 * ===As always, please, please backup your database before applying this
 patch=== * Thanks Ruud Lathrop (for the patch) and StrawberryFride (for the
 review)

---
 OpenSim/Data/MSSQL/Resources/014_RegionStore.sql | 49 ++++++++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 OpenSim/Data/MSSQL/Resources/014_RegionStore.sql

(limited to 'OpenSim/Data/MSSQL/Resources/014_RegionStore.sql')

diff --git a/OpenSim/Data/MSSQL/Resources/014_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/014_RegionStore.sql
new file mode 100644
index 0000000..02f6f55
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/014_RegionStore.sql
@@ -0,0 +1,49 @@
+BEGIN TRANSACTION
+
+CREATE TABLE dbo.Tmp_primshapes
+	(
+	UUID uniqueidentifier NOT NULL,
+	Shape int NULL,
+	ScaleX float(53) NULL,
+	ScaleY float(53) NULL,
+	ScaleZ float(53) NULL,
+	PCode int NULL,
+	PathBegin int NULL,
+	PathEnd int NULL,
+	PathScaleX int NULL,
+	PathScaleY int NULL,
+	PathShearX int NULL,
+	PathShearY int NULL,
+	PathSkew int NULL,
+	PathCurve int NULL,
+	PathRadiusOffset int NULL,
+	PathRevolutions int NULL,
+	PathTaperX int NULL,
+	PathTaperY int NULL,
+	PathTwist int NULL,
+	PathTwistBegin int NULL,
+	ProfileBegin int NULL,
+	ProfileEnd int NULL,
+	ProfileCurve int NULL,
+	ProfileHollow int NULL,
+	State int NULL,
+	Texture image NULL,
+	ExtraParams image NULL
+	)  ON [PRIMARY]
+	 TEXTIMAGE_ON [PRIMARY]
+
+IF EXISTS(SELECT * FROM dbo.primshapes)
+	 EXEC('INSERT INTO dbo.Tmp_primshapes (UUID, Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY, PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin, ProfileEnd, ProfileCurve, ProfileHollow, State, Texture, ExtraParams)
+		SELECT CONVERT(uniqueidentifier, UUID), Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY, PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin, ProfileEnd, ProfileCurve, ProfileHollow, State, Texture, ExtraParams FROM dbo.primshapes WITH (HOLDLOCK TABLOCKX)')
+
+DROP TABLE dbo.primshapes
+
+EXECUTE sp_rename N'dbo.Tmp_primshapes', N'primshapes', 'OBJECT' 
+
+ALTER TABLE dbo.primshapes ADD CONSTRAINT
+	PK__primshapes__0880433F PRIMARY KEY CLUSTERED 
+	(
+	UUID
+	) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+
+COMMIT
-- 
cgit v1.1

