diff options
author | Justin Clarke Casey | 2009-01-19 15:16:17 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-01-19 15:16:17 +0000 |
commit | 0828c28501cfb14100d1270924ec77a8877ba94e (patch) | |
tree | 5a18964ac0f48b897aef59b43890b33542a7f4bf /OpenSim/Data | |
parent | No longer append a "texture" parameter on texture asset requests. The (diff) | |
download | opensim-SC-0828c28501cfb14100d1270924ec77a8877ba94e.zip opensim-SC-0828c28501cfb14100d1270924ec77a8877ba94e.tar.gz opensim-SC-0828c28501cfb14100d1270924ec77a8877ba94e.tar.bz2 opensim-SC-0828c28501cfb14100d1270924ec77a8877ba94e.tar.xz |
* Remove unused prims.ParentID field from SQLite and MySQL
* Since this is a db change, as always I strongly recommend that you backup your database before updating to this revision
* Haven't touched MSSQL in case I get it wrong - looking for some kind soul to take care of this.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLRegionData.cs | 2 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/Resources/027_RegionStore.sql | 5 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/Resources/017_RegionStore.sql | 8 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteRegionData.cs | 7 |
4 files changed, 16 insertions, 6 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLRegionData.cs b/OpenSim/Data/MSSQL/MSSQLRegionData.cs index 87960f0..5ab29ff 100644 --- a/OpenSim/Data/MSSQL/MSSQLRegionData.cs +++ b/OpenSim/Data/MSSQL/MSSQLRegionData.cs | |||
@@ -934,7 +934,6 @@ VALUES | |||
934 | prim.UUID = new UUID((String)primRow["UUID"]); | 934 | prim.UUID = new UUID((String)primRow["UUID"]); |
935 | // explicit conversion of integers is required, which sort | 935 | // explicit conversion of integers is required, which sort |
936 | // of sucks. No idea if there is a shortcut here or not. | 936 | // of sucks. No idea if there is a shortcut here or not. |
937 | //prim.ParentID = (uint)Convert.ToInt32(primRow["ParentID"]); | ||
938 | prim.CreationDate = Convert.ToInt32(primRow["CreationDate"]); | 937 | prim.CreationDate = Convert.ToInt32(primRow["CreationDate"]); |
939 | prim.Name = (String)primRow["Name"]; | 938 | prim.Name = (String)primRow["Name"]; |
940 | // various text fields | 939 | // various text fields |
@@ -1315,7 +1314,6 @@ VALUES | |||
1315 | 1314 | ||
1316 | parameters.Add(_Database.CreateParameter("UUID", prim.UUID)); | 1315 | parameters.Add(_Database.CreateParameter("UUID", prim.UUID)); |
1317 | parameters.Add(_Database.CreateParameter("RegionUUID", regionUUID)); | 1316 | parameters.Add(_Database.CreateParameter("RegionUUID", regionUUID)); |
1318 | //parameters.Add(_Database.CreateParameter("ParentID", (int)prim.ParentID)); | ||
1319 | parameters.Add(_Database.CreateParameter("CreationDate", prim.CreationDate)); | 1317 | parameters.Add(_Database.CreateParameter("CreationDate", prim.CreationDate)); |
1320 | parameters.Add(_Database.CreateParameter("Name", prim.Name)); | 1318 | parameters.Add(_Database.CreateParameter("Name", prim.Name)); |
1321 | parameters.Add(_Database.CreateParameter("SceneGroupID", sceneGroupID)); | 1319 | parameters.Add(_Database.CreateParameter("SceneGroupID", sceneGroupID)); |
diff --git a/OpenSim/Data/MySQL/Resources/027_RegionStore.sql b/OpenSim/Data/MySQL/Resources/027_RegionStore.sql new file mode 100644 index 0000000..e1efab3 --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/027_RegionStore.sql | |||
@@ -0,0 +1,5 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE prims DROP COLUMN ParentID; | ||
4 | |||
5 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/SQLite/Resources/017_RegionStore.sql b/OpenSim/Data/SQLite/Resources/017_RegionStore.sql new file mode 100644 index 0000000..6c6b7b5 --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/017_RegionStore.sql | |||
@@ -0,0 +1,8 @@ | |||
1 | BEGIN; | ||
2 | CREATE TEMPORARY TABLE prims_backup(UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect); | ||
3 | INSERT INTO prims_backup SELECT UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect FROM prims; | ||
4 | DROP TABLE prims; | ||
5 | CREATE TABLE prims(UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect); | ||
6 | INSERT INTO prims SELECT UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect FROM prims_backup; | ||
7 | DROP TABLE prims_backup; | ||
8 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs index 7f929a8..fce98a2 100644 --- a/OpenSim/Data/SQLite/SQLiteRegionData.cs +++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs | |||
@@ -404,13 +404,12 @@ namespace OpenSim.Data.SQLite | |||
404 | DataTable shapes = ds.Tables["primshapes"]; | 404 | DataTable shapes = ds.Tables["primshapes"]; |
405 | 405 | ||
406 | string byRegion = "RegionUUID = '" + Util.ToRawUuidString(regionUUID) + "'"; | 406 | string byRegion = "RegionUUID = '" + Util.ToRawUuidString(regionUUID) + "'"; |
407 | string orderByParent = "ParentID ASC"; | ||
408 | 407 | ||
409 | lock (ds) | 408 | lock (ds) |
410 | { | 409 | { |
411 | DataRow[] primsForRegion = prims.Select(byRegion, orderByParent); | 410 | DataRow[] primsForRegion = prims.Select(byRegion); |
412 | m_log.Info("[REGION DB]: " + | 411 | m_log.Info("[REGION DB]: Loaded " + primsForRegion.Length + " prims for region: " + regionUUID); |
413 | "Loaded " + primsForRegion.Length + " prims for region: " + regionUUID); | 412 | |
414 | // First, create all groups | 413 | // First, create all groups |
415 | foreach (DataRow primRow in primsForRegion) | 414 | foreach (DataRow primRow in primsForRegion) |
416 | { | 415 | { |