diff options
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLSimulationData.cs')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLSimulationData.cs | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index 2aaa2ff..8278c0e 100644 --- a/OpenSim/Data/MySQL/MySQLSimulationData.cs +++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs | |||
@@ -55,7 +55,7 @@ namespace OpenSim.Data.MySQL | |||
55 | /// <summary> | 55 | /// <summary> |
56 | /// This lock was being used to serialize database operations when the connection was shared, but this has | 56 | /// This lock was being used to serialize database operations when the connection was shared, but this has |
57 | /// been unnecessary for a long time after we switched to using MySQL's underlying connection pooling instead. | 57 | /// been unnecessary for a long time after we switched to using MySQL's underlying connection pooling instead. |
58 | /// FIXME: However, the locks remain in many places since they are effectively providing a level of | 58 | /// FIXME: However, the locks remain in many places since they are effectively providing a level of |
59 | /// transactionality. This should be replaced by more efficient database transactions which would not require | 59 | /// transactionality. This should be replaced by more efficient database transactions which would not require |
60 | /// unrelated operations to block each other or unrelated operations on the same tables from blocking each | 60 | /// unrelated operations to block each other or unrelated operations on the same tables from blocking each |
61 | /// other. | 61 | /// other. |
@@ -268,7 +268,7 @@ namespace OpenSim.Data.MySQL | |||
268 | public virtual void RemoveObject(UUID obj, UUID regionUUID) | 268 | public virtual void RemoveObject(UUID obj, UUID regionUUID) |
269 | { | 269 | { |
270 | // m_log.DebugFormat("[REGION DB]: Deleting scene object {0} from {1} in database", obj, regionUUID); | 270 | // m_log.DebugFormat("[REGION DB]: Deleting scene object {0} from {1} in database", obj, regionUUID); |
271 | 271 | ||
272 | List<UUID> uuids = new List<UUID>(); | 272 | List<UUID> uuids = new List<UUID>(); |
273 | 273 | ||
274 | // Formerly, this used to check the region UUID. | 274 | // Formerly, this used to check the region UUID. |
@@ -509,7 +509,7 @@ namespace OpenSim.Data.MySQL | |||
509 | #region Prim Inventory Loading | 509 | #region Prim Inventory Loading |
510 | 510 | ||
511 | // Instead of attempting to LoadItems on every prim, | 511 | // Instead of attempting to LoadItems on every prim, |
512 | // most of which probably have no items... get a | 512 | // most of which probably have no items... get a |
513 | // list from DB of all prims which have items and | 513 | // list from DB of all prims which have items and |
514 | // LoadItems only on those | 514 | // LoadItems only on those |
515 | List<SceneObjectPart> primsWithInventory = new List<SceneObjectPart>(); | 515 | List<SceneObjectPart> primsWithInventory = new List<SceneObjectPart>(); |
@@ -807,7 +807,7 @@ namespace OpenSim.Data.MySQL | |||
807 | "UserLocationX, UserLocationY, UserLocationZ, " + | 807 | "UserLocationX, UserLocationY, UserLocationZ, " + |
808 | "UserLookAtX, UserLookAtY, UserLookAtZ, " + | 808 | "UserLookAtX, UserLookAtY, UserLookAtZ, " + |
809 | "AuthbuyerID, OtherCleanTime, Dwell, MediaType, MediaDescription, " + | 809 | "AuthbuyerID, OtherCleanTime, Dwell, MediaType, MediaDescription, " + |
810 | "MediaSize, MediaLoop, ObscureMusic, ObscureMedia, " + | 810 | "MediaSize, MediaLoop, ObscureMusic, ObscureMedia, " + |
811 | "SeeAVs, AnyAVSounds, GroupAVSounds) values (" + | 811 | "SeeAVs, AnyAVSounds, GroupAVSounds) values (" + |
812 | "?UUID, ?RegionUUID, " + | 812 | "?UUID, ?RegionUUID, " + |
813 | "?LocalLandID, ?Bitmap, ?Name, ?Description, " + | 813 | "?LocalLandID, ?Bitmap, ?Name, ?Description, " + |
@@ -1081,7 +1081,7 @@ namespace OpenSim.Data.MySQL | |||
1081 | cmd.Parameters.AddWithValue("cloud_scroll_y", wl.cloudScrollY); | 1081 | cmd.Parameters.AddWithValue("cloud_scroll_y", wl.cloudScrollY); |
1082 | cmd.Parameters.AddWithValue("cloud_scroll_y_lock", wl.cloudScrollYLock); | 1082 | cmd.Parameters.AddWithValue("cloud_scroll_y_lock", wl.cloudScrollYLock); |
1083 | cmd.Parameters.AddWithValue("draw_classic_clouds", wl.drawClassicClouds); | 1083 | cmd.Parameters.AddWithValue("draw_classic_clouds", wl.drawClassicClouds); |
1084 | 1084 | ||
1085 | ExecuteNonQuery(cmd); | 1085 | ExecuteNonQuery(cmd); |
1086 | } | 1086 | } |
1087 | } | 1087 | } |
@@ -1273,7 +1273,7 @@ namespace OpenSim.Data.MySQL | |||
1273 | { | 1273 | { |
1274 | SceneObjectPart prim = new SceneObjectPart(); | 1274 | SceneObjectPart prim = new SceneObjectPart(); |
1275 | 1275 | ||
1276 | // depending on the MySQL connector version, CHAR(36) may be already converted to Guid! | 1276 | // depending on the MySQL connector version, CHAR(36) may be already converted to Guid! |
1277 | prim.UUID = DBGuid.FromDB(row["UUID"]); | 1277 | prim.UUID = DBGuid.FromDB(row["UUID"]); |
1278 | prim.CreatorIdentification = (string)row["CreatorID"]; | 1278 | prim.CreatorIdentification = (string)row["CreatorID"]; |
1279 | prim.OwnerID = DBGuid.FromDB(row["OwnerID"]); | 1279 | prim.OwnerID = DBGuid.FromDB(row["OwnerID"]); |
@@ -1401,11 +1401,11 @@ namespace OpenSim.Data.MySQL | |||
1401 | 1401 | ||
1402 | prim.CollisionSound = DBGuid.FromDB(row["CollisionSound"]); | 1402 | prim.CollisionSound = DBGuid.FromDB(row["CollisionSound"]); |
1403 | prim.CollisionSoundVolume = (float)(double)row["CollisionSoundVolume"]; | 1403 | prim.CollisionSoundVolume = (float)(double)row["CollisionSoundVolume"]; |
1404 | 1404 | ||
1405 | prim.PassTouches = ((sbyte)row["PassTouches"] != 0); | 1405 | prim.PassTouches = ((sbyte)row["PassTouches"] != 0); |
1406 | prim.PassCollisions = ((sbyte)row["PassCollisions"] != 0); | 1406 | prim.PassCollisions = ((sbyte)row["PassCollisions"] != 0); |
1407 | prim.LinkNum = (int)row["LinkNumber"]; | 1407 | prim.LinkNum = (int)row["LinkNumber"]; |
1408 | 1408 | ||
1409 | if (!(row["MediaURL"] is System.DBNull)) | 1409 | if (!(row["MediaURL"] is System.DBNull)) |
1410 | prim.MediaUrl = (string)row["MediaURL"]; | 1410 | prim.MediaUrl = (string)row["MediaURL"]; |
1411 | 1411 | ||
@@ -1421,7 +1421,7 @@ namespace OpenSim.Data.MySQL | |||
1421 | if (!(row["DynAttrs"] is System.DBNull)) | 1421 | if (!(row["DynAttrs"] is System.DBNull)) |
1422 | prim.DynAttrs = DAMap.FromXml((string)row["DynAttrs"]); | 1422 | prim.DynAttrs = DAMap.FromXml((string)row["DynAttrs"]); |
1423 | else | 1423 | else |
1424 | prim.DynAttrs = new DAMap(); | 1424 | prim.DynAttrs = new DAMap(); |
1425 | 1425 | ||
1426 | if (!(row["KeyframeMotion"] is DBNull)) | 1426 | if (!(row["KeyframeMotion"] is DBNull)) |
1427 | { | 1427 | { |
@@ -1543,10 +1543,10 @@ namespace OpenSim.Data.MySQL | |||
1543 | newSettings.Covenant = DBGuid.FromDB(row["covenant"]); | 1543 | newSettings.Covenant = DBGuid.FromDB(row["covenant"]); |
1544 | newSettings.CovenantChangedDateTime = Convert.ToInt32(row["covenant_datetime"]); | 1544 | newSettings.CovenantChangedDateTime = Convert.ToInt32(row["covenant_datetime"]); |
1545 | newSettings.LoadedCreationDateTime = Convert.ToInt32(row["loaded_creation_datetime"]); | 1545 | newSettings.LoadedCreationDateTime = Convert.ToInt32(row["loaded_creation_datetime"]); |
1546 | 1546 | ||
1547 | if (row["loaded_creation_id"] is DBNull) | 1547 | if (row["loaded_creation_id"] is DBNull) |
1548 | newSettings.LoadedCreationID = ""; | 1548 | newSettings.LoadedCreationID = ""; |
1549 | else | 1549 | else |
1550 | newSettings.LoadedCreationID = (String) row["loaded_creation_id"]; | 1550 | newSettings.LoadedCreationID = (String) row["loaded_creation_id"]; |
1551 | 1551 | ||
1552 | newSettings.TerrainImageID = DBGuid.FromDB(row["map_tile_ID"]); | 1552 | newSettings.TerrainImageID = DBGuid.FromDB(row["map_tile_ID"]); |
@@ -2023,7 +2023,7 @@ namespace OpenSim.Data.MySQL | |||
2023 | 2023 | ||
2024 | s.State = (byte)(int)row["State"]; | 2024 | s.State = (byte)(int)row["State"]; |
2025 | s.LastAttachPoint = (byte)(int)row["LastAttachPoint"]; | 2025 | s.LastAttachPoint = (byte)(int)row["LastAttachPoint"]; |
2026 | 2026 | ||
2027 | if (!(row["Media"] is System.DBNull)) | 2027 | if (!(row["Media"] is System.DBNull)) |
2028 | s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]); | 2028 | s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]); |
2029 | 2029 | ||
@@ -2103,13 +2103,13 @@ namespace OpenSim.Data.MySQL | |||
2103 | "?flags, ?itemID, ?primID, ?assetID, " + | 2103 | "?flags, ?itemID, ?primID, ?assetID, " + |
2104 | "?parentFolderID, ?creatorID, ?ownerID, " + | 2104 | "?parentFolderID, ?creatorID, ?ownerID, " + |
2105 | "?groupID, ?lastOwnerID)"; | 2105 | "?groupID, ?lastOwnerID)"; |
2106 | 2106 | ||
2107 | foreach (TaskInventoryItem item in items) | 2107 | foreach (TaskInventoryItem item in items) |
2108 | { | 2108 | { |
2109 | cmd.Parameters.Clear(); | 2109 | cmd.Parameters.Clear(); |
2110 | 2110 | ||
2111 | FillItemCommand(cmd, item); | 2111 | FillItemCommand(cmd, item); |
2112 | 2112 | ||
2113 | ExecuteNonQuery(cmd); | 2113 | ExecuteNonQuery(cmd); |
2114 | } | 2114 | } |
2115 | } | 2115 | } |