aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data')
-rw-r--r--OpenSim/Data/AssetDataBase.cs2
-rw-r--r--OpenSim/Data/IAssetData.cs2
-rw-r--r--OpenSim/Data/IUserAccountData.cs1
-rw-r--r--OpenSim/Data/MSSQL/MSSQLAssetData.cs4
-rw-r--r--OpenSim/Data/MSSQL/MSSQLAvatarData.cs2
-rw-r--r--OpenSim/Data/MSSQL/MSSQLGenericTableHandler.cs4
-rw-r--r--OpenSim/Data/MSSQL/MSSQLGridUserData.cs2
-rw-r--r--OpenSim/Data/MSSQL/MSSQLManager.cs4
-rw-r--r--OpenSim/Data/MSSQL/MSSQLPresenceData.cs2
-rw-r--r--OpenSim/Data/MSSQL/MSSQLUserAccountData.cs5
-rw-r--r--OpenSim/Data/MSSQL/MSSQLXInventoryData.cs4
-rw-r--r--OpenSim/Data/MySQL/MySQLAssetData.cs4
-rw-r--r--OpenSim/Data/MySQL/MySQLSimulationData.cs41
-rw-r--r--OpenSim/Data/MySQL/MySQLUserAccountData.cs43
-rw-r--r--OpenSim/Data/MySQL/Resources/RegionStore.migrations2
-rw-r--r--OpenSim/Data/Null/NullUserAccountData.cs5
-rw-r--r--OpenSim/Data/SQLite/SQLiteAssetData.cs4
-rw-r--r--OpenSim/Data/SQLite/SQLiteUserAccountData.cs5
18 files changed, 92 insertions, 44 deletions
diff --git a/OpenSim/Data/AssetDataBase.cs b/OpenSim/Data/AssetDataBase.cs
index e1a810c..b4ae913 100644
--- a/OpenSim/Data/AssetDataBase.cs
+++ b/OpenSim/Data/AssetDataBase.cs
@@ -38,7 +38,7 @@ namespace OpenSim.Data
38 { 38 {
39 public abstract AssetBase GetAsset(UUID uuid); 39 public abstract AssetBase GetAsset(UUID uuid);
40 40
41 public abstract void StoreAsset(AssetBase asset); 41 public abstract bool StoreAsset(AssetBase asset);
42 public abstract bool ExistsAsset(UUID uuid); 42 public abstract bool ExistsAsset(UUID uuid);
43 43
44 public abstract List<AssetMetadata> FetchAssetMetadataSet(int start, int count); 44 public abstract List<AssetMetadata> FetchAssetMetadataSet(int start, int count);
diff --git a/OpenSim/Data/IAssetData.cs b/OpenSim/Data/IAssetData.cs
index f31b215c..0c8eadd 100644
--- a/OpenSim/Data/IAssetData.cs
+++ b/OpenSim/Data/IAssetData.cs
@@ -34,7 +34,7 @@ namespace OpenSim.Data
34 public interface IAssetDataPlugin : IPlugin 34 public interface IAssetDataPlugin : IPlugin
35 { 35 {
36 AssetBase GetAsset(UUID uuid); 36 AssetBase GetAsset(UUID uuid);
37 void StoreAsset(AssetBase asset); 37 bool StoreAsset(AssetBase asset);
38 bool ExistsAsset(UUID uuid); 38 bool ExistsAsset(UUID uuid);
39 List<AssetMetadata> FetchAssetMetadataSet(int start, int count); 39 List<AssetMetadata> FetchAssetMetadataSet(int start, int count);
40 void Initialise(string connect); 40 void Initialise(string connect);
diff --git a/OpenSim/Data/IUserAccountData.cs b/OpenSim/Data/IUserAccountData.cs
index 906ba6c..bc7eda7 100644
--- a/OpenSim/Data/IUserAccountData.cs
+++ b/OpenSim/Data/IUserAccountData.cs
@@ -50,5 +50,6 @@ namespace OpenSim.Data
50 bool Store(UserAccountData data); 50 bool Store(UserAccountData data);
51 bool Delete(string field, string val); 51 bool Delete(string field, string val);
52 UserAccountData[] GetUsers(UUID scopeID, string query); 52 UserAccountData[] GetUsers(UUID scopeID, string query);
53 UserAccountData[] GetUsersWhere(UUID scopeID, string where);
53 } 54 }
54} 55}
diff --git a/OpenSim/Data/MSSQL/MSSQLAssetData.cs b/OpenSim/Data/MSSQL/MSSQLAssetData.cs
index c7488d8..c882555 100644
--- a/OpenSim/Data/MSSQL/MSSQLAssetData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLAssetData.cs
@@ -143,7 +143,7 @@ namespace OpenSim.Data.MSSQL
143 /// Create asset in m_database 143 /// Create asset in m_database
144 /// </summary> 144 /// </summary>
145 /// <param name="asset">the asset</param> 145 /// <param name="asset">the asset</param>
146 override public void StoreAsset(AssetBase asset) 146 override public bool StoreAsset(AssetBase asset)
147 { 147 {
148 148
149 string sql = 149 string sql =
@@ -192,10 +192,12 @@ namespace OpenSim.Data.MSSQL
192 try 192 try
193 { 193 {
194 command.ExecuteNonQuery(); 194 command.ExecuteNonQuery();
195 return true;
195 } 196 }
196 catch(Exception e) 197 catch(Exception e)
197 { 198 {
198 m_log.Error("[ASSET DB]: Error storing item :" + e.Message); 199 m_log.Error("[ASSET DB]: Error storing item :" + e.Message);
200 return false;
199 } 201 }
200 } 202 }
201 } 203 }
diff --git a/OpenSim/Data/MSSQL/MSSQLAvatarData.cs b/OpenSim/Data/MSSQL/MSSQLAvatarData.cs
index 301b424..49a6b09 100644
--- a/OpenSim/Data/MSSQL/MSSQLAvatarData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLAvatarData.cs
@@ -43,7 +43,7 @@ namespace OpenSim.Data.MSSQL
43 public class MSSQLAvatarData : MSSQLGenericTableHandler<AvatarBaseData>, 43 public class MSSQLAvatarData : MSSQLGenericTableHandler<AvatarBaseData>,
44 IAvatarData 44 IAvatarData
45 { 45 {
46// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 47
48 public MSSQLAvatarData(string connectionString, string realm) : 48 public MSSQLAvatarData(string connectionString, string realm) :
49 base(connectionString, realm, "Avatar") 49 base(connectionString, realm, "Avatar")
diff --git a/OpenSim/Data/MSSQL/MSSQLGenericTableHandler.cs b/OpenSim/Data/MSSQL/MSSQLGenericTableHandler.cs
index 4145d95..8f471c4 100644
--- a/OpenSim/Data/MSSQL/MSSQLGenericTableHandler.cs
+++ b/OpenSim/Data/MSSQL/MSSQLGenericTableHandler.cs
@@ -40,8 +40,8 @@ namespace OpenSim.Data.MSSQL
40{ 40{
41 public class MSSQLGenericTableHandler<T> where T : class, new() 41 public class MSSQLGenericTableHandler<T> where T : class, new()
42 { 42 {
43// private static readonly ILog m_log = 43 private static readonly ILog m_log =
44// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 45
46 protected string m_ConnectionString; 46 protected string m_ConnectionString;
47 protected MSSQLManager m_database; //used for parameter type translation 47 protected MSSQLManager m_database; //used for parameter type translation
diff --git a/OpenSim/Data/MSSQL/MSSQLGridUserData.cs b/OpenSim/Data/MSSQL/MSSQLGridUserData.cs
index 9e215f9..1870273 100644
--- a/OpenSim/Data/MSSQL/MSSQLGridUserData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLGridUserData.cs
@@ -43,7 +43,7 @@ namespace OpenSim.Data.MSSQL
43 public class MSSQLGridUserData : MSSQLGenericTableHandler<GridUserData>, 43 public class MSSQLGridUserData : MSSQLGenericTableHandler<GridUserData>,
44 IGridUserData 44 IGridUserData
45 { 45 {
46// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 47
48 public MSSQLGridUserData(string connectionString, string realm) : 48 public MSSQLGridUserData(string connectionString, string realm) :
49 base(connectionString, realm, "GridUserStore") 49 base(connectionString, realm, "GridUserStore")
diff --git a/OpenSim/Data/MSSQL/MSSQLManager.cs b/OpenSim/Data/MSSQL/MSSQLManager.cs
index cf963e3..575fd21 100644
--- a/OpenSim/Data/MSSQL/MSSQLManager.cs
+++ b/OpenSim/Data/MSSQL/MSSQLManager.cs
@@ -41,7 +41,7 @@ namespace OpenSim.Data.MSSQL
41 /// </summary> 41 /// </summary>
42 public class MSSQLManager 42 public class MSSQLManager
43 { 43 {
44// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 45
46 /// <summary> 46 /// <summary>
47 /// Connection string for ADO.net 47 /// Connection string for ADO.net
@@ -180,6 +180,8 @@ namespace OpenSim.Data.MSSQL
180 return parameter; 180 return parameter;
181 } 181 }
182 182
183 private static readonly Dictionary<string, string> emptyDictionary = new Dictionary<string, string>();
184
183 /// <summary> 185 /// <summary>
184 /// Checks if we need to do some migrations to the database 186 /// Checks if we need to do some migrations to the database
185 /// </summary> 187 /// </summary>
diff --git a/OpenSim/Data/MSSQL/MSSQLPresenceData.cs b/OpenSim/Data/MSSQL/MSSQLPresenceData.cs
index 8068d23..e7b3d9c 100644
--- a/OpenSim/Data/MSSQL/MSSQLPresenceData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLPresenceData.cs
@@ -43,7 +43,7 @@ namespace OpenSim.Data.MSSQL
43 public class MSSQLPresenceData : MSSQLGenericTableHandler<PresenceData>, 43 public class MSSQLPresenceData : MSSQLGenericTableHandler<PresenceData>,
44 IPresenceData 44 IPresenceData
45 { 45 {
46// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 47
48 public MSSQLPresenceData(string connectionString, string realm) : 48 public MSSQLPresenceData(string connectionString, string realm) :
49 base(connectionString, realm, "Presence") 49 base(connectionString, realm, "Presence")
diff --git a/OpenSim/Data/MSSQL/MSSQLUserAccountData.cs b/OpenSim/Data/MSSQL/MSSQLUserAccountData.cs
index 7feec91..dd0689c 100644
--- a/OpenSim/Data/MSSQL/MSSQLUserAccountData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLUserAccountData.cs
@@ -242,5 +242,10 @@ namespace OpenSim.Data.MSSQL
242 return DoQuery(cmd); 242 return DoQuery(cmd);
243 } 243 }
244 } 244 }
245
246 public UserAccountData[] GetUsersWhere(UUID scopeID, string where)
247 {
248 return null;
249 }
245 } 250 }
246} 251}
diff --git a/OpenSim/Data/MSSQL/MSSQLXInventoryData.cs b/OpenSim/Data/MSSQL/MSSQLXInventoryData.cs
index b19a0da..a1069c6 100644
--- a/OpenSim/Data/MSSQL/MSSQLXInventoryData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLXInventoryData.cs
@@ -40,8 +40,8 @@ namespace OpenSim.Data.MSSQL
40{ 40{
41 public class MSSQLXInventoryData : IXInventoryData 41 public class MSSQLXInventoryData : IXInventoryData
42 { 42 {
43// private static readonly ILog m_log = LogManager.GetLogger( 43 private static readonly ILog m_log = LogManager.GetLogger(
44// MethodBase.GetCurrentMethod().DeclaringType); 44 MethodBase.GetCurrentMethod().DeclaringType);
45 45
46 private MSSQLGenericTableHandler<XInventoryFolder> m_Folders; 46 private MSSQLGenericTableHandler<XInventoryFolder> m_Folders;
47 private MSSQLItemHandler m_Items; 47 private MSSQLItemHandler m_Items;
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs
index a743479..a22dc0a 100644
--- a/OpenSim/Data/MySQL/MySQLAssetData.cs
+++ b/OpenSim/Data/MySQL/MySQLAssetData.cs
@@ -155,7 +155,7 @@ namespace OpenSim.Data.MySQL
155 /// </summary> 155 /// </summary>
156 /// <param name="asset">Asset UUID to create</param> 156 /// <param name="asset">Asset UUID to create</param>
157 /// <remarks>On failure : Throw an exception and attempt to reconnect to database</remarks> 157 /// <remarks>On failure : Throw an exception and attempt to reconnect to database</remarks>
158 override public void StoreAsset(AssetBase asset) 158 override public bool StoreAsset(AssetBase asset)
159 { 159 {
160 lock (m_dbLock) 160 lock (m_dbLock)
161 { 161 {
@@ -203,12 +203,14 @@ namespace OpenSim.Data.MySQL
203 cmd.Parameters.AddWithValue("?data", asset.Data); 203 cmd.Parameters.AddWithValue("?data", asset.Data);
204 cmd.ExecuteNonQuery(); 204 cmd.ExecuteNonQuery();
205 cmd.Dispose(); 205 cmd.Dispose();
206 return true;
206 } 207 }
207 } 208 }
208 catch (Exception e) 209 catch (Exception e)
209 { 210 {
210 m_log.ErrorFormat("[ASSET DB]: MySQL failure creating asset {0} with name \"{1}\". Error: {2}", 211 m_log.ErrorFormat("[ASSET DB]: MySQL failure creating asset {0} with name \"{1}\". Error: {2}",
211 asset.FullID, asset.Name, e.Message); 212 asset.FullID, asset.Name, e.Message);
213 return false;
212 } 214 }
213 } 215 }
214 } 216 }
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs
index 6d14b82..3437250 100644
--- a/OpenSim/Data/MySQL/MySQLSimulationData.cs
+++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs
@@ -66,7 +66,7 @@ namespace OpenSim.Data.MySQL
66 Initialise(connectionString); 66 Initialise(connectionString);
67 } 67 }
68 68
69 public void Initialise(string connectionString) 69 public virtual void Initialise(string connectionString)
70 { 70 {
71 m_connectionString = connectionString; 71 m_connectionString = connectionString;
72 72
@@ -113,7 +113,7 @@ namespace OpenSim.Data.MySQL
113 113
114 public void Dispose() {} 114 public void Dispose() {}
115 115
116 public void StoreObject(SceneObjectGroup obj, UUID regionUUID) 116 public virtual void StoreObject(SceneObjectGroup obj, UUID regionUUID)
117 { 117 {
118 uint flags = obj.RootPart.GetEffectiveObjectFlags(); 118 uint flags = obj.RootPart.GetEffectiveObjectFlags();
119 119
@@ -241,7 +241,7 @@ namespace OpenSim.Data.MySQL
241 } 241 }
242 } 242 }
243 243
244 public void RemoveObject(UUID obj, UUID regionUUID) 244 public virtual void RemoveObject(UUID obj, UUID regionUUID)
245 { 245 {
246// m_log.DebugFormat("[REGION DB]: Deleting scene object {0} from {1} in database", obj, regionUUID); 246// m_log.DebugFormat("[REGION DB]: Deleting scene object {0} from {1} in database", obj, regionUUID);
247 247
@@ -390,7 +390,7 @@ namespace OpenSim.Data.MySQL
390 } 390 }
391 } 391 }
392 392
393 public List<SceneObjectGroup> LoadObjects(UUID regionID) 393 public virtual List<SceneObjectGroup> LoadObjects(UUID regionID)
394 { 394 {
395 const int ROWS_PER_QUERY = 5000; 395 const int ROWS_PER_QUERY = 5000;
396 396
@@ -559,7 +559,7 @@ namespace OpenSim.Data.MySQL
559 } 559 }
560 } 560 }
561 561
562 public void StoreTerrain(double[,] ter, UUID regionID) 562 public virtual void StoreTerrain(double[,] ter, UUID regionID)
563 { 563 {
564 m_log.Info("[REGION DB]: Storing terrain"); 564 m_log.Info("[REGION DB]: Storing terrain");
565 565
@@ -588,7 +588,7 @@ namespace OpenSim.Data.MySQL
588 } 588 }
589 } 589 }
590 590
591 public double[,] LoadTerrain(UUID regionID) 591 public virtual double[,] LoadTerrain(UUID regionID)
592 { 592 {
593 double[,] terrain = null; 593 double[,] terrain = null;
594 594
@@ -638,7 +638,7 @@ namespace OpenSim.Data.MySQL
638 return terrain; 638 return terrain;
639 } 639 }
640 640
641 public void RemoveLandObject(UUID globalID) 641 public virtual void RemoveLandObject(UUID globalID)
642 { 642 {
643 lock (m_dbLock) 643 lock (m_dbLock)
644 { 644 {
@@ -657,7 +657,7 @@ namespace OpenSim.Data.MySQL
657 } 657 }
658 } 658 }
659 659
660 public void StoreLandObject(ILandObject parcel) 660 public virtual void StoreLandObject(ILandObject parcel)
661 { 661 {
662 lock (m_dbLock) 662 lock (m_dbLock)
663 { 663 {
@@ -714,7 +714,7 @@ namespace OpenSim.Data.MySQL
714 } 714 }
715 } 715 }
716 716
717 public RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID) 717 public virtual RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID)
718 { 718 {
719 RegionLightShareData nWP = new RegionLightShareData(); 719 RegionLightShareData nWP = new RegionLightShareData();
720 nWP.OnSave += StoreRegionWindlightSettings; 720 nWP.OnSave += StoreRegionWindlightSettings;
@@ -736,7 +736,7 @@ namespace OpenSim.Data.MySQL
736 { 736 {
737 //No result, so store our default windlight profile and return it 737 //No result, so store our default windlight profile and return it
738 nWP.regionID = regionUUID; 738 nWP.regionID = regionUUID;
739 StoreRegionWindlightSettings(nWP); 739 // StoreRegionWindlightSettings(nWP);
740 return nWP; 740 return nWP;
741 } 741 }
742 else 742 else
@@ -811,7 +811,7 @@ namespace OpenSim.Data.MySQL
811 return nWP; 811 return nWP;
812 } 812 }
813 813
814 public RegionSettings LoadRegionSettings(UUID regionUUID) 814 public virtual RegionSettings LoadRegionSettings(UUID regionUUID)
815 { 815 {
816 RegionSettings rs = null; 816 RegionSettings rs = null;
817 817
@@ -849,7 +849,7 @@ namespace OpenSim.Data.MySQL
849 return rs; 849 return rs;
850 } 850 }
851 851
852 public void StoreRegionWindlightSettings(RegionLightShareData wl) 852 public virtual void StoreRegionWindlightSettings(RegionLightShareData wl)
853 { 853 {
854 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) 854 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
855 { 855 {
@@ -952,7 +952,7 @@ namespace OpenSim.Data.MySQL
952 } 952 }
953 } 953 }
954 954
955 public void RemoveRegionWindlightSettings(UUID regionID) 955 public virtual void RemoveRegionWindlightSettings(UUID regionID)
956 { 956 {
957 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) 957 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
958 { 958 {
@@ -967,7 +967,7 @@ namespace OpenSim.Data.MySQL
967 } 967 }
968 } 968 }
969 969
970 public void StoreRegionSettings(RegionSettings rs) 970 public virtual void StoreRegionSettings(RegionSettings rs)
971 { 971 {
972 lock (m_dbLock) 972 lock (m_dbLock)
973 { 973 {
@@ -994,7 +994,7 @@ namespace OpenSim.Data.MySQL
994 "use_estate_sun, fixed_sun, sun_position, " + 994 "use_estate_sun, fixed_sun, sun_position, " +
995 "covenant, Sandbox, sunvectorx, sunvectory, " + 995 "covenant, Sandbox, sunvectorx, sunvectory, " +
996 "sunvectorz, loaded_creation_datetime, " + 996 "sunvectorz, loaded_creation_datetime, " +
997 "loaded_creation_id, map_tile_ID) values (?RegionUUID, ?BlockTerraform, " + 997 "loaded_creation_id, map_tile_ID, block_search, casino) values (?RegionUUID, ?BlockTerraform, " +
998 "?BlockFly, ?AllowDamage, ?RestrictPushing, " + 998 "?BlockFly, ?AllowDamage, ?RestrictPushing, " +
999 "?AllowLandResell, ?AllowLandJoinDivide, " + 999 "?AllowLandResell, ?AllowLandJoinDivide, " +
1000 "?BlockShowInSearch, ?AgentLimit, ?ObjectBonus, " + 1000 "?BlockShowInSearch, ?AgentLimit, ?ObjectBonus, " +
@@ -1009,7 +1009,7 @@ namespace OpenSim.Data.MySQL
1009 "?SunPosition, ?Covenant, ?Sandbox, " + 1009 "?SunPosition, ?Covenant, ?Sandbox, " +
1010 "?SunVectorX, ?SunVectorY, ?SunVectorZ, " + 1010 "?SunVectorX, ?SunVectorY, ?SunVectorZ, " +
1011 "?LoadedCreationDateTime, ?LoadedCreationID, " + 1011 "?LoadedCreationDateTime, ?LoadedCreationID, " +
1012 "?TerrainImageID)"; 1012 "?TerrainImageID, ?block_search, ?casino)";
1013 1013
1014 FillRegionSettingsCommand(cmd, rs); 1014 FillRegionSettingsCommand(cmd, rs);
1015 1015
@@ -1019,7 +1019,7 @@ namespace OpenSim.Data.MySQL
1019 } 1019 }
1020 } 1020 }
1021 1021
1022 public List<LandData> LoadLandObjects(UUID regionUUID) 1022 public virtual List<LandData> LoadLandObjects(UUID regionUUID)
1023 { 1023 {
1024 List<LandData> landData = new List<LandData>(); 1024 List<LandData> landData = new List<LandData>();
1025 1025
@@ -1297,6 +1297,9 @@ namespace OpenSim.Data.MySQL
1297 1297
1298 newSettings.TerrainImageID = DBGuid.FromDB(row["map_tile_ID"]); 1298 newSettings.TerrainImageID = DBGuid.FromDB(row["map_tile_ID"]);
1299 1299
1300 newSettings.GodBlockSearch = Convert.ToBoolean(row["block_search"]);
1301 newSettings.Casino = Convert.ToBoolean(row["casino"]);
1302
1300 return newSettings; 1303 return newSettings;
1301 } 1304 }
1302 1305
@@ -1626,6 +1629,8 @@ namespace OpenSim.Data.MySQL
1626 cmd.Parameters.AddWithValue("LoadedCreationDateTime", settings.LoadedCreationDateTime); 1629 cmd.Parameters.AddWithValue("LoadedCreationDateTime", settings.LoadedCreationDateTime);
1627 cmd.Parameters.AddWithValue("LoadedCreationID", settings.LoadedCreationID); 1630 cmd.Parameters.AddWithValue("LoadedCreationID", settings.LoadedCreationID);
1628 cmd.Parameters.AddWithValue("TerrainImageID", settings.TerrainImageID); 1631 cmd.Parameters.AddWithValue("TerrainImageID", settings.TerrainImageID);
1632 cmd.Parameters.AddWithValue("block_search", settings.GodBlockSearch);
1633 cmd.Parameters.AddWithValue("casino", settings.Casino);
1629 1634
1630 } 1635 }
1631 1636
@@ -1784,7 +1789,7 @@ namespace OpenSim.Data.MySQL
1784 cmd.Parameters.AddWithValue("Media", null == s.Media ? null : s.Media.ToXml()); 1789 cmd.Parameters.AddWithValue("Media", null == s.Media ? null : s.Media.ToXml());
1785 } 1790 }
1786 1791
1787 public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items) 1792 public virtual void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items)
1788 { 1793 {
1789 lock (m_dbLock) 1794 lock (m_dbLock)
1790 { 1795 {
diff --git a/OpenSim/Data/MySQL/MySQLUserAccountData.cs b/OpenSim/Data/MySQL/MySQLUserAccountData.cs
index aa69d68..a18ac66 100644
--- a/OpenSim/Data/MySQL/MySQLUserAccountData.cs
+++ b/OpenSim/Data/MySQL/MySQLUserAccountData.cs
@@ -46,17 +46,21 @@ namespace OpenSim.Data.MySQL
46 { 46 {
47 string[] words = query.Split(new char[] {' '}); 47 string[] words = query.Split(new char[] {' '});
48 48
49 bool valid = false;
50
49 for (int i = 0 ; i < words.Length ; i++) 51 for (int i = 0 ; i < words.Length ; i++)
50 { 52 {
51 if (words[i].Length < 3) 53 if (words[i].Length > 2)
52 { 54 valid = true;
53 if (i != words.Length - 1) 55// if (words[i].Length < 3)
54 Array.Copy(words, i + 1, words, i, words.Length - i - 1); 56// {
55 Array.Resize(ref words, words.Length - 1); 57// if (i != words.Length - 1)
56 } 58// Array.Copy(words, i + 1, words, i, words.Length - i - 1);
59// Array.Resize(ref words, words.Length - 1);
60// }
57 } 61 }
58 62
59 if (words.Length == 0) 63 if ((!valid) || words.Length == 0)
60 return new UserAccountData[0]; 64 return new UserAccountData[0];
61 65
62 if (words.Length > 2) 66 if (words.Length > 2)
@@ -66,18 +70,33 @@ namespace OpenSim.Data.MySQL
66 70
67 if (words.Length == 1) 71 if (words.Length == 1)
68 { 72 {
69 cmd.CommandText = String.Format("select * from {0} where (ScopeID=?ScopeID or ScopeID='00000000-0000-0000-0000-000000000000') and (FirstName like ?search or LastName like ?search)", m_Realm); 73 cmd.CommandText = String.Format("select * from {0} where (ScopeID=?ScopeID or ScopeID='00000000-0000-0000-0000-000000000000') and (FirstName like ?search or LastName like ?search) and active=1", m_Realm);
70 cmd.Parameters.AddWithValue("?search", "%" + words[0] + "%"); 74 cmd.Parameters.AddWithValue("?search", words[0] + "%");
71 cmd.Parameters.AddWithValue("?ScopeID", scopeID.ToString()); 75 cmd.Parameters.AddWithValue("?ScopeID", scopeID.ToString());
72 } 76 }
73 else 77 else
74 { 78 {
75 cmd.CommandText = String.Format("select * from {0} where (ScopeID=?ScopeID or ScopeID='00000000-0000-0000-0000-000000000000') and (FirstName like ?searchFirst or LastName like ?searchLast)", m_Realm); 79 cmd.CommandText = String.Format("select * from {0} where (ScopeID=?ScopeID or ScopeID='00000000-0000-0000-0000-000000000000') and (FirstName like ?searchFirst and LastName like ?searchLast) and active=1", m_Realm);
76 cmd.Parameters.AddWithValue("?searchFirst", "%" + words[0] + "%"); 80 cmd.Parameters.AddWithValue("?searchFirst", words[0] + "%");
77 cmd.Parameters.AddWithValue("?searchLast", "%" + words[1] + "%"); 81 cmd.Parameters.AddWithValue("?searchLast", words[1] + "%");
82 cmd.Parameters.AddWithValue("?ScopeID", scopeID.ToString());
83 }
84
85 return DoQuery(cmd);
86 }
87
88 public UserAccountData[] GetUsersWhere(UUID scopeID, string where)
89 {
90 MySqlCommand cmd = new MySqlCommand();
91
92 if (scopeID != UUID.Zero)
93 {
94 where = "(ScopeID=?ScopeID or ScopeID='00000000-0000-0000-0000-000000000000') and (" + where + ")";
78 cmd.Parameters.AddWithValue("?ScopeID", scopeID.ToString()); 95 cmd.Parameters.AddWithValue("?ScopeID", scopeID.ToString());
79 } 96 }
80 97
98 cmd.CommandText = String.Format("select * from {0} where " + where, m_Realm);
99
81 return DoQuery(cmd); 100 return DoQuery(cmd);
82 } 101 }
83 } 102 }
diff --git a/OpenSim/Data/MySQL/Resources/RegionStore.migrations b/OpenSim/Data/MySQL/Resources/RegionStore.migrations
index 987625b..c2b130c 100644
--- a/OpenSim/Data/MySQL/Resources/RegionStore.migrations
+++ b/OpenSim/Data/MySQL/Resources/RegionStore.migrations
@@ -717,7 +717,7 @@ ALTER TABLE regionsettings ADD COLUMN loaded_creation_datetime int unsigned NOT
717 717
718COMMIT; 718COMMIT;
719 719
720:VERSION 32 720:VERSION 32 #---------------------
721 721
722BEGIN; 722BEGIN;
723CREATE TABLE `regionwindlight` ( 723CREATE TABLE `regionwindlight` (
diff --git a/OpenSim/Data/Null/NullUserAccountData.cs b/OpenSim/Data/Null/NullUserAccountData.cs
index ec54dba..241616b 100644
--- a/OpenSim/Data/Null/NullUserAccountData.cs
+++ b/OpenSim/Data/Null/NullUserAccountData.cs
@@ -193,5 +193,10 @@ namespace OpenSim.Data.Null
193 193
194 return false; 194 return false;
195 } 195 }
196
197 public UserAccountData[] GetUsersWhere(UUID scopeID, string where)
198 {
199 return null;
200 }
196 } 201 }
197} 202}
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs
index bb23fc1..723544a 100644
--- a/OpenSim/Data/SQLite/SQLiteAssetData.cs
+++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs
@@ -128,7 +128,7 @@ namespace OpenSim.Data.SQLite
128 /// Create an asset 128 /// Create an asset
129 /// </summary> 129 /// </summary>
130 /// <param name="asset">Asset Base</param> 130 /// <param name="asset">Asset Base</param>
131 override public void StoreAsset(AssetBase asset) 131 override public bool StoreAsset(AssetBase asset)
132 { 132 {
133 //m_log.Info("[ASSET DB]: Creating Asset " + asset.FullID.ToString()); 133 //m_log.Info("[ASSET DB]: Creating Asset " + asset.FullID.ToString());
134 if (ExistsAsset(asset.FullID)) 134 if (ExistsAsset(asset.FullID))
@@ -150,6 +150,7 @@ namespace OpenSim.Data.SQLite
150 cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data)); 150 cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data));
151 151
152 cmd.ExecuteNonQuery(); 152 cmd.ExecuteNonQuery();
153 return true;
153 } 154 }
154 } 155 }
155 } 156 }
@@ -170,6 +171,7 @@ namespace OpenSim.Data.SQLite
170 cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data)); 171 cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data));
171 172
172 cmd.ExecuteNonQuery(); 173 cmd.ExecuteNonQuery();
174 return true;
173 } 175 }
174 } 176 }
175 } 177 }
diff --git a/OpenSim/Data/SQLite/SQLiteUserAccountData.cs b/OpenSim/Data/SQLite/SQLiteUserAccountData.cs
index 7a5de50..4d580c0 100644
--- a/OpenSim/Data/SQLite/SQLiteUserAccountData.cs
+++ b/OpenSim/Data/SQLite/SQLiteUserAccountData.cs
@@ -81,5 +81,10 @@ namespace OpenSim.Data.SQLite
81 81
82 return DoQuery(cmd); 82 return DoQuery(cmd);
83 } 83 }
84
85 public UserAccountData[] GetUsersWhere(UUID scopeID, string where)
86 {
87 return null;
88 }
84 } 89 }
85} 90}