diff options
Diffstat (limited to 'OpenSim/Data/MSSQL')
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLAssetData.cs | 8 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLPresenceData.cs | 13 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLSimulationData.cs | 33 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Properties/AssemblyInfo.cs | 4 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/RegionStore.migrations | 20 |
5 files changed, 69 insertions, 9 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLAssetData.cs b/OpenSim/Data/MSSQL/MSSQLAssetData.cs index c882555..12f2477 100644 --- a/OpenSim/Data/MSSQL/MSSQLAssetData.cs +++ b/OpenSim/Data/MSSQL/MSSQLAssetData.cs | |||
@@ -163,14 +163,18 @@ namespace OpenSim.Data.MSSQL | |||
163 | if (asset.Name.Length > 64) | 163 | if (asset.Name.Length > 64) |
164 | { | 164 | { |
165 | assetName = asset.Name.Substring(0, 64); | 165 | assetName = asset.Name.Substring(0, 64); |
166 | m_log.Warn("[ASSET DB]: Name field truncated from " + asset.Name.Length + " to " + assetName.Length + " characters on add"); | 166 | m_log.WarnFormat( |
167 | "[ASSET DB]: Name '{0}' for asset {1} truncated from {2} to {3} characters on add", | ||
168 | asset.Name, asset.ID, asset.Name.Length, assetName.Length); | ||
167 | } | 169 | } |
168 | 170 | ||
169 | string assetDescription = asset.Description; | 171 | string assetDescription = asset.Description; |
170 | if (asset.Description.Length > 64) | 172 | if (asset.Description.Length > 64) |
171 | { | 173 | { |
172 | assetDescription = asset.Description.Substring(0, 64); | 174 | assetDescription = asset.Description.Substring(0, 64); |
173 | m_log.Warn("[ASSET DB]: Description field truncated from " + asset.Description.Length + " to " + assetDescription.Length + " characters on add"); | 175 | m_log.WarnFormat( |
176 | "[ASSET DB]: Description '{0}' for asset {1} truncated from {2} to {3} characters on add", | ||
177 | asset.Description, asset.ID, asset.Description.Length, assetDescription.Length); | ||
174 | } | 178 | } |
175 | 179 | ||
176 | using (SqlConnection conn = new SqlConnection(m_connectionString)) | 180 | using (SqlConnection conn = new SqlConnection(m_connectionString)) |
diff --git a/OpenSim/Data/MSSQL/MSSQLPresenceData.cs b/OpenSim/Data/MSSQL/MSSQLPresenceData.cs index e7b3d9c..deff2ed 100644 --- a/OpenSim/Data/MSSQL/MSSQLPresenceData.cs +++ b/OpenSim/Data/MSSQL/MSSQLPresenceData.cs | |||
@@ -100,5 +100,18 @@ namespace OpenSim.Data.MSSQL | |||
100 | return true; | 100 | return true; |
101 | } | 101 | } |
102 | 102 | ||
103 | public bool VerifyAgent(UUID agentId, UUID secureSessionID) | ||
104 | { | ||
105 | PresenceData[] ret = Get("SecureSessionID", | ||
106 | secureSessionID.ToString()); | ||
107 | |||
108 | if (ret.Length == 0) | ||
109 | return false; | ||
110 | |||
111 | if(ret[0].UserID != agentId.ToString()) | ||
112 | return false; | ||
113 | |||
114 | return true; | ||
115 | } | ||
103 | } | 116 | } |
104 | } | 117 | } |
diff --git a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs index 5bb6ec9..00af3a0 100644 --- a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs +++ b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs | |||
@@ -351,7 +351,8 @@ IF EXISTS (SELECT UUID FROM prims WHERE UUID = @UUID) | |||
351 | ScriptAccessPin = @ScriptAccessPin, AllowedDrop = @AllowedDrop, DieAtEdge = @DieAtEdge, SalePrice = @SalePrice, | 351 | ScriptAccessPin = @ScriptAccessPin, AllowedDrop = @AllowedDrop, DieAtEdge = @DieAtEdge, SalePrice = @SalePrice, |
352 | SaleType = @SaleType, ColorR = @ColorR, ColorG = @ColorG, ColorB = @ColorB, ColorA = @ColorA, ParticleSystem = @ParticleSystem, | 352 | SaleType = @SaleType, ColorR = @ColorR, ColorG = @ColorG, ColorB = @ColorB, ColorA = @ColorA, ParticleSystem = @ParticleSystem, |
353 | ClickAction = @ClickAction, Material = @Material, CollisionSound = @CollisionSound, CollisionSoundVolume = @CollisionSoundVolume, PassTouches = @PassTouches, | 353 | ClickAction = @ClickAction, Material = @Material, CollisionSound = @CollisionSound, CollisionSoundVolume = @CollisionSoundVolume, PassTouches = @PassTouches, |
354 | LinkNumber = @LinkNumber, MediaURL = @MediaURL | 354 | LinkNumber = @LinkNumber, MediaURL = @MediaURL, DynAttrs = @DynAttrs, |
355 | PhysicsShapeType = @PhysicsShapeType, Density = @Density, GravityModifier = @GravityModifier, Friction = @Friction, Restitution = @Restitution | ||
355 | WHERE UUID = @UUID | 356 | WHERE UUID = @UUID |
356 | END | 357 | END |
357 | ELSE | 358 | ELSE |
@@ -366,7 +367,8 @@ ELSE | |||
366 | PayPrice, PayButton1, PayButton2, PayButton3, PayButton4, LoopedSound, LoopedSoundGain, TextureAnimation, OmegaX, | 367 | PayPrice, PayButton1, PayButton2, PayButton3, PayButton4, LoopedSound, LoopedSoundGain, TextureAnimation, OmegaX, |
367 | OmegaY, OmegaZ, CameraEyeOffsetX, CameraEyeOffsetY, CameraEyeOffsetZ, CameraAtOffsetX, CameraAtOffsetY, CameraAtOffsetZ, | 368 | OmegaY, OmegaZ, CameraEyeOffsetX, CameraEyeOffsetY, CameraEyeOffsetZ, CameraAtOffsetX, CameraAtOffsetY, CameraAtOffsetZ, |
368 | ForceMouselook, ScriptAccessPin, AllowedDrop, DieAtEdge, SalePrice, SaleType, ColorR, ColorG, ColorB, ColorA, | 369 | ForceMouselook, ScriptAccessPin, AllowedDrop, DieAtEdge, SalePrice, SaleType, ColorR, ColorG, ColorB, ColorA, |
369 | ParticleSystem, ClickAction, Material, CollisionSound, CollisionSoundVolume, PassTouches, LinkNumber, MediaURL | 370 | ParticleSystem, ClickAction, Material, CollisionSound, CollisionSoundVolume, PassTouches, LinkNumber, MediaURL, DynAttrs, |
371 | PhysicsShapeType, Density, GravityModifier, Friction, Restitution | ||
370 | ) VALUES ( | 372 | ) VALUES ( |
371 | @UUID, @CreationDate, @Name, @Text, @Description, @SitName, @TouchName, @ObjectFlags, @OwnerMask, @NextOwnerMask, @GroupMask, | 373 | @UUID, @CreationDate, @Name, @Text, @Description, @SitName, @TouchName, @ObjectFlags, @OwnerMask, @NextOwnerMask, @GroupMask, |
372 | @EveryoneMask, @BaseMask, @PositionX, @PositionY, @PositionZ, @GroupPositionX, @GroupPositionY, @GroupPositionZ, @VelocityX, | 374 | @EveryoneMask, @BaseMask, @PositionX, @PositionY, @PositionZ, @GroupPositionX, @GroupPositionY, @GroupPositionZ, @VelocityX, |
@@ -376,7 +378,8 @@ ELSE | |||
376 | @PayPrice, @PayButton1, @PayButton2, @PayButton3, @PayButton4, @LoopedSound, @LoopedSoundGain, @TextureAnimation, @OmegaX, | 378 | @PayPrice, @PayButton1, @PayButton2, @PayButton3, @PayButton4, @LoopedSound, @LoopedSoundGain, @TextureAnimation, @OmegaX, |
377 | @OmegaY, @OmegaZ, @CameraEyeOffsetX, @CameraEyeOffsetY, @CameraEyeOffsetZ, @CameraAtOffsetX, @CameraAtOffsetY, @CameraAtOffsetZ, | 379 | @OmegaY, @OmegaZ, @CameraEyeOffsetX, @CameraEyeOffsetY, @CameraEyeOffsetZ, @CameraAtOffsetX, @CameraAtOffsetY, @CameraAtOffsetZ, |
378 | @ForceMouselook, @ScriptAccessPin, @AllowedDrop, @DieAtEdge, @SalePrice, @SaleType, @ColorR, @ColorG, @ColorB, @ColorA, | 380 | @ForceMouselook, @ScriptAccessPin, @AllowedDrop, @DieAtEdge, @SalePrice, @SaleType, @ColorR, @ColorG, @ColorB, @ColorA, |
379 | @ParticleSystem, @ClickAction, @Material, @CollisionSound, @CollisionSoundVolume, @PassTouches, @LinkNumber, @MediaURL | 381 | @ParticleSystem, @ClickAction, @Material, @CollisionSound, @CollisionSoundVolume, @PassTouches, @LinkNumber, @MediaURL, @DynAttrs, |
382 | @PhysicsShapeType, @Density, @GravityModifier, @Friction, @Restitution | ||
380 | ) | 383 | ) |
381 | END"; | 384 | END"; |
382 | 385 | ||
@@ -1691,6 +1694,17 @@ VALUES | |||
1691 | 1694 | ||
1692 | if (!(primRow["MediaURL"] is System.DBNull)) | 1695 | if (!(primRow["MediaURL"] is System.DBNull)) |
1693 | prim.MediaUrl = (string)primRow["MediaURL"]; | 1696 | prim.MediaUrl = (string)primRow["MediaURL"]; |
1697 | |||
1698 | if (!(primRow["DynAttrs"] is System.DBNull)) | ||
1699 | prim.DynAttrs = DAMap.FromXml((string)primRow["DynAttrs"]); | ||
1700 | else | ||
1701 | prim.DynAttrs = new DAMap(); | ||
1702 | |||
1703 | prim.PhysicsShapeType = Convert.ToByte(primRow["PhysicsShapeType"]); | ||
1704 | prim.Density = Convert.ToSingle(primRow["Density"]); | ||
1705 | prim.GravityModifier = Convert.ToSingle(primRow["GravityModifier"]); | ||
1706 | prim.Friction = Convert.ToSingle(primRow["Friction"]); | ||
1707 | prim.Restitution = Convert.ToSingle(primRow["Restitution"]); | ||
1694 | 1708 | ||
1695 | return prim; | 1709 | return prim; |
1696 | } | 1710 | } |
@@ -1749,7 +1763,6 @@ VALUES | |||
1749 | baseShape.Media = PrimitiveBaseShape.MediaList.FromXml((string)shapeRow["Media"]); | 1763 | baseShape.Media = PrimitiveBaseShape.MediaList.FromXml((string)shapeRow["Media"]); |
1750 | } | 1764 | } |
1751 | 1765 | ||
1752 | |||
1753 | return baseShape; | 1766 | return baseShape; |
1754 | } | 1767 | } |
1755 | 1768 | ||
@@ -2086,6 +2099,17 @@ VALUES | |||
2086 | parameters.Add(_Database.CreateParameter("PassTouches", 0)); | 2099 | parameters.Add(_Database.CreateParameter("PassTouches", 0)); |
2087 | parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum)); | 2100 | parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum)); |
2088 | parameters.Add(_Database.CreateParameter("MediaURL", prim.MediaUrl)); | 2101 | parameters.Add(_Database.CreateParameter("MediaURL", prim.MediaUrl)); |
2102 | |||
2103 | if (prim.DynAttrs.Count > 0) | ||
2104 | parameters.Add(_Database.CreateParameter("DynAttrs", prim.DynAttrs.ToXml())); | ||
2105 | else | ||
2106 | parameters.Add(_Database.CreateParameter("DynAttrs", null)); | ||
2107 | |||
2108 | parameters.Add(_Database.CreateParameter("PhysicsShapeType", prim.PhysicsShapeType)); | ||
2109 | parameters.Add(_Database.CreateParameter("Density", (double)prim.Density)); | ||
2110 | parameters.Add(_Database.CreateParameter("GravityModifier", (double)prim.GravityModifier)); | ||
2111 | parameters.Add(_Database.CreateParameter("Friction", (double)prim.Friction)); | ||
2112 | parameters.Add(_Database.CreateParameter("Restitution", (double)prim.Restitution)); | ||
2089 | 2113 | ||
2090 | return parameters.ToArray(); | 2114 | return parameters.ToArray(); |
2091 | } | 2115 | } |
@@ -2143,7 +2167,6 @@ VALUES | |||
2143 | parameters.Add(_Database.CreateParameter("Media", s.Media.ToXml())); | 2167 | parameters.Add(_Database.CreateParameter("Media", s.Media.ToXml())); |
2144 | } | 2168 | } |
2145 | 2169 | ||
2146 | |||
2147 | return parameters.ToArray(); | 2170 | return parameters.ToArray(); |
2148 | } | 2171 | } |
2149 | 2172 | ||
diff --git a/OpenSim/Data/MSSQL/Properties/AssemblyInfo.cs b/OpenSim/Data/MSSQL/Properties/AssemblyInfo.cs index 1a67e70..9bc580e 100644 --- a/OpenSim/Data/MSSQL/Properties/AssemblyInfo.cs +++ b/OpenSim/Data/MSSQL/Properties/AssemblyInfo.cs | |||
@@ -61,5 +61,5 @@ using System.Runtime.InteropServices; | |||
61 | // You can specify all the values or you can default the Revision and Build Numbers | 61 | // You can specify all the values or you can default the Revision and Build Numbers |
62 | // by using the '*' as shown below: | 62 | // by using the '*' as shown below: |
63 | 63 | ||
64 | [assembly : AssemblyVersion("0.7.5.*")] | 64 | [assembly : AssemblyVersion("0.7.6.*")] |
65 | [assembly : AssemblyFileVersion("0.6.5.0")] | 65 | |
diff --git a/OpenSim/Data/MSSQL/Resources/RegionStore.migrations b/OpenSim/Data/MSSQL/Resources/RegionStore.migrations index 350e548..b84c2a4 100644 --- a/OpenSim/Data/MSSQL/Resources/RegionStore.migrations +++ b/OpenSim/Data/MSSQL/Resources/RegionStore.migrations | |||
@@ -1148,3 +1148,23 @@ CREATE TABLE [dbo].[regionenvironment]( | |||
1148 | ) ON [PRIMARY] | 1148 | ) ON [PRIMARY] |
1149 | 1149 | ||
1150 | COMMIT | 1150 | COMMIT |
1151 | |||
1152 | :VERSION 38 #---------------- Dynamic attributes | ||
1153 | |||
1154 | BEGIN TRANSACTION | ||
1155 | |||
1156 | ALTER TABLE prims ADD COLUMN DynAttrs TEXT; | ||
1157 | |||
1158 | COMMIT | ||
1159 | |||
1160 | :VERSION 39 #---------------- Extra physics params | ||
1161 | |||
1162 | BEGIN TRANSACTION | ||
1163 | |||
1164 | ALTER TABLE prims ADD COLUMN `PhysicsShapeType` tinyint(4) NOT NULL default '0'; | ||
1165 | ALTER TABLE prims ADD COLUMN `Density` double NOT NULL default '1000'; | ||
1166 | ALTER TABLE prims ADD COLUMN `GravityModifier` double NOT NULL default '1'; | ||
1167 | ALTER TABLE prims ADD COLUMN `Friction` double NOT NULL default '0.6'; | ||
1168 | ALTER TABLE prims ADD COLUMN `Restitution` double NOT NULL default '0.5'; | ||
1169 | |||
1170 | COMMIT | ||