aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLSimulationData.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MySQL/MySQLSimulationData.cs (renamed from OpenSim/Data/MySQL/MySQLLegacyRegionData.cs)33
1 files changed, 21 insertions, 12 deletions
diff --git a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs
index a39e68d..87f6d07 100644
--- a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs
+++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs
@@ -45,13 +45,22 @@ namespace OpenSim.Data.MySQL
45 /// <summary> 45 /// <summary>
46 /// A MySQL Interface for the Region Server 46 /// A MySQL Interface for the Region Server
47 /// </summary> 47 /// </summary>
48 public class MySQLDataStore : IRegionDataStore 48 public class MySQLSimulationData : ISimulationDataStore
49 { 49 {
50 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 50 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
51 51
52 private string m_connectionString; 52 private string m_connectionString;
53 private object m_dbLock = new object(); 53 private object m_dbLock = new object();
54 54
55 public MySQLSimulationData()
56 {
57 }
58
59 public MySQLSimulationData(string connectionString)
60 {
61 Initialise(connectionString);
62 }
63
55 public void Initialise(string connectionString) 64 public void Initialise(string connectionString)
56 { 65 {
57 m_connectionString = connectionString; 66 m_connectionString = connectionString;
@@ -680,7 +689,7 @@ namespace OpenSim.Data.MySQL
680 "UserLocationX, UserLocationY, UserLocationZ, " + 689 "UserLocationX, UserLocationY, UserLocationZ, " +
681 "UserLookAtX, UserLookAtY, UserLookAtZ, " + 690 "UserLookAtX, UserLookAtY, UserLookAtZ, " +
682 "AuthbuyerID, OtherCleanTime, MediaType, MediaDescription, " + 691 "AuthbuyerID, OtherCleanTime, MediaType, MediaDescription, " +
683 "MediaSize, MediaLoop, ObscureMusic, ObscureMedia) values (" + 692 "MediaSize, MediaLoop, ObscureMusic, ObscureMedia) values (" +
684 "?UUID, ?RegionUUID, " + 693 "?UUID, ?RegionUUID, " +
685 "?LocalLandID, ?Bitmap, ?Name, ?Description, " + 694 "?LocalLandID, ?Bitmap, ?Name, ?Description, " +
686 "?OwnerUUID, ?IsGroupOwned, ?Area, ?AuctionID, " + 695 "?OwnerUUID, ?IsGroupOwned, ?Area, ?AuctionID, " +
@@ -691,7 +700,7 @@ namespace OpenSim.Data.MySQL
691 "?UserLocationX, ?UserLocationY, ?UserLocationZ, " + 700 "?UserLocationX, ?UserLocationY, ?UserLocationZ, " +
692 "?UserLookAtX, ?UserLookAtY, ?UserLookAtZ, " + 701 "?UserLookAtX, ?UserLookAtY, ?UserLookAtZ, " +
693 "?AuthbuyerID, ?OtherCleanTime, ?MediaType, ?MediaDescription, "+ 702 "?AuthbuyerID, ?OtherCleanTime, ?MediaType, ?MediaDescription, "+
694 "CONCAT(?MediaWidth, ',', ?MediaHeight), ?MediaLoop, ?ObscureMusic, ?ObscureMedia)"; 703 "CONCAT(?MediaWidth, ',', ?MediaHeight), ?MediaLoop, ?ObscureMusic, ?ObscureMedia)";
695 704
696 FillLandCommand(cmd, parcel.LandData, parcel.RegionUUID); 705 FillLandCommand(cmd, parcel.LandData, parcel.RegionUUID);
697 706
@@ -728,7 +737,7 @@ namespace OpenSim.Data.MySQL
728 737
729 string command = "select * from `regionwindlight` where region_id = ?regionID"; 738 string command = "select * from `regionwindlight` where region_id = ?regionID";
730 739
731 using(MySqlCommand cmd = new MySqlCommand(command)) 740 using (MySqlCommand cmd = new MySqlCommand(command))
732 { 741 {
733 cmd.Connection = dbcon; 742 cmd.Connection = dbcon;
734 743
@@ -1350,13 +1359,13 @@ namespace OpenSim.Data.MySQL
1350 m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name); 1359 m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name);
1351 } 1360 }
1352 1361
1353 newData.MediaDescription = (string) row["MediaDescription"]; 1362 newData.MediaDescription = (string) row["MediaDescription"];
1354 newData.MediaType = (string) row["MediaType"]; 1363 newData.MediaType = (string) row["MediaType"];
1355 newData.MediaWidth = Convert.ToInt32((((string) row["MediaSize"]).Split(','))[0]); 1364 newData.MediaWidth = Convert.ToInt32((((string) row["MediaSize"]).Split(','))[0]);
1356 newData.MediaHeight = Convert.ToInt32((((string) row["MediaSize"]).Split(','))[1]); 1365 newData.MediaHeight = Convert.ToInt32((((string) row["MediaSize"]).Split(','))[1]);
1357 newData.MediaLoop = Convert.ToBoolean(row["MediaLoop"]); 1366 newData.MediaLoop = Convert.ToBoolean(row["MediaLoop"]);
1358 newData.ObscureMusic = Convert.ToBoolean(row["ObscureMusic"]); 1367 newData.ObscureMusic = Convert.ToBoolean(row["ObscureMusic"]);
1359 newData.ObscureMedia = Convert.ToBoolean(row["ObscureMedia"]); 1368 newData.ObscureMedia = Convert.ToBoolean(row["ObscureMedia"]);
1360 1369
1361 newData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>(); 1370 newData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
1362 1371
@@ -1724,7 +1733,7 @@ namespace OpenSim.Data.MySQL
1724 1733
1725 s.State = (byte)(int)row["State"]; 1734 s.State = (byte)(int)row["State"];
1726 1735
1727 if (!(row["Media"] is System.DBNull)) 1736 if (!(row["Media"] is System.DBNull))
1728 s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]); 1737 s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]);
1729 1738
1730 return s; 1739 return s;