aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL
diff options
context:
space:
mode:
authorMelanie Thielker2008-11-26 12:23:56 +0000
committerMelanie Thielker2008-11-26 12:23:56 +0000
commitfdf5f55a5b0e8936277053d3d24faef23a8f3061 (patch)
tree1f6620272c0aec847d81026cd7457d7c8f23464d /OpenSim/Data/MySQL
parentA migration to make the floats in prims table be doubles (diff)
downloadopensim-SC_OLD-fdf5f55a5b0e8936277053d3d24faef23a8f3061.zip
opensim-SC_OLD-fdf5f55a5b0e8936277053d3d24faef23a8f3061.tar.gz
opensim-SC_OLD-fdf5f55a5b0e8936277053d3d24faef23a8f3061.tar.bz2
opensim-SC_OLD-fdf5f55a5b0e8936277053d3d24faef23a8f3061.tar.xz
Yay for unit tests. Increased the type width of the prims and primshapes
tables, and changed the database modules to actually push these doubles down into the database layer.
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MySQL/MySQLRegionData.cs76
-rw-r--r--OpenSim/Data/MySQL/Resources/025_RegionStore.sql78
2 files changed, 79 insertions, 75 deletions
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs
index a3ac38e..f64b142 100644
--- a/OpenSim/Data/MySQL/MySQLRegionData.cs
+++ b/OpenSim/Data/MySQL/MySQLRegionData.cs
@@ -1078,38 +1078,38 @@ namespace OpenSim.Data.MySQL
1078 cmd.Parameters.AddWithValue("EveryoneMask", prim.EveryoneMask); 1078 cmd.Parameters.AddWithValue("EveryoneMask", prim.EveryoneMask);
1079 cmd.Parameters.AddWithValue("BaseMask", prim.BaseMask); 1079 cmd.Parameters.AddWithValue("BaseMask", prim.BaseMask);
1080 // vectors 1080 // vectors
1081 cmd.Parameters.AddWithValue("PositionX", prim.OffsetPosition.X); 1081 cmd.Parameters.AddWithValue("PositionX", (double)prim.OffsetPosition.X);
1082 cmd.Parameters.AddWithValue("PositionY", prim.OffsetPosition.Y); 1082 cmd.Parameters.AddWithValue("PositionY", (double)prim.OffsetPosition.Y);
1083 cmd.Parameters.AddWithValue("PositionZ", prim.OffsetPosition.Z); 1083 cmd.Parameters.AddWithValue("PositionZ", (double)prim.OffsetPosition.Z);
1084 cmd.Parameters.AddWithValue("GroupPositionX", prim.GroupPosition.X); 1084 cmd.Parameters.AddWithValue("GroupPositionX", (double)prim.GroupPosition.X);
1085 cmd.Parameters.AddWithValue("GroupPositionY", prim.GroupPosition.Y); 1085 cmd.Parameters.AddWithValue("GroupPositionY", (double)prim.GroupPosition.Y);
1086 cmd.Parameters.AddWithValue("GroupPositionZ", prim.GroupPosition.Z); 1086 cmd.Parameters.AddWithValue("GroupPositionZ", (double)prim.GroupPosition.Z);
1087 cmd.Parameters.AddWithValue("VelocityX", prim.Velocity.X); 1087 cmd.Parameters.AddWithValue("VelocityX", (double)prim.Velocity.X);
1088 cmd.Parameters.AddWithValue("VelocityY", prim.Velocity.Y); 1088 cmd.Parameters.AddWithValue("VelocityY", (double)prim.Velocity.Y);
1089 cmd.Parameters.AddWithValue("VelocityZ", prim.Velocity.Z); 1089 cmd.Parameters.AddWithValue("VelocityZ", (double)prim.Velocity.Z);
1090 cmd.Parameters.AddWithValue("AngularVelocityX", prim.AngularVelocity.X); 1090 cmd.Parameters.AddWithValue("AngularVelocityX", (double)prim.AngularVelocity.X);
1091 cmd.Parameters.AddWithValue("AngularVelocityY", prim.AngularVelocity.Y); 1091 cmd.Parameters.AddWithValue("AngularVelocityY", (double)prim.AngularVelocity.Y);
1092 cmd.Parameters.AddWithValue("AngularVelocityZ", prim.AngularVelocity.Z); 1092 cmd.Parameters.AddWithValue("AngularVelocityZ", (double)prim.AngularVelocity.Z);
1093 cmd.Parameters.AddWithValue("AccelerationX", prim.Acceleration.X); 1093 cmd.Parameters.AddWithValue("AccelerationX", (double)prim.Acceleration.X);
1094 cmd.Parameters.AddWithValue("AccelerationY", prim.Acceleration.Y); 1094 cmd.Parameters.AddWithValue("AccelerationY", (double)prim.Acceleration.Y);
1095 cmd.Parameters.AddWithValue("AccelerationZ", prim.Acceleration.Z); 1095 cmd.Parameters.AddWithValue("AccelerationZ", (double)prim.Acceleration.Z);
1096 // quaternions 1096 // quaternions
1097 cmd.Parameters.AddWithValue("RotationX", prim.RotationOffset.X); 1097 cmd.Parameters.AddWithValue("RotationX", (double)prim.RotationOffset.X);
1098 cmd.Parameters.AddWithValue("RotationY", prim.RotationOffset.Y); 1098 cmd.Parameters.AddWithValue("RotationY", (double)prim.RotationOffset.Y);
1099 cmd.Parameters.AddWithValue("RotationZ", prim.RotationOffset.Z); 1099 cmd.Parameters.AddWithValue("RotationZ", (double)prim.RotationOffset.Z);
1100 cmd.Parameters.AddWithValue("RotationW", prim.RotationOffset.W); 1100 cmd.Parameters.AddWithValue("RotationW", (double)prim.RotationOffset.W);
1101 1101
1102 // Sit target 1102 // Sit target
1103 Vector3 sitTargetPos = prim.SitTargetPositionLL; 1103 Vector3 sitTargetPos = prim.SitTargetPositionLL;
1104 cmd.Parameters.AddWithValue("SitTargetOffsetX", sitTargetPos.X); 1104 cmd.Parameters.AddWithValue("SitTargetOffsetX", (double)sitTargetPos.X);
1105 cmd.Parameters.AddWithValue("SitTargetOffsetY", sitTargetPos.Y); 1105 cmd.Parameters.AddWithValue("SitTargetOffsetY", (double)sitTargetPos.Y);
1106 cmd.Parameters.AddWithValue("SitTargetOffsetZ", sitTargetPos.Z); 1106 cmd.Parameters.AddWithValue("SitTargetOffsetZ", (double)sitTargetPos.Z);
1107 1107
1108 Quaternion sitTargetOrient = prim.SitTargetOrientationLL; 1108 Quaternion sitTargetOrient = prim.SitTargetOrientationLL;
1109 cmd.Parameters.AddWithValue("SitTargetOrientW", sitTargetOrient.W); 1109 cmd.Parameters.AddWithValue("SitTargetOrientW", (double)sitTargetOrient.W);
1110 cmd.Parameters.AddWithValue("SitTargetOrientX", sitTargetOrient.X); 1110 cmd.Parameters.AddWithValue("SitTargetOrientX", (double)sitTargetOrient.X);
1111 cmd.Parameters.AddWithValue("SitTargetOrientY", sitTargetOrient.Y); 1111 cmd.Parameters.AddWithValue("SitTargetOrientY", (double)sitTargetOrient.Y);
1112 cmd.Parameters.AddWithValue("SitTargetOrientZ", sitTargetOrient.Z); 1112 cmd.Parameters.AddWithValue("SitTargetOrientZ", (double)sitTargetOrient.Z);
1113 1113
1114 cmd.Parameters.AddWithValue("PayPrice", prim.PayPrice[0]); 1114 cmd.Parameters.AddWithValue("PayPrice", prim.PayPrice[0]);
1115 cmd.Parameters.AddWithValue("PayButton1", prim.PayPrice[1]); 1115 cmd.Parameters.AddWithValue("PayButton1", prim.PayPrice[1]);
@@ -1131,17 +1131,17 @@ namespace OpenSim.Data.MySQL
1131 cmd.Parameters.AddWithValue("TextureAnimation", prim.TextureAnimation); 1131 cmd.Parameters.AddWithValue("TextureAnimation", prim.TextureAnimation);
1132 cmd.Parameters.AddWithValue("ParticleSystem", prim.ParticleSystem); 1132 cmd.Parameters.AddWithValue("ParticleSystem", prim.ParticleSystem);
1133 1133
1134 cmd.Parameters.AddWithValue("OmegaX", prim.RotationalVelocity.X); 1134 cmd.Parameters.AddWithValue("OmegaX", (double)prim.RotationalVelocity.X);
1135 cmd.Parameters.AddWithValue("OmegaY", prim.RotationalVelocity.Y); 1135 cmd.Parameters.AddWithValue("OmegaY", (double)prim.RotationalVelocity.Y);
1136 cmd.Parameters.AddWithValue("OmegaZ", prim.RotationalVelocity.Z); 1136 cmd.Parameters.AddWithValue("OmegaZ", (double)prim.RotationalVelocity.Z);
1137 1137
1138 cmd.Parameters.AddWithValue("CameraEyeOffsetX", prim.GetCameraEyeOffset().X); 1138 cmd.Parameters.AddWithValue("CameraEyeOffsetX", (double)prim.GetCameraEyeOffset().X);
1139 cmd.Parameters.AddWithValue("CameraEyeOffsetY", prim.GetCameraEyeOffset().Y); 1139 cmd.Parameters.AddWithValue("CameraEyeOffsetY", (double)prim.GetCameraEyeOffset().Y);
1140 cmd.Parameters.AddWithValue("CameraEyeOffsetZ", prim.GetCameraEyeOffset().Z); 1140 cmd.Parameters.AddWithValue("CameraEyeOffsetZ", (double)prim.GetCameraEyeOffset().Z);
1141 1141
1142 cmd.Parameters.AddWithValue("CameraAtOffsetX", prim.GetCameraAtOffset().X); 1142 cmd.Parameters.AddWithValue("CameraAtOffsetX", (double)prim.GetCameraAtOffset().X);
1143 cmd.Parameters.AddWithValue("CameraAtOffsetY", prim.GetCameraAtOffset().Y); 1143 cmd.Parameters.AddWithValue("CameraAtOffsetY", (double)prim.GetCameraAtOffset().Y);
1144 cmd.Parameters.AddWithValue("CameraAtOffsetZ", prim.GetCameraAtOffset().Z); 1144 cmd.Parameters.AddWithValue("CameraAtOffsetZ", (double)prim.GetCameraAtOffset().Z);
1145 1145
1146 if (prim.GetForceMouselook()) 1146 if (prim.GetForceMouselook())
1147 cmd.Parameters.AddWithValue("ForceMouselook", 1); 1147 cmd.Parameters.AddWithValue("ForceMouselook", 1);
@@ -1363,9 +1363,9 @@ byte[] textureEntry = (byte[]) row["Texture"];
1363 // shape is an enum 1363 // shape is an enum
1364 cmd.Parameters.AddWithValue("Shape", 0); 1364 cmd.Parameters.AddWithValue("Shape", 0);
1365 // vectors 1365 // vectors
1366 cmd.Parameters.AddWithValue("ScaleX", s.Scale.X); 1366 cmd.Parameters.AddWithValue("ScaleX", (double)s.Scale.X);
1367 cmd.Parameters.AddWithValue("ScaleY", s.Scale.Y); 1367 cmd.Parameters.AddWithValue("ScaleY", (double)s.Scale.Y);
1368 cmd.Parameters.AddWithValue("ScaleZ", s.Scale.Z); 1368 cmd.Parameters.AddWithValue("ScaleZ", (double)s.Scale.Z);
1369 // paths 1369 // paths
1370 cmd.Parameters.AddWithValue("PCode", s.PCode); 1370 cmd.Parameters.AddWithValue("PCode", s.PCode);
1371 cmd.Parameters.AddWithValue("PathBegin", s.PathBegin); 1371 cmd.Parameters.AddWithValue("PathBegin", s.PathBegin);
diff --git a/OpenSim/Data/MySQL/Resources/025_RegionStore.sql b/OpenSim/Data/MySQL/Resources/025_RegionStore.sql
index 47fb6dd..e8f5d70 100644
--- a/OpenSim/Data/MySQL/Resources/025_RegionStore.sql
+++ b/OpenSim/Data/MySQL/Resources/025_RegionStore.sql
@@ -1,42 +1,46 @@
1BEGIN; 1BEGIN;
2 2
3alter table prims change column `PositionX` `PositionX` float default NULL; 3alter table prims change column `PositionX` `PositionX` double default NULL;
4alter table prims change column `PositionY` `PositionY` float default NULL; 4alter table prims change column `PositionY` `PositionY` double default NULL;
5alter table prims change column `PositionZ` `PositionZ` float default NULL; 5alter table prims change column `PositionZ` `PositionZ` double default NULL;
6alter table prims change column `GroupPositionX` `GroupPositionX` float default NULL; 6alter table prims change column `GroupPositionX` `GroupPositionX` double default NULL;
7alter table prims change column `GroupPositionY` `GroupPositionY` float default NULL; 7alter table prims change column `GroupPositionY` `GroupPositionY` double default NULL;
8alter table prims change column `GroupPositionZ` `GroupPositionZ` float default NULL; 8alter table prims change column `GroupPositionZ` `GroupPositionZ` double default NULL;
9alter table prims change column `VelocityX` `VelocityX` float default NULL; 9alter table prims change column `VelocityX` `VelocityX` double default NULL;
10alter table prims change column `VelocityY` `VelocityY` float default NULL; 10alter table prims change column `VelocityY` `VelocityY` double default NULL;
11alter table prims change column `VelocityZ` `VelocityZ` float default NULL; 11alter table prims change column `VelocityZ` `VelocityZ` double default NULL;
12alter table prims change column `AngularVelocityX` `AngularVelocityX` float default NULL; 12alter table prims change column `AngularVelocityX` `AngularVelocityX` double default NULL;
13alter table prims change column `AngularVelocityY` `AngularVelocityY` float default NULL; 13alter table prims change column `AngularVelocityY` `AngularVelocityY` double default NULL;
14alter table prims change column `AngularVelocityZ` `AngularVelocityZ` float default NULL; 14alter table prims change column `AngularVelocityZ` `AngularVelocityZ` double default NULL;
15alter table prims change column `AccelerationX` `AccelerationX` float default NULL; 15alter table prims change column `AccelerationX` `AccelerationX` double default NULL;
16alter table prims change column `AccelerationY` `AccelerationY` float default NULL; 16alter table prims change column `AccelerationY` `AccelerationY` double default NULL;
17alter table prims change column `AccelerationZ` `AccelerationZ` float default NULL; 17alter table prims change column `AccelerationZ` `AccelerationZ` double default NULL;
18alter table prims change column `RotationX` `RotationX` float default NULL; 18alter table prims change column `RotationX` `RotationX` double default NULL;
19alter table prims change column `RotationY` `RotationY` float default NULL; 19alter table prims change column `RotationY` `RotationY` double default NULL;
20alter table prims change column `RotationZ` `RotationZ` float default NULL; 20alter table prims change column `RotationZ` `RotationZ` double default NULL;
21alter table prims change column `RotationW` `RotationW` float default NULL; 21alter table prims change column `RotationW` `RotationW` double default NULL;
22alter table prims change column `SitTargetOffsetX` `SitTargetOffsetX` float default NULL; 22alter table prims change column `SitTargetOffsetX` `SitTargetOffsetX` double default NULL;
23alter table prims change column `SitTargetOffsetY` `SitTargetOffsetY` float default NULL; 23alter table prims change column `SitTargetOffsetY` `SitTargetOffsetY` double default NULL;
24alter table prims change column `SitTargetOffsetZ` `SitTargetOffsetZ` float default NULL; 24alter table prims change column `SitTargetOffsetZ` `SitTargetOffsetZ` double default NULL;
25alter table prims change column `SitTargetOrientW` `SitTargetOrientW` float default NULL; 25alter table prims change column `SitTargetOrientW` `SitTargetOrientW` double default NULL;
26alter table prims change column `SitTargetOrientX` `SitTargetOrientX` float default NULL; 26alter table prims change column `SitTargetOrientX` `SitTargetOrientX` double default NULL;
27alter table prims change column `SitTargetOrientY` `SitTargetOrientY` float default NULL; 27alter table prims change column `SitTargetOrientY` `SitTargetOrientY` double default NULL;
28alter table prims change column `SitTargetOrientZ` `SitTargetOrientZ` float default NULL; 28alter table prims change column `SitTargetOrientZ` `SitTargetOrientZ` double default NULL;
29alter table prims change column `LoopedSoundGain` `LoopedSoundGain` float NOT NULL default '0'; 29alter table prims change column `LoopedSoundGain` `LoopedSoundGain` double NOT NULL default '0';
30alter table prims change column `OmegaX` `OmegaX` float NOT NULL default '0'; 30alter table prims change column `OmegaX` `OmegaX` double NOT NULL default '0';
31alter table prims change column `OmegaY` `OmegaY` float NOT NULL default '0'; 31alter table prims change column `OmegaY` `OmegaY` double NOT NULL default '0';
32alter table prims change column `OmegaZ` `OmegaZ` float NOT NULL default '0'; 32alter table prims change column `OmegaZ` `OmegaZ` double NOT NULL default '0';
33alter table prims change column `CameraEyeOffsetX` `CameraEyeOffsetX` float NOT NULL default '0'; 33alter table prims change column `CameraEyeOffsetX` `CameraEyeOffsetX` double NOT NULL default '0';
34alter table prims change column `CameraEyeOffsetY` `CameraEyeOffsetY` float NOT NULL default '0'; 34alter table prims change column `CameraEyeOffsetY` `CameraEyeOffsetY` double NOT NULL default '0';
35alter table prims change column `CameraEyeOffsetZ` `CameraEyeOffsetZ` float NOT NULL default '0'; 35alter table prims change column `CameraEyeOffsetZ` `CameraEyeOffsetZ` double NOT NULL default '0';
36alter table prims change column `CameraAtOffsetX` `CameraAtOffsetX` float NOT NULL default '0'; 36alter table prims change column `CameraAtOffsetX` `CameraAtOffsetX` double NOT NULL default '0';
37alter table prims change column `CameraAtOffsetY` `CameraAtOffsetY` float NOT NULL default '0'; 37alter table prims change column `CameraAtOffsetY` `CameraAtOffsetY` double NOT NULL default '0';
38alter table prims change column `CameraAtOffsetZ` `CameraAtOffsetZ` float NOT NULL default '0'; 38alter table prims change column `CameraAtOffsetZ` `CameraAtOffsetZ` double NOT NULL default '0';
39alter table prims change column `CollisionSoundVolume` `CollisionSoundVolume` float NOT NULL default '0'; 39alter table prims change column `CollisionSoundVolume` `CollisionSoundVolume` double NOT NULL default '0';
40
41alter table primshapes change column `ScaleX` `ScaleX` double NOT NULL default '0';
42alter table primshapes change column `ScaleY` `ScaleY` double NOT NULL default '0';
43alter table primshapes change column `ScaleZ` `ScaleZ` double NOT NULL default '0';
40 44
41COMMIT; 45COMMIT;
42 46