aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL/Resources/014_RegionStore.sql
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-02-19 18:09:10 +0000
committerJustin Clarke Casey2009-02-19 18:09:10 +0000
commit07609565617aa7936758acba5fd625877564a10d (patch)
tree73123e37f14fea5f171cbe04753c21758f25afc1 /OpenSim/Data/MSSQL/Resources/014_RegionStore.sql
parent* Okay, so finally got my head around this. Problem is that upstream Prebuild... (diff)
downloadopensim-SC-07609565617aa7936758acba5fd625877564a10d.zip
opensim-SC-07609565617aa7936758acba5fd625877564a10d.tar.gz
opensim-SC-07609565617aa7936758acba5fd625877564a10d.tar.bz2
opensim-SC-07609565617aa7936758acba5fd625877564a10d.tar.xz
* 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)
Diffstat (limited to 'OpenSim/Data/MSSQL/Resources/014_RegionStore.sql')
-rw-r--r--OpenSim/Data/MSSQL/Resources/014_RegionStore.sql49
1 files changed, 49 insertions, 0 deletions
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 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_primshapes
4 (
5 UUID uniqueidentifier NOT NULL,
6 Shape int NULL,
7 ScaleX float(53) NULL,
8 ScaleY float(53) NULL,
9 ScaleZ float(53) NULL,
10 PCode int NULL,
11 PathBegin int NULL,
12 PathEnd int NULL,
13 PathScaleX int NULL,
14 PathScaleY int NULL,
15 PathShearX int NULL,
16 PathShearY int NULL,
17 PathSkew int NULL,
18 PathCurve int NULL,
19 PathRadiusOffset int NULL,
20 PathRevolutions int NULL,
21 PathTaperX int NULL,
22 PathTaperY int NULL,
23 PathTwist int NULL,
24 PathTwistBegin int NULL,
25 ProfileBegin int NULL,
26 ProfileEnd int NULL,
27 ProfileCurve int NULL,
28 ProfileHollow int NULL,
29 State int NULL,
30 Texture image NULL,
31 ExtraParams image NULL
32 ) ON [PRIMARY]
33 TEXTIMAGE_ON [PRIMARY]
34
35IF EXISTS(SELECT * FROM dbo.primshapes)
36 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)
37 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)')
38
39DROP TABLE dbo.primshapes
40
41EXECUTE sp_rename N'dbo.Tmp_primshapes', N'primshapes', 'OBJECT'
42
43ALTER TABLE dbo.primshapes ADD CONSTRAINT
44 PK__primshapes__0880433F PRIMARY KEY CLUSTERED
45 (
46 UUID
47 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
48
49COMMIT