Thank you, Strawberry Fride, for a patch that brings MSSQL even with MySQL
parent
264eeffd02
commit
c3ba97c80a
|
@ -157,11 +157,11 @@ namespace OpenSim.Data.MSSQL
|
||||||
|
|
||||||
//After this we have a empty fully configured DataSet.
|
//After this we have a empty fully configured DataSet.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Dispose the database
|
/// Dispose the database
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void Dispose() {}
|
public void Dispose() { }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Loads the objects present in the region.
|
/// Loads the objects present in the region.
|
||||||
|
@ -344,35 +344,34 @@ namespace OpenSim.Data.MSSQL
|
||||||
&& (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.Temporary) == 0
|
&& (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.Temporary) == 0
|
||||||
&& (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.TemporaryOnRez) == 0)
|
&& (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.TemporaryOnRez) == 0)
|
||||||
{
|
{
|
||||||
lock (_PrimsDataSet)
|
|
||||||
|
DataTable prims = _PrimsDataSet.Tables["prims"];
|
||||||
|
DataTable shapes = _PrimsDataSet.Tables["primshapes"];
|
||||||
|
|
||||||
|
DataRow primRow = prims.Rows.Find(prim.UUID.ToString());
|
||||||
|
if (primRow == null)
|
||||||
{
|
{
|
||||||
DataTable prims = _PrimsDataSet.Tables["prims"];
|
primRow = prims.NewRow();
|
||||||
DataTable shapes = _PrimsDataSet.Tables["primshapes"];
|
fillPrimRow(primRow, prim, obj.UUID, regionUUID);
|
||||||
|
prims.Rows.Add(primRow);
|
||||||
DataRow primRow = prims.Rows.Find(prim.UUID.ToString());
|
|
||||||
if (primRow == null)
|
|
||||||
{
|
|
||||||
primRow = prims.NewRow();
|
|
||||||
fillPrimRow(primRow, prim, obj.UUID, regionUUID);
|
|
||||||
prims.Rows.Add(primRow);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fillPrimRow(primRow, prim, obj.UUID, regionUUID);
|
|
||||||
}
|
|
||||||
|
|
||||||
DataRow shapeRow = shapes.Rows.Find(prim.UUID.ToString());
|
|
||||||
if (shapeRow == null)
|
|
||||||
{
|
|
||||||
shapeRow = shapes.NewRow();
|
|
||||||
fillShapeRow(shapeRow, prim);
|
|
||||||
shapes.Rows.Add(shapeRow);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fillShapeRow(shapeRow, prim);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fillPrimRow(primRow, prim, obj.UUID, regionUUID);
|
||||||
|
}
|
||||||
|
|
||||||
|
DataRow shapeRow = shapes.Rows.Find(prim.UUID.ToString());
|
||||||
|
if (shapeRow == null)
|
||||||
|
{
|
||||||
|
shapeRow = shapes.NewRow();
|
||||||
|
fillShapeRow(shapeRow, prim);
|
||||||
|
shapes.Rows.Add(shapeRow);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fillShapeRow(shapeRow, prim);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -582,9 +581,9 @@ namespace OpenSim.Data.MSSQL
|
||||||
|
|
||||||
//Insert new values
|
//Insert new values
|
||||||
string sql = @"INSERT INTO [land]
|
string sql = @"INSERT INTO [land]
|
||||||
([UUID],[RegionUUID],[LocalLandID],[Bitmap],[Name],[Description],[OwnerUUID],[IsGroupOwned],[Area],[AuctionID],[Category],[ClaimDate],[ClaimPrice],[GroupUUID],[SalePrice],[LandStatus],[LandFlags],[LandingType],[MediaAutoScale],[MediaTextureUUID],[MediaURL],[MusicURL],[PassHours],[PassPrice],[SnapshotUUID],[UserLocationX],[UserLocationY],[UserLocationZ],[UserLookAtX],[UserLookAtY],[UserLookAtZ],[AuthbuyerID])
|
([UUID],[RegionUUID],[LocalLandID],[Bitmap],[Name],[Description],[OwnerUUID],[IsGroupOwned],[Area],[AuctionID],[Category],[ClaimDate],[ClaimPrice],[GroupUUID],[SalePrice],[LandStatus],[LandFlags],[LandingType],[MediaAutoScale],[MediaTextureUUID],[MediaURL],[MusicURL],[PassHours],[PassPrice],[SnapshotUUID],[UserLocationX],[UserLocationY],[UserLocationZ],[UserLookAtX],[UserLookAtY],[UserLookAtZ],[AuthbuyerID],[OtherCleanTime],[Dwell])
|
||||||
VALUES
|
VALUES
|
||||||
(@UUID,@RegionUUID,@LocalLandID,@Bitmap,@Name,@Description,@OwnerUUID,@IsGroupOwned,@Area,@AuctionID,@Category,@ClaimDate,@ClaimPrice,@GroupUUID,@SalePrice,@LandStatus,@LandFlags,@LandingType,@MediaAutoScale,@MediaTextureUUID,@MediaURL,@MusicURL,@PassHours,@PassPrice,@SnapshotUUID,@UserLocationX,@UserLocationY,@UserLocationZ,@UserLookAtX,@UserLookAtY,@UserLookAtZ,@AuthbuyerID)";
|
(@UUID,@RegionUUID,@LocalLandID,@Bitmap,@Name,@Description,@OwnerUUID,@IsGroupOwned,@Area,@AuctionID,@Category,@ClaimDate,@ClaimPrice,@GroupUUID,@SalePrice,@LandStatus,@LandFlags,@LandingType,@MediaAutoScale,@MediaTextureUUID,@MediaURL,@MusicURL,@PassHours,@PassPrice,@SnapshotUUID,@UserLocationX,@UserLocationY,@UserLocationZ,@UserLookAtX,@UserLookAtY,@UserLookAtZ,@AuthbuyerID,@OtherCleanTime,@Dwell)";
|
||||||
|
|
||||||
using (AutoClosingSqlCommand cmd = _Database.Query(sql))
|
using (AutoClosingSqlCommand cmd = _Database.Query(sql))
|
||||||
{
|
{
|
||||||
|
@ -881,6 +880,9 @@ VALUES
|
||||||
if (UUID.TryParse((string)row["SnapshotUUID"], out snapshotID))
|
if (UUID.TryParse((string)row["SnapshotUUID"], out snapshotID))
|
||||||
newData.SnapshotID = snapshotID;
|
newData.SnapshotID = snapshotID;
|
||||||
|
|
||||||
|
newData.OtherCleanTime = Convert.ToInt32(row["OtherCleanTime"]);
|
||||||
|
newData.Dwell = Convert.ToInt32(row["Dwell"]);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
newData.UserLocation =
|
newData.UserLocation =
|
||||||
|
@ -1226,7 +1228,7 @@ VALUES
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private SqlParameter[] CreateLandParameters(LandData land, UUID regionUUID)
|
private SqlParameter[] CreateLandParameters(LandData land, UUID regionUUID)
|
||||||
{
|
{
|
||||||
SqlParameter[] parameters = new SqlParameter[32];
|
SqlParameter[] parameters = new SqlParameter[34];
|
||||||
|
|
||||||
parameters[0] = _Database.CreateParameter("UUID", land.GlobalID);
|
parameters[0] = _Database.CreateParameter("UUID", land.GlobalID);
|
||||||
parameters[1] = _Database.CreateParameter("RegionUUID", regionUUID);
|
parameters[1] = _Database.CreateParameter("RegionUUID", regionUUID);
|
||||||
|
@ -1263,6 +1265,8 @@ VALUES
|
||||||
parameters[29] = _Database.CreateParameter("UserLookAtY", land.UserLookAt.Y);
|
parameters[29] = _Database.CreateParameter("UserLookAtY", land.UserLookAt.Y);
|
||||||
parameters[30] = _Database.CreateParameter("UserLookAtZ", land.UserLookAt.Z);
|
parameters[30] = _Database.CreateParameter("UserLookAtZ", land.UserLookAt.Z);
|
||||||
parameters[31] = _Database.CreateParameter("AuthBuyerID", land.AuthBuyerID);
|
parameters[31] = _Database.CreateParameter("AuthBuyerID", land.AuthBuyerID);
|
||||||
|
parameters[32] = _Database.CreateParameter("OtherCleanTime", land.OtherCleanTime);
|
||||||
|
parameters[33] = _Database.CreateParameter("Dwell", land.Dwell);
|
||||||
|
|
||||||
return parameters;
|
return parameters;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue