mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 05:45:37 +08:00
* Fixed spamming the assets table with map tiles. The tile image ID is now stored in regionsettings. Upon generation of a new tile image, the old one is deleted. Tested for SQLite and MySql standalone.
* Fixed small bug with map search where the local sim regions weren't found.
This commit is contained in:
@@ -111,7 +111,7 @@ namespace OpenSim.Data.MySQL
|
||||
dbcon.Open();
|
||||
|
||||
using (MySqlCommand cmd = new MySqlCommand(
|
||||
"SELECT name, description, assetType, local, temporary, data FROM assets WHERE id=?id",
|
||||
"SELECT name, description, assetType, local, temporary, asset_flags, data FROM assets WHERE id=?id",
|
||||
dbcon))
|
||||
{
|
||||
cmd.Parameters.AddWithValue("?id", assetID.ToString());
|
||||
@@ -133,6 +133,7 @@ namespace OpenSim.Data.MySQL
|
||||
asset.Local = false;
|
||||
|
||||
asset.Temporary = Convert.ToBoolean(dbReader["temporary"]);
|
||||
asset.Flags = (AssetFlags)Convert.ToInt32(dbReader["asset_flags"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -345,7 +346,7 @@ namespace OpenSim.Data.MySQL
|
||||
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
|
||||
{
|
||||
dbcon.Open();
|
||||
MySqlCommand cmd = new MySqlCommand("delete from assets where id=?id");
|
||||
MySqlCommand cmd = new MySqlCommand("delete from assets where id=?id", dbcon);
|
||||
cmd.Parameters.AddWithValue("?id", id);
|
||||
cmd.ExecuteNonQuery();
|
||||
|
||||
|
||||
@@ -989,7 +989,8 @@ namespace OpenSim.Data.MySQL
|
||||
"?TerrainLowerLimit, ?UseEstateSun, ?FixedSun, " +
|
||||
"?SunPosition, ?Covenant, ?Sandbox, " +
|
||||
"?SunVectorX, ?SunVectorY, ?SunVectorZ, " +
|
||||
"?LoadedCreationDateTime, ?LoadedCreationID)";
|
||||
"?LoadedCreationDateTime, ?LoadedCreationID)" +
|
||||
"?map_tile_ID, ?TerrainImageID";
|
||||
|
||||
FillRegionSettingsCommand(cmd, rs);
|
||||
|
||||
@@ -1276,6 +1277,8 @@ namespace OpenSim.Data.MySQL
|
||||
else
|
||||
newSettings.LoadedCreationID = (String) row["loaded_creation_id"];
|
||||
|
||||
newSettings.TerrainImageID = new UUID((String)row["map_tile_ID"]);
|
||||
|
||||
return newSettings;
|
||||
}
|
||||
|
||||
@@ -1596,6 +1599,7 @@ namespace OpenSim.Data.MySQL
|
||||
cmd.Parameters.AddWithValue("Covenant", settings.Covenant.ToString());
|
||||
cmd.Parameters.AddWithValue("LoadedCreationDateTime", settings.LoadedCreationDateTime);
|
||||
cmd.Parameters.AddWithValue("LoadedCreationID", settings.LoadedCreationID);
|
||||
cmd.Parameters.AddWithValue("TerrainImageID", settings.TerrainImageID);
|
||||
|
||||
}
|
||||
|
||||
|
||||
3
OpenSim/Data/MySQL/Resources/033_RegionStore.sql
Normal file
3
OpenSim/Data/MySQL/Resources/033_RegionStore.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
BEGIN;
|
||||
ALTER TABLE regionsettings ADD map_tile_ID CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
|
||||
COMMIT;
|
||||
Reference in New Issue
Block a user