diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLAssetData.cs | 4 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLUserAccountData.cs | 17 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/Resources/RegionStore.migrations | 2 |
3 files changed, 20 insertions, 3 deletions
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs index e740232..94e2da4 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/MySQLUserAccountData.cs b/OpenSim/Data/MySQL/MySQLUserAccountData.cs index aa69d68..92afa75 100644 --- a/OpenSim/Data/MySQL/MySQLUserAccountData.cs +++ b/OpenSim/Data/MySQL/MySQLUserAccountData.cs | |||
@@ -72,7 +72,7 @@ namespace OpenSim.Data.MySQL | |||
72 | } | 72 | } |
73 | else | 73 | else |
74 | { | 74 | { |
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); | 75 | 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)", m_Realm); |
76 | cmd.Parameters.AddWithValue("?searchFirst", "%" + words[0] + "%"); | 76 | cmd.Parameters.AddWithValue("?searchFirst", "%" + words[0] + "%"); |
77 | cmd.Parameters.AddWithValue("?searchLast", "%" + words[1] + "%"); | 77 | cmd.Parameters.AddWithValue("?searchLast", "%" + words[1] + "%"); |
78 | cmd.Parameters.AddWithValue("?ScopeID", scopeID.ToString()); | 78 | cmd.Parameters.AddWithValue("?ScopeID", scopeID.ToString()); |
@@ -80,5 +80,20 @@ namespace OpenSim.Data.MySQL | |||
80 | 80 | ||
81 | return DoQuery(cmd); | 81 | return DoQuery(cmd); |
82 | } | 82 | } |
83 | |||
84 | public UserAccountData[] GetUsersWhere(UUID scopeID, string where) | ||
85 | { | ||
86 | MySqlCommand cmd = new MySqlCommand(); | ||
87 | |||
88 | if (scopeID != UUID.Zero) | ||
89 | { | ||
90 | where = "(ScopeID=?ScopeID or ScopeID='00000000-0000-0000-0000-000000000000') and (" + where + ")"; | ||
91 | cmd.Parameters.AddWithValue("?ScopeID", scopeID.ToString()); | ||
92 | } | ||
93 | |||
94 | cmd.CommandText = String.Format("select * from {0} where " + where, m_Realm); | ||
95 | |||
96 | return DoQuery(cmd); | ||
97 | } | ||
83 | } | 98 | } |
84 | } | 99 | } |
diff --git a/OpenSim/Data/MySQL/Resources/RegionStore.migrations b/OpenSim/Data/MySQL/Resources/RegionStore.migrations index ba8d538..645f4e8 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 | ||
718 | COMMIT; | 718 | COMMIT; |
719 | 719 | ||
720 | :VERSION 32 | 720 | :VERSION 32 #--------------------- |
721 | 721 | ||
722 | BEGIN; | 722 | BEGIN; |
723 | CREATE TABLE `regionwindlight` ( | 723 | CREATE TABLE `regionwindlight` ( |