* Potential fix for Mantis#167, 332 - MySQL Thread collision.
parent
de06c85259
commit
77281ed85c
|
@ -409,6 +409,8 @@ namespace OpenSim.Data.MySQL
|
|||
/// </summary>
|
||||
/// <param name="prim"></param>
|
||||
private void LoadItems(SceneObjectPart prim)
|
||||
{
|
||||
lock (m_dataSet)
|
||||
{
|
||||
//m_log.InfoFormat("[DATASTORE]: Loading inventory for {0}, {1}", prim.Name, prim.UUID);
|
||||
|
||||
|
@ -436,15 +438,17 @@ namespace OpenSim.Data.MySQL
|
|||
prim.FolderID = inventory[0].ParentID;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void StoreTerrain(double[,] ter, LLUUID regionID)
|
||||
{
|
||||
int revision = Util.UnixTimeSinceEpoch();
|
||||
m_log.Info("[REGION DB]: Storing terrain revision r" + revision.ToString());
|
||||
|
||||
DataTable terrain = m_dataSet.Tables["terrain"];
|
||||
lock (m_dataSet)
|
||||
{
|
||||
DataTable terrain = m_dataSet.Tables["terrain"];
|
||||
|
||||
MySqlCommand cmd = new MySqlCommand("insert into terrain(RegionUUID, Revision, Heightfield)" +
|
||||
" values(?RegionUUID, ?Revision, ?Heightfield)", m_connection);
|
||||
using (cmd)
|
||||
|
@ -921,6 +925,8 @@ namespace OpenSim.Data.MySQL
|
|||
{
|
||||
// Database table was created before we got here and needs to be created! :P
|
||||
|
||||
lock (m_dataSet)
|
||||
{
|
||||
using (
|
||||
MySqlCommand cmd =
|
||||
new MySqlCommand(
|
||||
|
@ -930,6 +936,7 @@ namespace OpenSim.Data.MySQL
|
|||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
}
|
||||
return prim;
|
||||
}
|
||||
|
||||
|
@ -1230,7 +1237,8 @@ namespace OpenSim.Data.MySQL
|
|||
catch (InvalidCastException)
|
||||
{
|
||||
// Database table was created before we got here and needs to be created! :P
|
||||
|
||||
lock (m_dataSet)
|
||||
{
|
||||
using (
|
||||
MySqlCommand cmd =
|
||||
new MySqlCommand(
|
||||
|
@ -1240,6 +1248,7 @@ namespace OpenSim.Data.MySQL
|
|||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
@ -1282,6 +1291,8 @@ namespace OpenSim.Data.MySQL
|
|||
row["State"] = s.State;
|
||||
}
|
||||
catch (MySqlException)
|
||||
{
|
||||
lock (m_dataSet)
|
||||
{
|
||||
// Database table was created before we got here and needs to be created! :P
|
||||
using (
|
||||
|
@ -1294,8 +1305,11 @@ namespace OpenSim.Data.MySQL
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void addPrim(SceneObjectPart prim, LLUUID sceneGroupID, LLUUID regionUUID)
|
||||
{
|
||||
lock (m_dataSet)
|
||||
{
|
||||
DataTable prims = m_dataSet.Tables["prims"];
|
||||
DataTable shapes = m_dataSet.Tables["primshapes"];
|
||||
|
@ -1324,6 +1338,7 @@ namespace OpenSim.Data.MySQL
|
|||
fillShapeRow(shapeRow, prim);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// see IRegionDatastore
|
||||
public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items)
|
||||
|
|
Loading…
Reference in New Issue