aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/PGSQL/PGSQLSimulationData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/PGSQL/PGSQLSimulationData.cs')
-rwxr-xr-xOpenSim/Data/PGSQL/PGSQLSimulationData.cs156
1 files changed, 78 insertions, 78 deletions
diff --git a/OpenSim/Data/PGSQL/PGSQLSimulationData.cs b/OpenSim/Data/PGSQL/PGSQLSimulationData.cs
index 902aae0..33d12bd 100755
--- a/OpenSim/Data/PGSQL/PGSQLSimulationData.cs
+++ b/OpenSim/Data/PGSQL/PGSQLSimulationData.cs
@@ -110,11 +110,11 @@ namespace OpenSim.Data.PGSQL
110 Dictionary<UUID, SceneObjectGroup> objects = new Dictionary<UUID, SceneObjectGroup>(); 110 Dictionary<UUID, SceneObjectGroup> objects = new Dictionary<UUID, SceneObjectGroup>();
111 SceneObjectGroup grp = null; 111 SceneObjectGroup grp = null;
112 112
113 string sql = @"SELECT *, 113 string sql = @"SELECT *,
114 CASE WHEN prims.""UUID"" = prims.""SceneGroupID"" THEN 0 ELSE 1 END as sort 114 CASE WHEN prims.""UUID"" = prims.""SceneGroupID"" THEN 0 ELSE 1 END as sort
115 FROM prims 115 FROM prims
116 LEFT JOIN primshapes ON prims.""UUID"" = primshapes.""UUID"" 116 LEFT JOIN primshapes ON prims.""UUID"" = primshapes.""UUID""
117 WHERE ""RegionUUID"" = :RegionUUID 117 WHERE ""RegionUUID"" = :RegionUUID
118 ORDER BY ""SceneGroupID"" asc, sort asc, ""LinkNumber"" asc"; 118 ORDER BY ""SceneGroupID"" asc, sort asc, ""LinkNumber"" asc";
119 119
120 using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString)) 120 using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString))
@@ -146,7 +146,7 @@ namespace OpenSim.Data.PGSQL
146 // There sometimes exist OpenSim bugs that 'orphan groups' so that none of the prims are 146 // There sometimes exist OpenSim bugs that 'orphan groups' so that none of the prims are
147 // recorded as the root prim (for which the UUID must equal the persisted group UUID). In 147 // recorded as the root prim (for which the UUID must equal the persisted group UUID). In
148 // this case, force the UUID to be the same as the group UUID so that at least these can be 148 // this case, force the UUID to be the same as the group UUID so that at least these can be
149 // deleted (we need to change the UUID so that any other prims in the linkset can also be 149 // deleted (we need to change the UUID so that any other prims in the linkset can also be
150 // deleted). 150 // deleted).
151 if (sceneObjectPart.UUID != groupID && groupID != UUID.Zero) 151 if (sceneObjectPart.UUID != groupID && groupID != UUID.Zero)
152 { 152 {
@@ -178,7 +178,7 @@ namespace OpenSim.Data.PGSQL
178 objects[grp.UUID] = grp; 178 objects[grp.UUID] = grp;
179 179
180 // Instead of attempting to LoadItems on every prim, 180 // Instead of attempting to LoadItems on every prim,
181 // most of which probably have no items... get a 181 // most of which probably have no items... get a
182 // list from DB of all prims which have items and 182 // list from DB of all prims which have items and
183 // LoadItems only on those 183 // LoadItems only on those
184 List<SceneObjectPart> primsWithInventory = new List<SceneObjectPart>(); 184 List<SceneObjectPart> primsWithInventory = new List<SceneObjectPart>();
@@ -331,52 +331,52 @@ namespace OpenSim.Data.PGSQL
331 private void StoreSceneObjectPrim(SceneObjectPart sceneObjectPart, NpgsqlCommand sqlCommand, UUID sceneGroupID, UUID regionUUID) 331 private void StoreSceneObjectPrim(SceneObjectPart sceneObjectPart, NpgsqlCommand sqlCommand, UUID sceneGroupID, UUID regionUUID)
332 { 332 {
333 //Big query to update or insert a new prim. 333 //Big query to update or insert a new prim.
334 334
335 string queryPrims = @" 335 string queryPrims = @"
336 UPDATE prims SET 336 UPDATE prims SET
337 ""CreationDate"" = :CreationDate, ""Name"" = :Name, ""Text"" = :Text, ""Description"" = :Description, ""SitName"" = :SitName, 337 ""CreationDate"" = :CreationDate, ""Name"" = :Name, ""Text"" = :Text, ""Description"" = :Description, ""SitName"" = :SitName,
338 ""TouchName"" = :TouchName, ""ObjectFlags"" = :ObjectFlags, ""OwnerMask"" = :OwnerMask, ""NextOwnerMask"" = :NextOwnerMask, ""GroupMask"" = :GroupMask, 338 ""TouchName"" = :TouchName, ""ObjectFlags"" = :ObjectFlags, ""OwnerMask"" = :OwnerMask, ""NextOwnerMask"" = :NextOwnerMask, ""GroupMask"" = :GroupMask,
339 ""EveryoneMask"" = :EveryoneMask, ""BaseMask"" = :BaseMask, ""PositionX"" = :PositionX, ""PositionY"" = :PositionY, ""PositionZ"" = :PositionZ, 339 ""EveryoneMask"" = :EveryoneMask, ""BaseMask"" = :BaseMask, ""PositionX"" = :PositionX, ""PositionY"" = :PositionY, ""PositionZ"" = :PositionZ,
340 ""GroupPositionX"" = :GroupPositionX, ""GroupPositionY"" = :GroupPositionY, ""GroupPositionZ"" = :GroupPositionZ, ""VelocityX"" = :VelocityX, 340 ""GroupPositionX"" = :GroupPositionX, ""GroupPositionY"" = :GroupPositionY, ""GroupPositionZ"" = :GroupPositionZ, ""VelocityX"" = :VelocityX,
341 ""VelocityY"" = :VelocityY, ""VelocityZ"" = :VelocityZ, ""AngularVelocityX"" = :AngularVelocityX, ""AngularVelocityY"" = :AngularVelocityY, 341 ""VelocityY"" = :VelocityY, ""VelocityZ"" = :VelocityZ, ""AngularVelocityX"" = :AngularVelocityX, ""AngularVelocityY"" = :AngularVelocityY,
342 ""AngularVelocityZ"" = :AngularVelocityZ, ""AccelerationX"" = :AccelerationX, ""AccelerationY"" = :AccelerationY, 342 ""AngularVelocityZ"" = :AngularVelocityZ, ""AccelerationX"" = :AccelerationX, ""AccelerationY"" = :AccelerationY,
343 ""AccelerationZ"" = :AccelerationZ, ""RotationX"" = :RotationX, ""RotationY"" = :RotationY, ""RotationZ"" = :RotationZ, ""RotationW"" = :RotationW, 343 ""AccelerationZ"" = :AccelerationZ, ""RotationX"" = :RotationX, ""RotationY"" = :RotationY, ""RotationZ"" = :RotationZ, ""RotationW"" = :RotationW,
344 ""SitTargetOffsetX"" = :SitTargetOffsetX, ""SitTargetOffsetY"" = :SitTargetOffsetY, ""SitTargetOffsetZ"" = :SitTargetOffsetZ, 344 ""SitTargetOffsetX"" = :SitTargetOffsetX, ""SitTargetOffsetY"" = :SitTargetOffsetY, ""SitTargetOffsetZ"" = :SitTargetOffsetZ,
345 ""SitTargetOrientW"" = :SitTargetOrientW, ""SitTargetOrientX"" = :SitTargetOrientX, ""SitTargetOrientY"" = :SitTargetOrientY, 345 ""SitTargetOrientW"" = :SitTargetOrientW, ""SitTargetOrientX"" = :SitTargetOrientX, ""SitTargetOrientY"" = :SitTargetOrientY,
346 ""SitTargetOrientZ"" = :SitTargetOrientZ, ""RegionUUID"" = :RegionUUID, ""CreatorID"" = :CreatorID, ""OwnerID"" = :OwnerID, ""GroupID"" = :GroupID, 346 ""SitTargetOrientZ"" = :SitTargetOrientZ, ""RegionUUID"" = :RegionUUID, ""CreatorID"" = :CreatorID, ""OwnerID"" = :OwnerID, ""GroupID"" = :GroupID,
347 ""LastOwnerID"" = :LastOwnerID, ""SceneGroupID"" = :SceneGroupID, ""PayPrice"" = :PayPrice, ""PayButton1"" = :PayButton1, ""PayButton2"" = :PayButton2, 347 ""LastOwnerID"" = :LastOwnerID, ""SceneGroupID"" = :SceneGroupID, ""PayPrice"" = :PayPrice, ""PayButton1"" = :PayButton1, ""PayButton2"" = :PayButton2,
348 ""PayButton3"" = :PayButton3, ""PayButton4"" = :PayButton4, ""LoopedSound"" = :LoopedSound, ""LoopedSoundGain"" = :LoopedSoundGain, 348 ""PayButton3"" = :PayButton3, ""PayButton4"" = :PayButton4, ""LoopedSound"" = :LoopedSound, ""LoopedSoundGain"" = :LoopedSoundGain,
349 ""TextureAnimation"" = :TextureAnimation, ""OmegaX"" = :OmegaX, ""OmegaY"" = :OmegaY, ""OmegaZ"" = :OmegaZ, ""CameraEyeOffsetX"" = :CameraEyeOffsetX, 349 ""TextureAnimation"" = :TextureAnimation, ""OmegaX"" = :OmegaX, ""OmegaY"" = :OmegaY, ""OmegaZ"" = :OmegaZ, ""CameraEyeOffsetX"" = :CameraEyeOffsetX,
350 ""CameraEyeOffsetY"" = :CameraEyeOffsetY, ""CameraEyeOffsetZ"" = :CameraEyeOffsetZ, ""CameraAtOffsetX"" = :CameraAtOffsetX, 350 ""CameraEyeOffsetY"" = :CameraEyeOffsetY, ""CameraEyeOffsetZ"" = :CameraEyeOffsetZ, ""CameraAtOffsetX"" = :CameraAtOffsetX,
351 ""CameraAtOffsetY"" = :CameraAtOffsetY, ""CameraAtOffsetZ"" = :CameraAtOffsetZ, ""ForceMouselook"" = :ForceMouselook, 351 ""CameraAtOffsetY"" = :CameraAtOffsetY, ""CameraAtOffsetZ"" = :CameraAtOffsetZ, ""ForceMouselook"" = :ForceMouselook,
352 ""ScriptAccessPin"" = :ScriptAccessPin, ""AllowedDrop"" = :AllowedDrop, ""DieAtEdge"" = :DieAtEdge, ""SalePrice"" = :SalePrice, 352 ""ScriptAccessPin"" = :ScriptAccessPin, ""AllowedDrop"" = :AllowedDrop, ""DieAtEdge"" = :DieAtEdge, ""SalePrice"" = :SalePrice,
353 ""SaleType"" = :SaleType, ""ColorR"" = :ColorR, ""ColorG"" = :ColorG, ""ColorB"" = :ColorB, ""ColorA"" = :ColorA, ""ParticleSystem"" = :ParticleSystem, 353 ""SaleType"" = :SaleType, ""ColorR"" = :ColorR, ""ColorG"" = :ColorG, ""ColorB"" = :ColorB, ""ColorA"" = :ColorA, ""ParticleSystem"" = :ParticleSystem,
354 ""ClickAction"" = :ClickAction, ""Material"" = :Material, ""CollisionSound"" = :CollisionSound, ""CollisionSoundVolume"" = :CollisionSoundVolume, ""PassTouches"" = :PassTouches, 354 ""ClickAction"" = :ClickAction, ""Material"" = :Material, ""CollisionSound"" = :CollisionSound, ""CollisionSoundVolume"" = :CollisionSoundVolume, ""PassTouches"" = :PassTouches,
355 ""LinkNumber"" = :LinkNumber, ""MediaURL"" = :MediaURL, ""DynAttrs"" = :DynAttrs, 355 ""LinkNumber"" = :LinkNumber, ""MediaURL"" = :MediaURL, ""DynAttrs"" = :DynAttrs,
356 ""PhysicsShapeType"" = :PhysicsShapeType, ""Density"" = :Density, ""GravityModifier"" = :GravityModifier, ""Friction"" = :Friction, ""Restitution"" = :Restitution 356 ""PhysicsShapeType"" = :PhysicsShapeType, ""Density"" = :Density, ""GravityModifier"" = :GravityModifier, ""Friction"" = :Friction, ""Restitution"" = :Restitution
357 WHERE ""UUID"" = :UUID ; 357 WHERE ""UUID"" = :UUID ;
358 358
359 INSERT INTO 359 INSERT INTO
360 prims ( 360 prims (
361 ""UUID"", ""CreationDate"", ""Name"", ""Text"", ""Description"", ""SitName"", ""TouchName"", ""ObjectFlags"", ""OwnerMask"", ""NextOwnerMask"", ""GroupMask"", 361 ""UUID"", ""CreationDate"", ""Name"", ""Text"", ""Description"", ""SitName"", ""TouchName"", ""ObjectFlags"", ""OwnerMask"", ""NextOwnerMask"", ""GroupMask"",
362 ""EveryoneMask"", ""BaseMask"", ""PositionX"", ""PositionY"", ""PositionZ"", ""GroupPositionX"", ""GroupPositionY"", ""GroupPositionZ"", ""VelocityX"", 362 ""EveryoneMask"", ""BaseMask"", ""PositionX"", ""PositionY"", ""PositionZ"", ""GroupPositionX"", ""GroupPositionY"", ""GroupPositionZ"", ""VelocityX"",
363 ""VelocityY"", ""VelocityZ"", ""AngularVelocityX"", ""AngularVelocityY"", ""AngularVelocityZ"", ""AccelerationX"", ""AccelerationY"", ""AccelerationZ"", 363 ""VelocityY"", ""VelocityZ"", ""AngularVelocityX"", ""AngularVelocityY"", ""AngularVelocityZ"", ""AccelerationX"", ""AccelerationY"", ""AccelerationZ"",
364 ""RotationX"", ""RotationY"", ""RotationZ"", ""RotationW"", ""SitTargetOffsetX"", ""SitTargetOffsetY"", ""SitTargetOffsetZ"", ""SitTargetOrientW"", 364 ""RotationX"", ""RotationY"", ""RotationZ"", ""RotationW"", ""SitTargetOffsetX"", ""SitTargetOffsetY"", ""SitTargetOffsetZ"", ""SitTargetOrientW"",
365 ""SitTargetOrientX"", ""SitTargetOrientY"", ""SitTargetOrientZ"", ""RegionUUID"", ""CreatorID"", ""OwnerID"", ""GroupID"", ""LastOwnerID"", ""SceneGroupID"", 365 ""SitTargetOrientX"", ""SitTargetOrientY"", ""SitTargetOrientZ"", ""RegionUUID"", ""CreatorID"", ""OwnerID"", ""GroupID"", ""LastOwnerID"", ""SceneGroupID"",
366 ""PayPrice"", ""PayButton1"", ""PayButton2"", ""PayButton3"", ""PayButton4"", ""LoopedSound"", ""LoopedSoundGain"", ""TextureAnimation"", ""OmegaX"", 366 ""PayPrice"", ""PayButton1"", ""PayButton2"", ""PayButton3"", ""PayButton4"", ""LoopedSound"", ""LoopedSoundGain"", ""TextureAnimation"", ""OmegaX"",
367 ""OmegaY"", ""OmegaZ"", ""CameraEyeOffsetX"", ""CameraEyeOffsetY"", ""CameraEyeOffsetZ"", ""CameraAtOffsetX"", ""CameraAtOffsetY"", ""CameraAtOffsetZ"", 367 ""OmegaY"", ""OmegaZ"", ""CameraEyeOffsetX"", ""CameraEyeOffsetY"", ""CameraEyeOffsetZ"", ""CameraAtOffsetX"", ""CameraAtOffsetY"", ""CameraAtOffsetZ"",
368 ""ForceMouselook"", ""ScriptAccessPin"", ""AllowedDrop"", ""DieAtEdge"", ""SalePrice"", ""SaleType"", ""ColorR"", ""ColorG"", ""ColorB"", ""ColorA"", 368 ""ForceMouselook"", ""ScriptAccessPin"", ""AllowedDrop"", ""DieAtEdge"", ""SalePrice"", ""SaleType"", ""ColorR"", ""ColorG"", ""ColorB"", ""ColorA"",
369 ""ParticleSystem"", ""ClickAction"", ""Material"", ""CollisionSound"", ""CollisionSoundVolume"", ""PassTouches"", ""LinkNumber"", ""MediaURL"", ""DynAttrs"", 369 ""ParticleSystem"", ""ClickAction"", ""Material"", ""CollisionSound"", ""CollisionSoundVolume"", ""PassTouches"", ""LinkNumber"", ""MediaURL"", ""DynAttrs"",
370 ""PhysicsShapeType"", ""Density"", ""GravityModifier"", ""Friction"", ""Restitution"" 370 ""PhysicsShapeType"", ""Density"", ""GravityModifier"", ""Friction"", ""Restitution""
371 ) Select 371 ) Select
372 :UUID, :CreationDate, :Name, :Text, :Description, :SitName, :TouchName, :ObjectFlags, :OwnerMask, :NextOwnerMask, :GroupMask, 372 :UUID, :CreationDate, :Name, :Text, :Description, :SitName, :TouchName, :ObjectFlags, :OwnerMask, :NextOwnerMask, :GroupMask,
373 :EveryoneMask, :BaseMask, :PositionX, :PositionY, :PositionZ, :GroupPositionX, :GroupPositionY, :GroupPositionZ, :VelocityX, 373 :EveryoneMask, :BaseMask, :PositionX, :PositionY, :PositionZ, :GroupPositionX, :GroupPositionY, :GroupPositionZ, :VelocityX,
374 :VelocityY, :VelocityZ, :AngularVelocityX, :AngularVelocityY, :AngularVelocityZ, :AccelerationX, :AccelerationY, :AccelerationZ, 374 :VelocityY, :VelocityZ, :AngularVelocityX, :AngularVelocityY, :AngularVelocityZ, :AccelerationX, :AccelerationY, :AccelerationZ,
375 :RotationX, :RotationY, :RotationZ, :RotationW, :SitTargetOffsetX, :SitTargetOffsetY, :SitTargetOffsetZ, :SitTargetOrientW, 375 :RotationX, :RotationY, :RotationZ, :RotationW, :SitTargetOffsetX, :SitTargetOffsetY, :SitTargetOffsetZ, :SitTargetOrientW,
376 :SitTargetOrientX, :SitTargetOrientY, :SitTargetOrientZ, :RegionUUID, :CreatorID, :OwnerID, :GroupID, :LastOwnerID, :SceneGroupID, 376 :SitTargetOrientX, :SitTargetOrientY, :SitTargetOrientZ, :RegionUUID, :CreatorID, :OwnerID, :GroupID, :LastOwnerID, :SceneGroupID,
377 :PayPrice, :PayButton1, :PayButton2, :PayButton3, :PayButton4, :LoopedSound, :LoopedSoundGain, :TextureAnimation, :OmegaX, 377 :PayPrice, :PayButton1, :PayButton2, :PayButton3, :PayButton4, :LoopedSound, :LoopedSoundGain, :TextureAnimation, :OmegaX,
378 :OmegaY, :OmegaZ, :CameraEyeOffsetX, :CameraEyeOffsetY, :CameraEyeOffsetZ, :CameraAtOffsetX, :CameraAtOffsetY, :CameraAtOffsetZ, 378 :OmegaY, :OmegaZ, :CameraEyeOffsetX, :CameraEyeOffsetY, :CameraEyeOffsetZ, :CameraAtOffsetX, :CameraAtOffsetY, :CameraAtOffsetZ,
379 :ForceMouselook, :ScriptAccessPin, :AllowedDrop, :DieAtEdge, :SalePrice, :SaleType, :ColorR, :ColorG, :ColorB, :ColorA, 379 :ForceMouselook, :ScriptAccessPin, :AllowedDrop, :DieAtEdge, :SalePrice, :SaleType, :ColorR, :ColorG, :ColorB, :ColorA,
380 :ParticleSystem, :ClickAction, :Material, :CollisionSound, :CollisionSoundVolume, :PassTouches, :LinkNumber, :MediaURL, :DynAttrs, 380 :ParticleSystem, :ClickAction, :Material, :CollisionSound, :CollisionSoundVolume, :PassTouches, :LinkNumber, :MediaURL, :DynAttrs,
381 :PhysicsShapeType, :Density, :GravityModifier, :Friction, :Restitution 381 :PhysicsShapeType, :Density, :GravityModifier, :Friction, :Restitution
382 where not EXISTS (SELECT ""UUID"" FROM prims WHERE ""UUID"" = :UUID); 382 where not EXISTS (SELECT ""UUID"" FROM prims WHERE ""UUID"" = :UUID);
@@ -401,26 +401,26 @@ namespace OpenSim.Data.PGSQL
401 private void StoreSceneObjectPrimShapes(SceneObjectPart sceneObjectPart, NpgsqlCommand sqlCommand, UUID sceneGroupID, UUID regionUUID) 401 private void StoreSceneObjectPrimShapes(SceneObjectPart sceneObjectPart, NpgsqlCommand sqlCommand, UUID sceneGroupID, UUID regionUUID)
402 { 402 {
403 //Big query to or insert or update primshapes 403 //Big query to or insert or update primshapes
404 404
405 string queryPrimShapes = @" 405 string queryPrimShapes = @"
406 UPDATE primshapes SET 406 UPDATE primshapes SET
407 ""Shape"" = :Shape, ""ScaleX"" = :ScaleX, ""ScaleY"" = :ScaleY, ""ScaleZ"" = :ScaleZ, ""PCode"" = :PCode, ""PathBegin"" = :PathBegin, 407 ""Shape"" = :Shape, ""ScaleX"" = :ScaleX, ""ScaleY"" = :ScaleY, ""ScaleZ"" = :ScaleZ, ""PCode"" = :PCode, ""PathBegin"" = :PathBegin,
408 ""PathEnd"" = :PathEnd, ""PathScaleX"" = :PathScaleX, ""PathScaleY"" = :PathScaleY, ""PathShearX"" = :PathShearX, ""PathShearY"" = :PathShearY, 408 ""PathEnd"" = :PathEnd, ""PathScaleX"" = :PathScaleX, ""PathScaleY"" = :PathScaleY, ""PathShearX"" = :PathShearX, ""PathShearY"" = :PathShearY,
409 ""PathSkew"" = :PathSkew, ""PathCurve"" = :PathCurve, ""PathRadiusOffset"" = :PathRadiusOffset, ""PathRevolutions"" = :PathRevolutions, 409 ""PathSkew"" = :PathSkew, ""PathCurve"" = :PathCurve, ""PathRadiusOffset"" = :PathRadiusOffset, ""PathRevolutions"" = :PathRevolutions,
410 ""PathTaperX"" = :PathTaperX, ""PathTaperY"" = :PathTaperY, ""PathTwist"" = :PathTwist, ""PathTwistBegin"" = :PathTwistBegin, 410 ""PathTaperX"" = :PathTaperX, ""PathTaperY"" = :PathTaperY, ""PathTwist"" = :PathTwist, ""PathTwistBegin"" = :PathTwistBegin,
411 ""ProfileBegin"" = :ProfileBegin, ""ProfileEnd"" = :ProfileEnd, ""ProfileCurve"" = :ProfileCurve, ""ProfileHollow"" = :ProfileHollow, 411 ""ProfileBegin"" = :ProfileBegin, ""ProfileEnd"" = :ProfileEnd, ""ProfileCurve"" = :ProfileCurve, ""ProfileHollow"" = :ProfileHollow,
412 ""Texture"" = :Texture, ""ExtraParams"" = :ExtraParams, ""State"" = :State, ""Media"" = :Media 412 ""Texture"" = :Texture, ""ExtraParams"" = :ExtraParams, ""State"" = :State, ""Media"" = :Media
413 WHERE ""UUID"" = :UUID ; 413 WHERE ""UUID"" = :UUID ;
414 414
415 INSERT INTO 415 INSERT INTO
416 primshapes ( 416 primshapes (
417 ""UUID"", ""Shape"", ""ScaleX"", ""ScaleY"", ""ScaleZ"", ""PCode"", ""PathBegin"", ""PathEnd"", ""PathScaleX"", ""PathScaleY"", ""PathShearX"", ""PathShearY"", 417 ""UUID"", ""Shape"", ""ScaleX"", ""ScaleY"", ""ScaleZ"", ""PCode"", ""PathBegin"", ""PathEnd"", ""PathScaleX"", ""PathScaleY"", ""PathShearX"", ""PathShearY"",
418 ""PathSkew"", ""PathCurve"", ""PathRadiusOffset"", ""PathRevolutions"", ""PathTaperX"", ""PathTaperY"", ""PathTwist"", ""PathTwistBegin"", ""ProfileBegin"", 418 ""PathSkew"", ""PathCurve"", ""PathRadiusOffset"", ""PathRevolutions"", ""PathTaperX"", ""PathTaperY"", ""PathTwist"", ""PathTwistBegin"", ""ProfileBegin"",
419 ""ProfileEnd"", ""ProfileCurve"", ""ProfileHollow"", ""Texture"", ""ExtraParams"", ""State"", ""Media"" 419 ""ProfileEnd"", ""ProfileCurve"", ""ProfileHollow"", ""Texture"", ""ExtraParams"", ""State"", ""Media""
420 ) 420 )
421 Select 421 Select
422 :UUID, :Shape, :ScaleX, :ScaleY, :ScaleZ, :PCode, :PathBegin, :PathEnd, :PathScaleX, :PathScaleY, :PathShearX, :PathShearY, 422 :UUID, :Shape, :ScaleX, :ScaleY, :ScaleZ, :PCode, :PathBegin, :PathEnd, :PathScaleX, :PathScaleY, :PathShearX, :PathShearY,
423 :PathSkew, :PathCurve, :PathRadiusOffset, :PathRevolutions, :PathTaperX, :PathTaperY, :PathTwist, :PathTwistBegin, :ProfileBegin, 423 :PathSkew, :PathCurve, :PathRadiusOffset, :PathRevolutions, :PathTaperX, :PathTaperY, :PathTwist, :PathTwistBegin, :ProfileBegin,
424 :ProfileEnd, :ProfileCurve, :ProfileHollow, :Texture, :ExtraParams, :State, :Media 424 :ProfileEnd, :ProfileCurve, :ProfileHollow, :Texture, :ExtraParams, :State, :Media
425 where not EXISTS (SELECT ""UUID"" FROM primshapes WHERE ""UUID"" = :UUID); 425 where not EXISTS (SELECT ""UUID"" FROM primshapes WHERE ""UUID"" = :UUID);
426 "; 426 ";
@@ -500,7 +500,7 @@ namespace OpenSim.Data.PGSQL
500 sql = 500 sql =
501 @"INSERT INTO primitems ( 501 @"INSERT INTO primitems (
502 ""itemID"",""primID"",""assetID"",""parentFolderID"",""invType"",""assetType"",""name"",""description"",""creationDate"",""creatorID"",""ownerID"",""lastOwnerID"",""groupID"", 502 ""itemID"",""primID"",""assetID"",""parentFolderID"",""invType"",""assetType"",""name"",""description"",""creationDate"",""creatorID"",""ownerID"",""lastOwnerID"",""groupID"",
503 ""nextPermissions"",""currentPermissions"",""basePermissions"",""everyonePermissions"",""groupPermissions"",""flags"") 503 ""nextPermissions"",""currentPermissions"",""basePermissions"",""everyonePermissions"",""groupPermissions"",""flags"")
504 VALUES (:itemID,:primID,:assetID,:parentFolderID,:invType,:assetType,:name,:description,:creationDate,:creatorID,:ownerID, 504 VALUES (:itemID,:primID,:assetID,:parentFolderID,:invType,:assetType,:name,:description,:creationDate,:creatorID,:ownerID,
505 :lastOwnerID,:groupID,:nextPermissions,:currentPermissions,:basePermissions,:everyonePermissions,:groupPermissions,:flags)"; 505 :lastOwnerID,:groupID,:nextPermissions,:currentPermissions,:basePermissions,:everyonePermissions,:groupPermissions,:flags)";
506 506
@@ -538,7 +538,7 @@ namespace OpenSim.Data.PGSQL
538 { 538 {
539 TerrainData terrData = null; 539 TerrainData terrData = null;
540 540
541 string sql = @"select ""RegionUUID"", ""Revision"", ""Heightfield"" from terrain 541 string sql = @"select ""RegionUUID"", ""Revision"", ""Heightfield"" from terrain
542 where ""RegionUUID"" = :RegionUUID order by ""Revision"" desc limit 1; "; 542 where ""RegionUUID"" = :RegionUUID order by ""Revision"" desc limit 1; ";
543 543
544 using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString)) 544 using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString))
@@ -577,7 +577,7 @@ namespace OpenSim.Data.PGSQL
577 { 577 {
578 TerrainData terrData = null; 578 TerrainData terrData = null;
579 579
580 string sql = @"select ""RegionUUID"", ""Revision"", ""Heightfield"" from bakedterrain 580 string sql = @"select ""RegionUUID"", ""Revision"", ""Heightfield"" from bakedterrain
581 where ""RegionUUID"" = :RegionUUID; "; 581 where ""RegionUUID"" = :RegionUUID; ";
582 582
583 using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString)) 583 using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString))
@@ -1319,7 +1319,7 @@ namespace OpenSim.Data.PGSQL
1319 { 1319 {
1320 { 1320 {
1321 string sql = "DELETE FROM regionenvironment WHERE region_id = :region_id ;"; 1321 string sql = "DELETE FROM regionenvironment WHERE region_id = :region_id ;";
1322 1322
1323 using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString)) 1323 using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString))
1324 using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn)) 1324 using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn))
1325 { 1325 {
@@ -1420,17 +1420,17 @@ namespace OpenSim.Data.PGSQL
1420 { 1420 {
1421 //This method only updates region settings!!! First call LoadRegionSettings to create new region settings in DB 1421 //This method only updates region settings!!! First call LoadRegionSettings to create new region settings in DB
1422 sql = 1422 sql =
1423 @"UPDATE regionsettings SET block_terraform = :block_terraform ,block_fly = :block_fly ,allow_damage = :allow_damage 1423 @"UPDATE regionsettings SET block_terraform = :block_terraform ,block_fly = :block_fly ,allow_damage = :allow_damage
1424,restrict_pushing = :restrict_pushing ,allow_land_resell = :allow_land_resell ,allow_land_join_divide = :allow_land_join_divide 1424,restrict_pushing = :restrict_pushing ,allow_land_resell = :allow_land_resell ,allow_land_join_divide = :allow_land_join_divide
1425,block_show_in_search = :block_show_in_search ,agent_limit = :agent_limit ,object_bonus = :object_bonus ,maturity = :maturity 1425,block_show_in_search = :block_show_in_search ,agent_limit = :agent_limit ,object_bonus = :object_bonus ,maturity = :maturity
1426,disable_scripts = :disable_scripts ,disable_collisions = :disable_collisions ,disable_physics = :disable_physics 1426,disable_scripts = :disable_scripts ,disable_collisions = :disable_collisions ,disable_physics = :disable_physics
1427,terrain_texture_1 = :terrain_texture_1 ,terrain_texture_2 = :terrain_texture_2 ,terrain_texture_3 = :terrain_texture_3 1427,terrain_texture_1 = :terrain_texture_1 ,terrain_texture_2 = :terrain_texture_2 ,terrain_texture_3 = :terrain_texture_3
1428,terrain_texture_4 = :terrain_texture_4 ,elevation_1_nw = :elevation_1_nw ,elevation_2_nw = :elevation_2_nw 1428,terrain_texture_4 = :terrain_texture_4 ,elevation_1_nw = :elevation_1_nw ,elevation_2_nw = :elevation_2_nw
1429,elevation_1_ne = :elevation_1_ne ,elevation_2_ne = :elevation_2_ne ,elevation_1_se = :elevation_1_se ,elevation_2_se = :elevation_2_se 1429,elevation_1_ne = :elevation_1_ne ,elevation_2_ne = :elevation_2_ne ,elevation_1_se = :elevation_1_se ,elevation_2_se = :elevation_2_se
1430,elevation_1_sw = :elevation_1_sw ,elevation_2_sw = :elevation_2_sw ,water_height = :water_height ,terrain_raise_limit = :terrain_raise_limit 1430,elevation_1_sw = :elevation_1_sw ,elevation_2_sw = :elevation_2_sw ,water_height = :water_height ,terrain_raise_limit = :terrain_raise_limit
1431,terrain_lower_limit = :terrain_lower_limit ,use_estate_sun = :use_estate_sun ,fixed_sun = :fixed_sun ,sun_position = :sun_position 1431,terrain_lower_limit = :terrain_lower_limit ,use_estate_sun = :use_estate_sun ,fixed_sun = :fixed_sun ,sun_position = :sun_position
1432,covenant = :covenant ,covenant_datetime = :covenant_datetime, sunvectorx = :sunvectorx, sunvectory = :sunvectory, sunvectorz = :sunvectorz, 1432,covenant = :covenant ,covenant_datetime = :covenant_datetime, sunvectorx = :sunvectorx, sunvectory = :sunvectory, sunvectorz = :sunvectorz,
1433""Sandbox"" = :Sandbox, loaded_creation_datetime = :loaded_creation_datetime, loaded_creation_id = :loaded_creation_id, ""map_tile_ID"" = :TerrainImageID, 1433""Sandbox"" = :Sandbox, loaded_creation_datetime = :loaded_creation_datetime, loaded_creation_id = :loaded_creation_id, ""map_tile_ID"" = :TerrainImageID,
1434""TelehubObject"" = :telehubobject, ""parcel_tile_ID"" = :ParcelImageID 1434""TelehubObject"" = :telehubobject, ""parcel_tile_ID"" = :ParcelImageID
1435 WHERE ""regionUUID"" = :regionUUID"; 1435 WHERE ""regionUUID"" = :regionUUID";
1436 1436
@@ -1465,13 +1465,13 @@ namespace OpenSim.Data.PGSQL
1465 elevation_2_ne,elevation_1_se,elevation_2_se,elevation_1_sw,elevation_2_sw,water_height,terrain_raise_limit, 1465 elevation_2_ne,elevation_1_se,elevation_2_se,elevation_1_sw,elevation_2_sw,water_height,terrain_raise_limit,
1466 terrain_lower_limit,use_estate_sun,fixed_sun,sun_position,covenant,covenant_datetime,sunvectorx, sunvectory, sunvectorz, 1466 terrain_lower_limit,use_estate_sun,fixed_sun,sun_position,covenant,covenant_datetime,sunvectorx, sunvectory, sunvectorz,
1467 ""Sandbox"", loaded_creation_datetime, loaded_creation_id 1467 ""Sandbox"", loaded_creation_datetime, loaded_creation_id
1468 ) 1468 )
1469 VALUES 1469 VALUES
1470 (:regionUUID,:block_terraform,:block_fly,:allow_damage,:restrict_pushing,:allow_land_resell,:allow_land_join_divide, 1470 (:regionUUID,:block_terraform,:block_fly,:allow_damage,:restrict_pushing,:allow_land_resell,:allow_land_join_divide,
1471 :block_show_in_search,:agent_limit,:object_bonus,:maturity,:disable_scripts,:disable_collisions,:disable_physics, 1471 :block_show_in_search,:agent_limit,:object_bonus,:maturity,:disable_scripts,:disable_collisions,:disable_physics,
1472 :terrain_texture_1,:terrain_texture_2,:terrain_texture_3,:terrain_texture_4,:elevation_1_nw,:elevation_2_nw,:elevation_1_ne, 1472 :terrain_texture_1,:terrain_texture_2,:terrain_texture_3,:terrain_texture_4,:elevation_1_nw,:elevation_2_nw,:elevation_1_ne,
1473 :elevation_2_ne,:elevation_1_se,:elevation_2_se,:elevation_1_sw,:elevation_2_sw,:water_height,:terrain_raise_limit, 1473 :elevation_2_ne,:elevation_1_se,:elevation_2_se,:elevation_1_sw,:elevation_2_sw,:water_height,:terrain_raise_limit,
1474 :terrain_lower_limit,:use_estate_sun,:fixed_sun,:sun_position,:covenant, :covenant_datetime, :sunvectorx,:sunvectory, 1474 :terrain_lower_limit,:use_estate_sun,:fixed_sun,:sun_position,:covenant, :covenant_datetime, :sunvectorx,:sunvectory,
1475 :sunvectorz, :Sandbox, :loaded_creation_datetime, :loaded_creation_id )"; 1475 :sunvectorz, :Sandbox, :loaded_creation_datetime, :loaded_creation_id )";
1476 1476
1477 using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString)) 1477 using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString))
@@ -1626,7 +1626,7 @@ namespace OpenSim.Data.PGSQL
1626 newData.MediaLoop = Convert.ToBoolean(row["MediaLoop"]); 1626 newData.MediaLoop = Convert.ToBoolean(row["MediaLoop"]);
1627 newData.ObscureMusic = Convert.ToBoolean(row["ObscureMusic"]); 1627 newData.ObscureMusic = Convert.ToBoolean(row["ObscureMusic"]);
1628 newData.ObscureMedia = Convert.ToBoolean(row["ObscureMedia"]); 1628 newData.ObscureMedia = Convert.ToBoolean(row["ObscureMedia"]);
1629 1629
1630 newData.SeeAVs = Convert.ToBoolean(row["SeeAVs"]); 1630 newData.SeeAVs = Convert.ToBoolean(row["SeeAVs"]);
1631 newData.AnyAVSounds = Convert.ToBoolean(row["AnyAVSounds"]); 1631 newData.AnyAVSounds = Convert.ToBoolean(row["AnyAVSounds"]);
1632 newData.GroupAVSounds = Convert.ToBoolean(row["GroupAVSounds"]); 1632 newData.GroupAVSounds = Convert.ToBoolean(row["GroupAVSounds"]);
@@ -1789,7 +1789,7 @@ namespace OpenSim.Data.PGSQL
1789 if (!(primRow["DynAttrs"] is System.DBNull) && (string)primRow["DynAttrs"] != "") 1789 if (!(primRow["DynAttrs"] is System.DBNull) && (string)primRow["DynAttrs"] != "")
1790 prim.DynAttrs = DAMap.FromXml((string)primRow["DynAttrs"]); 1790 prim.DynAttrs = DAMap.FromXml((string)primRow["DynAttrs"]);
1791 else 1791 else
1792 prim.DynAttrs = new DAMap(); 1792 prim.DynAttrs = new DAMap();
1793 1793
1794 prim.PhysicsShapeType = Convert.ToByte(primRow["PhysicsShapeType"]); 1794 prim.PhysicsShapeType = Convert.ToByte(primRow["PhysicsShapeType"]);
1795 prim.Density = Convert.ToSingle(primRow["Density"]); 1795 prim.Density = Convert.ToSingle(primRow["Density"]);
@@ -2195,17 +2195,17 @@ namespace OpenSim.Data.PGSQL
2195 2195
2196 parameters.Add(_Database.CreateParameter("CollisionSound", prim.CollisionSound)); 2196 parameters.Add(_Database.CreateParameter("CollisionSound", prim.CollisionSound));
2197 parameters.Add(_Database.CreateParameter("CollisionSoundVolume", prim.CollisionSoundVolume)); 2197 parameters.Add(_Database.CreateParameter("CollisionSoundVolume", prim.CollisionSoundVolume));
2198 2198
2199 parameters.Add(_Database.CreateParameter("PassTouches", prim.PassTouches)); 2199 parameters.Add(_Database.CreateParameter("PassTouches", prim.PassTouches));
2200 2200
2201 parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum)); 2201 parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum));
2202 parameters.Add(_Database.CreateParameter("MediaURL", prim.MediaUrl)); 2202 parameters.Add(_Database.CreateParameter("MediaURL", prim.MediaUrl));
2203 2203
2204 if (prim.DynAttrs.CountNamespaces > 0) 2204 if (prim.DynAttrs.CountNamespaces > 0)
2205 parameters.Add(_Database.CreateParameter("DynAttrs", prim.DynAttrs.ToXml())); 2205 parameters.Add(_Database.CreateParameter("DynAttrs", prim.DynAttrs.ToXml()));
2206 else 2206 else
2207 parameters.Add(_Database.CreateParameter("DynAttrs", null)); 2207 parameters.Add(_Database.CreateParameter("DynAttrs", null));
2208 2208
2209 parameters.Add(_Database.CreateParameter("PhysicsShapeType", prim.PhysicsShapeType)); 2209 parameters.Add(_Database.CreateParameter("PhysicsShapeType", prim.PhysicsShapeType));
2210 parameters.Add(_Database.CreateParameter("Density", (double)prim.Density)); 2210 parameters.Add(_Database.CreateParameter("Density", (double)prim.Density));
2211 parameters.Add(_Database.CreateParameter("GravityModifier", (double)prim.GravityModifier)); 2211 parameters.Add(_Database.CreateParameter("GravityModifier", (double)prim.GravityModifier));