diff options
Diffstat (limited to '')
36 files changed, 360 insertions, 360 deletions
diff --git a/OpenSim/Data/Base/BaseDataReader.cs b/OpenSim/Data/Base/BaseDataReader.cs index b71a966..517f672 100644 --- a/OpenSim/Data/Base/BaseDataReader.cs +++ b/OpenSim/Data/Base/BaseDataReader.cs | |||
@@ -126,7 +126,7 @@ namespace OpenSim.Data.Base | |||
126 | { | 126 | { |
127 | int ordinal = m_source.GetOrdinal(name); | 127 | int ordinal = m_source.GetOrdinal(name); |
128 | int int32 = m_source.GetInt32(ordinal); | 128 | int int32 = m_source.GetInt32(ordinal); |
129 | return int32; | 129 | return int32; |
130 | } | 130 | } |
131 | 131 | ||
132 | public Int64 GetInt64(string name) | 132 | public Int64 GetInt64(string name) |
diff --git a/OpenSim/Data/Base/BaseFieldMapper.cs b/OpenSim/Data/Base/BaseFieldMapper.cs index 64adb32..4fdc7b9 100644 --- a/OpenSim/Data/Base/BaseFieldMapper.cs +++ b/OpenSim/Data/Base/BaseFieldMapper.cs | |||
@@ -30,7 +30,7 @@ using System.Collections.Generic; | |||
30 | using System.Data.Common; | 30 | using System.Data.Common; |
31 | 31 | ||
32 | namespace OpenSim.Data.Base | 32 | namespace OpenSim.Data.Base |
33 | { | 33 | { |
34 | public delegate TField ObjectGetAccessor<TObj, TField>(TObj obj); | 34 | public delegate TField ObjectGetAccessor<TObj, TField>(TObj obj); |
35 | public delegate void ObjectSetAccessor<TObj, TField>(TObj obj, TField value); | 35 | public delegate void ObjectSetAccessor<TObj, TField>(TObj obj, TField value); |
36 | 36 | ||
diff --git a/OpenSim/Data/Base/Properties/AssemblyInfo.cs b/OpenSim/Data/Base/Properties/AssemblyInfo.cs index f851df0..f165434 100644 --- a/OpenSim/Data/Base/Properties/AssemblyInfo.cs +++ b/OpenSim/Data/Base/Properties/AssemblyInfo.cs | |||
@@ -29,7 +29,7 @@ using System.Reflection; | |||
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | using System.Security; | 30 | using System.Security; |
31 | 31 | ||
32 | // General Information about an assembly is controlled through the following | 32 | // General information about an assembly is controlled through the following |
33 | // set of attributes. Change these attribute values to modify the information | 33 | // set of attributes. Change these attribute values to modify the information |
34 | // associated with an assembly. | 34 | // associated with an assembly. |
35 | 35 | ||
@@ -42,8 +42,8 @@ using System.Security; | |||
42 | [assembly : AssemblyTrademark("")] | 42 | [assembly : AssemblyTrademark("")] |
43 | [assembly : AssemblyCulture("")] | 43 | [assembly : AssemblyCulture("")] |
44 | 44 | ||
45 | // Setting ComVisible to false makes the types in this assembly not visible | 45 | // Setting ComVisible to false makes the types in this assembly not visible |
46 | // to COM components. If you need to access a type in this assembly from | 46 | // to COM components. If you need to access a type in this assembly from |
47 | // COM, set the ComVisible attribute to true on that type. | 47 | // COM, set the ComVisible attribute to true on that type. |
48 | 48 | ||
49 | [assembly : ComVisible(false)] | 49 | [assembly : ComVisible(false)] |
@@ -55,11 +55,11 @@ using System.Security; | |||
55 | // Version information for an assembly consists of the following four values: | 55 | // Version information for an assembly consists of the following four values: |
56 | // | 56 | // |
57 | // Major Version | 57 | // Major Version |
58 | // Minor Version | 58 | // Minor Version |
59 | // Build Number | 59 | // Build Number |
60 | // Revision | 60 | // Revision |
61 | // | 61 | // |
62 | // You can specify all the values or you can default the Revision and Build Numbers | 62 | // You can specify all the values or you can default the Revision and Build Numbers |
63 | // by using the '*' as shown below: | 63 | // by using the '*' as shown below: |
64 | 64 | ||
65 | [assembly : AssemblyVersion("1.0.0.0")] | 65 | [assembly : AssemblyVersion("1.0.0.0")] |
diff --git a/OpenSim/Data/IGridData.cs b/OpenSim/Data/IGridData.cs index 7681516..b2a8d26 100644 --- a/OpenSim/Data/IGridData.cs +++ b/OpenSim/Data/IGridData.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using libsecondlife; | 28 | using libsecondlife; |
29 | 29 | ||
30 | namespace OpenSim.Data | 30 | namespace OpenSim.Data |
31 | { | 31 | { |
32 | public enum DataResponse | 32 | public enum DataResponse |
33 | { | 33 | { |
34 | RESPONSE_OK, | 34 | RESPONSE_OK, |
@@ -74,7 +74,7 @@ namespace OpenSim.Data | |||
74 | RegionProfileData[] GetProfilesInRange(uint Xmin, uint Ymin, uint Xmax, uint Ymax); | 74 | RegionProfileData[] GetProfilesInRange(uint Xmin, uint Ymin, uint Xmax, uint Ymax); |
75 | 75 | ||
76 | /// <summary> | 76 | /// <summary> |
77 | /// Authenticates a sim by use of its recv key. | 77 | /// Authenticates a sim by use of its recv key. |
78 | /// WARNING: Insecure | 78 | /// WARNING: Insecure |
79 | /// </summary> | 79 | /// </summary> |
80 | /// <param name="UUID">The UUID sent by the sim</param> | 80 | /// <param name="UUID">The UUID sent by the sim</param> |
diff --git a/OpenSim/Data/IniConfig.cs b/OpenSim/Data/IniConfig.cs index 700a681..d8a435d 100644 --- a/OpenSim/Data/IniConfig.cs +++ b/OpenSim/Data/IniConfig.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System.IO; | 28 | using System.IO; |
29 | using System.Text.RegularExpressions; | 29 | using System.Text.RegularExpressions; |
30 | 30 | ||
31 | /* | 31 | /* |
32 | Taken from public code listing at by Alex Pinsker | 32 | Taken from public code listing at by Alex Pinsker |
33 | http://alexpinsker.blogspot.com/2005/12/reading-ini-file-from-c_113432097333021549.html | 33 | http://alexpinsker.blogspot.com/2005/12/reading-ini-file-from-c_113432097333021549.html |
34 | */ | 34 | */ |
diff --git a/OpenSim/Data/MSSQL/MSSQLAssetData.cs b/OpenSim/Data/MSSQL/MSSQLAssetData.cs index 5ae60a1..12a03eb 100644 --- a/OpenSim/Data/MSSQL/MSSQLAssetData.cs +++ b/OpenSim/Data/MSSQL/MSSQLAssetData.cs | |||
@@ -216,7 +216,7 @@ namespace OpenSim.Data.MSSQL | |||
216 | 216 | ||
217 | override public string Version | 217 | override public string Version |
218 | { | 218 | { |
219 | // get { return database.getVersion(); } | 219 | // get { return database.getVersion(); } |
220 | get { return database.getVersion(); } | 220 | get { return database.getVersion(); } |
221 | } | 221 | } |
222 | 222 | ||
diff --git a/OpenSim/Data/MSSQL/MSSQLDataStore.cs b/OpenSim/Data/MSSQL/MSSQLDataStore.cs index 08217dc..8bb15c8 100644 --- a/OpenSim/Data/MSSQL/MSSQLDataStore.cs +++ b/OpenSim/Data/MSSQL/MSSQLDataStore.cs | |||
@@ -140,7 +140,7 @@ namespace OpenSim.Data.MSSQL | |||
140 | m_landAccessListTable = createLandAccessListTable(); | 140 | m_landAccessListTable = createLandAccessListTable(); |
141 | m_dataSet.Tables.Add(m_landAccessListTable); | 141 | m_dataSet.Tables.Add(m_landAccessListTable); |
142 | setupLandAccessCommands(m_landAccessListDataAdapter, m_connection); | 142 | setupLandAccessCommands(m_landAccessListDataAdapter, m_connection); |
143 | m_landAccessListDataAdapter.Fill(m_landAccessListTable); | 143 | m_landAccessListDataAdapter.Fill(m_landAccessListTable); |
144 | } | 144 | } |
145 | } | 145 | } |
146 | 146 | ||
@@ -172,7 +172,7 @@ namespace OpenSim.Data.MSSQL | |||
172 | public void RemoveObject(LLUUID obj, LLUUID regionUUID) | 172 | public void RemoveObject(LLUUID obj, LLUUID regionUUID) |
173 | { | 173 | { |
174 | // Instance.RemoveObject(obj, regionUUID); | 174 | // Instance.RemoveObject(obj, regionUUID); |
175 | 175 | ||
176 | m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID); | 176 | m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID); |
177 | 177 | ||
178 | DataTable prims = m_primTable; | 178 | DataTable prims = m_primTable; |
@@ -222,7 +222,7 @@ namespace OpenSim.Data.MSSQL | |||
222 | 222 | ||
223 | /// <summary> | 223 | /// <summary> |
224 | /// Load persisted objects from region storage. | 224 | /// Load persisted objects from region storage. |
225 | /// </summary> | 225 | /// </summary> |
226 | public List<SceneObjectGroup> LoadObjects(LLUUID regionUUID) | 226 | public List<SceneObjectGroup> LoadObjects(LLUUID regionUUID) |
227 | { | 227 | { |
228 | // return Instance.LoadObjects(regionUUID); | 228 | // return Instance.LoadObjects(regionUUID); |
@@ -328,12 +328,12 @@ namespace OpenSim.Data.MSSQL | |||
328 | TaskInventoryItem item = buildItem(row); | 328 | TaskInventoryItem item = buildItem(row); |
329 | inventory.Add(item); | 329 | inventory.Add(item); |
330 | 330 | ||
331 | //m_log.DebugFormat("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID); | 331 | //m_log.DebugFormat("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID); |
332 | } | 332 | } |
333 | 333 | ||
334 | prim.RestoreInventoryItems(inventory); | 334 | prim.RestoreInventoryItems(inventory); |
335 | 335 | ||
336 | // XXX A nasty little hack to recover the folder id for the prim (which is currently stored in | 336 | // XXX A nasty little hack to recover the folder id for the prim (which is currently stored in |
337 | // every item). This data should really be stored in the prim table itself. | 337 | // every item). This data should really be stored in the prim table itself. |
338 | if (dbItemRows.Length > 0) | 338 | if (dbItemRows.Length > 0) |
339 | { | 339 | { |
@@ -527,7 +527,7 @@ namespace OpenSim.Data.MSSQL | |||
527 | /*********************************************************************** | 527 | /*********************************************************************** |
528 | * | 528 | * |
529 | * Database Definition Functions | 529 | * Database Definition Functions |
530 | * | 530 | * |
531 | * This should be db agnostic as we define them in ADO.NET terms | 531 | * This should be db agnostic as we define them in ADO.NET terms |
532 | * | 532 | * |
533 | **********************************************************************/ | 533 | **********************************************************************/ |
@@ -742,7 +742,7 @@ namespace OpenSim.Data.MSSQL | |||
742 | } | 742 | } |
743 | 743 | ||
744 | /*********************************************************************** | 744 | /*********************************************************************** |
745 | * | 745 | * |
746 | * Convert between ADO.NET <=> OpenSim Objects | 746 | * Convert between ADO.NET <=> OpenSim Objects |
747 | * | 747 | * |
748 | * These should be database independant | 748 | * These should be database independant |
@@ -1198,7 +1198,7 @@ namespace OpenSim.Data.MSSQL | |||
1198 | 1198 | ||
1199 | m_log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID); | 1199 | m_log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID); |
1200 | 1200 | ||
1201 | // For now, we're just going to crudely remove all the previous inventory items | 1201 | // For now, we're just going to crudely remove all the previous inventory items |
1202 | // no matter whether they have changed or not, and replace them with the current set. | 1202 | // no matter whether they have changed or not, and replace them with the current set. |
1203 | lock (m_dataSet) | 1203 | lock (m_dataSet) |
1204 | { | 1204 | { |
@@ -1209,7 +1209,7 @@ namespace OpenSim.Data.MSSQL | |||
1209 | { | 1209 | { |
1210 | // m_log.InfoFormat( | 1210 | // m_log.InfoFormat( |
1211 | // "[REGION DB]: " + | 1211 | // "[REGION DB]: " + |
1212 | // "Adding item {0}, {1} to prim ID {2}", | 1212 | // "Adding item {0}, {1} to prim ID {2}", |
1213 | // newItem.Name, newItem.ItemID, newItem.ParentPartID); | 1213 | // newItem.Name, newItem.ItemID, newItem.ParentPartID); |
1214 | 1214 | ||
1215 | DataRow newItemRow = m_itemsTable.NewRow(); | 1215 | DataRow newItemRow = m_itemsTable.NewRow(); |
@@ -1282,7 +1282,7 @@ namespace OpenSim.Data.MSSQL | |||
1282 | sql += subsql; | 1282 | sql += subsql; |
1283 | sql += " where " + pk; | 1283 | sql += " where " + pk; |
1284 | SqlCommand cmd = new SqlCommand(sql); | 1284 | SqlCommand cmd = new SqlCommand(sql); |
1285 | 1285 | ||
1286 | // this provides the binding for all our parameters, so | 1286 | // this provides the binding for all our parameters, so |
1287 | // much less code than it used to be | 1287 | // much less code than it used to be |
1288 | 1288 | ||
@@ -1329,7 +1329,7 @@ namespace OpenSim.Data.MSSQL | |||
1329 | /// This is a convenience function that collapses 5 repetitive | 1329 | /// This is a convenience function that collapses 5 repetitive |
1330 | /// lines for defining SqlParameters to 2 parameters: | 1330 | /// lines for defining SqlParameters to 2 parameters: |
1331 | /// column name and database type. | 1331 | /// column name and database type. |
1332 | /// | 1332 | /// |
1333 | /// It assumes certain conventions like :param as the param | 1333 | /// It assumes certain conventions like :param as the param |
1334 | /// name to replace in parametrized queries, and that source | 1334 | /// name to replace in parametrized queries, and that source |
1335 | /// version is always current version, both of which are fine | 1335 | /// version is always current version, both of which are fine |
@@ -1424,7 +1424,7 @@ namespace OpenSim.Data.MSSQL | |||
1424 | SqlCommand tcmd = new SqlCommand(createTerrain, conn); | 1424 | SqlCommand tcmd = new SqlCommand(createTerrain, conn); |
1425 | SqlCommand lcmd = new SqlCommand(createLand, conn); | 1425 | SqlCommand lcmd = new SqlCommand(createLand, conn); |
1426 | SqlCommand lalcmd = new SqlCommand(createLandAccessList, conn); | 1426 | SqlCommand lalcmd = new SqlCommand(createLandAccessList, conn); |
1427 | 1427 | ||
1428 | conn.Open(); | 1428 | conn.Open(); |
1429 | try | 1429 | try |
1430 | { | 1430 | { |
@@ -1604,6 +1604,6 @@ namespace OpenSim.Data.MSSQL | |||
1604 | { | 1604 | { |
1605 | return DbType.String; | 1605 | return DbType.String; |
1606 | } | 1606 | } |
1607 | } | 1607 | } |
1608 | } | 1608 | } |
1609 | } | 1609 | } |
diff --git a/OpenSim/Data/MSSQL/MSSQLGridData.cs b/OpenSim/Data/MSSQL/MSSQLGridData.cs index cf81bee..0bdd460 100644 --- a/OpenSim/Data/MSSQL/MSSQLGridData.cs +++ b/OpenSim/Data/MSSQL/MSSQLGridData.cs | |||
@@ -79,7 +79,7 @@ namespace OpenSim.Data.MSSQL | |||
79 | private void TestTables() | 79 | private void TestTables() |
80 | { | 80 | { |
81 | IDbCommand cmd = database.Query("SELECT TOP 1 * FROM "+m_regionsTableName, new Dictionary<string, string>()); | 81 | IDbCommand cmd = database.Query("SELECT TOP 1 * FROM "+m_regionsTableName, new Dictionary<string, string>()); |
82 | 82 | ||
83 | try | 83 | try |
84 | { | 84 | { |
85 | cmd.ExecuteNonQuery(); | 85 | cmd.ExecuteNonQuery(); |
@@ -88,7 +88,7 @@ namespace OpenSim.Data.MSSQL | |||
88 | catch (Exception) | 88 | catch (Exception) |
89 | { | 89 | { |
90 | m_log.Info("[GRID DB]: MSSQL Database doesn't exist... creating"); | 90 | m_log.Info("[GRID DB]: MSSQL Database doesn't exist... creating"); |
91 | database.ExecuteResourceSql("Mssql-regions.sql"); | 91 | database.ExecuteResourceSql("Mssql-regions.sql"); |
92 | } | 92 | } |
93 | } | 93 | } |
94 | 94 | ||
@@ -161,7 +161,7 @@ namespace OpenSim.Data.MSSQL | |||
161 | } | 161 | } |
162 | return null; | 162 | return null; |
163 | } | 163 | } |
164 | 164 | ||
165 | /// <summary> | 165 | /// <summary> |
166 | /// Returns a sim profile from its UUID | 166 | /// Returns a sim profile from its UUID |
167 | /// </summary> | 167 | /// </summary> |
@@ -255,17 +255,17 @@ namespace OpenSim.Data.MSSQL | |||
255 | { | 255 | { |
256 | //Insert new region | 256 | //Insert new region |
257 | string sql = | 257 | string sql = |
258 | "UPDATE " + m_regionsTableName + @" SET | 258 | "UPDATE " + m_regionsTableName + @" SET |
259 | [regionHandle]=@regionHandle, [regionName]=@regionName, | 259 | [regionHandle]=@regionHandle, [regionName]=@regionName, |
260 | [regionRecvKey]=@regionRecvKey, [regionSecret]=@regionSecret, [regionSendKey]=@regionSendKey, | 260 | [regionRecvKey]=@regionRecvKey, [regionSecret]=@regionSecret, [regionSendKey]=@regionSendKey, |
261 | [regionDataURI]=@regionDataURI, [serverIP]=@serverIP, [serverPort]=@serverPort, [serverURI]=@serverURI, | 261 | [regionDataURI]=@regionDataURI, [serverIP]=@serverIP, [serverPort]=@serverPort, [serverURI]=@serverURI, |
262 | [locX]=@locX, [locY]=@locY, [locZ]=@locZ, [eastOverrideHandle]=@eastOverrideHandle, | 262 | [locX]=@locX, [locY]=@locY, [locZ]=@locZ, [eastOverrideHandle]=@eastOverrideHandle, |
263 | [westOverrideHandle]=@westOverrideHandle, [southOverrideHandle]=@southOverrideHandle, | 263 | [westOverrideHandle]=@westOverrideHandle, [southOverrideHandle]=@southOverrideHandle, |
264 | [northOverrideHandle]=@northOverrideHandle, [regionAssetURI]=@regionAssetURI, | 264 | [northOverrideHandle]=@northOverrideHandle, [regionAssetURI]=@regionAssetURI, |
265 | [regionAssetRecvKey]=@regionAssetRecvKey, [regionAssetSendKey]=@regionAssetSendKey, | 265 | [regionAssetRecvKey]=@regionAssetRecvKey, [regionAssetSendKey]=@regionAssetSendKey, |
266 | [regionUserURI]=@regionUserURI, [regionUserRecvKey]=@regionUserRecvKey, [regionUserSendKey]=@regionUserSendKey, | 266 | [regionUserURI]=@regionUserURI, [regionUserRecvKey]=@regionUserRecvKey, [regionUserSendKey]=@regionUserSendKey, |
267 | [regionMapTexture]=@regionMapTexture, [serverHttpPort]=@serverHttpPort, | 267 | [regionMapTexture]=@regionMapTexture, [serverHttpPort]=@serverHttpPort, |
268 | [serverRemotingPort]=@serverRemotingPort, [owner_uuid]=@owner_uuid | 268 | [serverRemotingPort]=@serverRemotingPort, [owner_uuid]=@owner_uuid |
269 | where [uuid]=@uuid"; | 269 | where [uuid]=@uuid"; |
270 | 270 | ||
271 | Dictionary<string, string> parameters = new Dictionary<string, string>(); | 271 | Dictionary<string, string> parameters = new Dictionary<string, string>(); |
diff --git a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs index 611a559..69d45f7 100644 --- a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs +++ b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs | |||
@@ -80,7 +80,7 @@ namespace OpenSim.Data.MSSQL | |||
80 | if (tableName == null) | 80 | if (tableName == null) |
81 | { | 81 | { |
82 | database.ExecuteResourceSql("CreateFoldersTable.sql"); | 82 | database.ExecuteResourceSql("CreateFoldersTable.sql"); |
83 | //database.ExecuteResourceSql("UpgradeFoldersTableToVersion2.sql"); | 83 | //database.ExecuteResourceSql("UpgradeFoldersTableToVersion2.sql"); |
84 | return; | 84 | return; |
85 | } | 85 | } |
86 | } | 86 | } |
@@ -236,9 +236,9 @@ namespace OpenSim.Data.MSSQL | |||
236 | 236 | ||
237 | // There should only ever be one root folder for a user. However, if there's more | 237 | // There should only ever be one root folder for a user. However, if there's more |
238 | // than one we'll simply use the first one rather than failing. It would be even | 238 | // than one we'll simply use the first one rather than failing. It would be even |
239 | // nicer to print some message to this effect, but this feels like it's too low a | 239 | // nicer to print some message to this effect, but this feels like it's too low a |
240 | // to put such a message out, and it's too minor right now to spare the time to | 240 | // to put such a message out, and it's too minor right now to spare the time to |
241 | // suitably refactor. | 241 | // suitably refactor. |
242 | if (items.Count > 0) | 242 | if (items.Count > 0) |
243 | { | 243 | { |
244 | rootFolder = items[0]; | 244 | rootFolder = items[0]; |
@@ -326,7 +326,7 @@ namespace OpenSim.Data.MSSQL | |||
326 | item.GroupID = new LLUUID(reader["groupID"].ToString()); | 326 | item.GroupID = new LLUUID(reader["groupID"].ToString()); |
327 | item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]); | 327 | item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]); |
328 | item.Flags = (uint) reader["flags"]; | 328 | item.Flags = (uint) reader["flags"]; |
329 | 329 | ||
330 | return item; | 330 | return item; |
331 | } | 331 | } |
332 | catch (SqlException e) | 332 | catch (SqlException e) |
@@ -455,7 +455,7 @@ namespace OpenSim.Data.MSSQL | |||
455 | + ", @inventoryNextPermissions, @inventoryCurrentPermissions, @invType, @creatorID" | 455 | + ", @inventoryNextPermissions, @inventoryCurrentPermissions, @invType, @creatorID" |
456 | + ", @inventoryBasePermissions, @inventoryEveryOnePermissions, @salePrice, @saleType" | 456 | + ", @inventoryBasePermissions, @inventoryEveryOnePermissions, @salePrice, @saleType" |
457 | + ", @creationDate, @groupID, @groupOwned, @flags);"; | 457 | + ", @creationDate, @groupID, @groupOwned, @flags);"; |
458 | 458 | ||
459 | try | 459 | try |
460 | { | 460 | { |
461 | Dictionary<string, string> param = new Dictionary<string, string>(); | 461 | Dictionary<string, string> param = new Dictionary<string, string>(); |
@@ -472,7 +472,7 @@ namespace OpenSim.Data.MSSQL | |||
472 | param["creatorID"] = item.Creator.ToString(); | 472 | param["creatorID"] = item.Creator.ToString(); |
473 | param["inventoryBasePermissions"] = Convert.ToString(item.BasePermissions); | 473 | param["inventoryBasePermissions"] = Convert.ToString(item.BasePermissions); |
474 | param["inventoryEveryOnePermissions"] = Convert.ToString(item.EveryOnePermissions); | 474 | param["inventoryEveryOnePermissions"] = Convert.ToString(item.EveryOnePermissions); |
475 | 475 | ||
476 | param["salePrice"] = Convert.ToString(item.SalePrice); | 476 | param["salePrice"] = Convert.ToString(item.SalePrice); |
477 | param["saleType"] = Convert.ToString(item.SaleType); | 477 | param["saleType"] = Convert.ToString(item.SaleType); |
478 | param["creationDate"] = Convert.ToString(item.CreationDate); | 478 | param["creationDate"] = Convert.ToString(item.CreationDate); |
@@ -550,7 +550,7 @@ namespace OpenSim.Data.MSSQL | |||
550 | } | 550 | } |
551 | 551 | ||
552 | /// <summary> | 552 | /// <summary> |
553 | /// | 553 | /// |
554 | /// </summary> | 554 | /// </summary> |
555 | /// <param name="item"></param> | 555 | /// <param name="item"></param> |
556 | public void deleteInventoryItem(LLUUID itemID) | 556 | public void deleteInventoryItem(LLUUID itemID) |
@@ -667,7 +667,7 @@ namespace OpenSim.Data.MSSQL | |||
667 | } | 667 | } |
668 | 668 | ||
669 | /// <summary> | 669 | /// <summary> |
670 | /// Append a list of all the child folders of a parent folder | 670 | /// Append a list of all the child folders of a parent folder |
671 | /// </summary> | 671 | /// </summary> |
672 | /// <param name="folders">list where folders will be appended</param> | 672 | /// <param name="folders">list where folders will be appended</param> |
673 | /// <param name="parentID">ID of parent</param> | 673 | /// <param name="parentID">ID of parent</param> |
diff --git a/OpenSim/Data/MSSQL/MSSQLManager.cs b/OpenSim/Data/MSSQL/MSSQLManager.cs index 2aea641..3221b3a 100644 --- a/OpenSim/Data/MSSQL/MSSQLManager.cs +++ b/OpenSim/Data/MSSQL/MSSQLManager.cs | |||
@@ -442,7 +442,7 @@ namespace OpenSim.Data.MSSQL | |||
442 | 442 | ||
443 | return returnval; | 443 | return returnval; |
444 | } | 444 | } |
445 | 445 | ||
446 | /// <summary> | 446 | /// <summary> |
447 | /// Execute a SQL statement stored in a resource, as a string | 447 | /// Execute a SQL statement stored in a resource, as a string |
448 | /// </summary> | 448 | /// </summary> |
@@ -509,7 +509,7 @@ namespace OpenSim.Data.MSSQL | |||
509 | throw new Exception(string.Format("Resource '{0}' was not found", name)); | 509 | throw new Exception(string.Format("Resource '{0}' was not found", name)); |
510 | } | 510 | } |
511 | 511 | ||
512 | /// <summary> | 512 | /// <summary> |
513 | /// Returns the version of this DB provider | 513 | /// Returns the version of this DB provider |
514 | /// </summary> | 514 | /// </summary> |
515 | /// <returns>A string containing the DB provider</returns> | 515 | /// <returns>A string containing the DB provider</returns> |
diff --git a/OpenSim/Data/MSSQL/MSSQLUserData.cs b/OpenSim/Data/MSSQL/MSSQLUserData.cs index 844b7fa..9dc6812 100644 --- a/OpenSim/Data/MSSQL/MSSQLUserData.cs +++ b/OpenSim/Data/MSSQL/MSSQLUserData.cs | |||
@@ -105,7 +105,7 @@ namespace OpenSim.Data.MSSQL | |||
105 | { | 105 | { |
106 | database.ExecuteResourceSql("Mssql-users.sql"); | 106 | database.ExecuteResourceSql("Mssql-users.sql"); |
107 | } | 107 | } |
108 | 108 | ||
109 | cmd = database.Query("select top 1 * from " + m_agentsTableName, new Dictionary<string, string>()); | 109 | cmd = database.Query("select top 1 * from " + m_agentsTableName, new Dictionary<string, string>()); |
110 | try | 110 | try |
111 | { | 111 | { |
@@ -747,7 +747,7 @@ namespace OpenSim.Data.MSSQL | |||
747 | 747 | ||
748 | /// Appearance | 748 | /// Appearance |
749 | /// TODO: stubs for now to get us to a compiling state gently | 749 | /// TODO: stubs for now to get us to a compiling state gently |
750 | // override public AvatarAppearance GetUserAppearance(LLUUID user) | 750 | // override public AvatarAppearance GetUserAppearance(LLUUID user) |
751 | // { | 751 | // { |
752 | // return new AvatarAppearance(); | 752 | // return new AvatarAppearance(); |
753 | // } | 753 | // } |
@@ -761,12 +761,12 @@ namespace OpenSim.Data.MSSQL | |||
761 | { | 761 | { |
762 | return; | 762 | return; |
763 | } | 763 | } |
764 | 764 | ||
765 | override public void RemoveAttachment(LLUUID user, LLUUID item) | 765 | override public void RemoveAttachment(LLUUID user, LLUUID item) |
766 | { | 766 | { |
767 | return; | 767 | return; |
768 | } | 768 | } |
769 | 769 | ||
770 | override public List<LLUUID> GetAttachments(LLUUID user) | 770 | override public List<LLUUID> GetAttachments(LLUUID user) |
771 | { | 771 | { |
772 | return new List<LLUUID>(); | 772 | return new List<LLUUID>(); |
diff --git a/OpenSim/Data/MSSQL/Properties/AssemblyInfo.cs b/OpenSim/Data/MSSQL/Properties/AssemblyInfo.cs index 6b2c214..279e1a9 100644 --- a/OpenSim/Data/MSSQL/Properties/AssemblyInfo.cs +++ b/OpenSim/Data/MSSQL/Properties/AssemblyInfo.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | 30 | ||
31 | // General Information about an assembly is controlled through the following | 31 | // General information about an assembly is controlled through the following |
32 | // set of attributes. Change these attribute values to modify the information | 32 | // set of attributes. Change these attribute values to modify the information |
33 | // associated with an assembly. | 33 | // associated with an assembly. |
34 | 34 | ||
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices; | |||
41 | [assembly : AssemblyTrademark("")] | 41 | [assembly : AssemblyTrademark("")] |
42 | [assembly : AssemblyCulture("")] | 42 | [assembly : AssemblyCulture("")] |
43 | 43 | ||
44 | // Setting ComVisible to false makes the types in this assembly not visible | 44 | // Setting ComVisible to false makes the types in this assembly not visible |
45 | // to COM components. If you need to access a type in this assembly from | 45 | // to COM components. If you need to access a type in this assembly from |
46 | // COM, set the ComVisible attribute to true on that type. | 46 | // COM, set the ComVisible attribute to true on that type. |
47 | 47 | ||
48 | [assembly : ComVisible(false)] | 48 | [assembly : ComVisible(false)] |
@@ -54,11 +54,11 @@ using System.Runtime.InteropServices; | |||
54 | // Version information for an assembly consists of the following four values: | 54 | // Version information for an assembly consists of the following four values: |
55 | // | 55 | // |
56 | // Major Version | 56 | // Major Version |
57 | // Minor Version | 57 | // Minor Version |
58 | // Build Number | 58 | // Build Number |
59 | // Revision | 59 | // Revision |
60 | // | 60 | // |
61 | // You can specify all the values or you can default the Revision and Build Numbers | 61 | // You can specify all the values or you can default the Revision and Build Numbers |
62 | // by using the '*' as shown below: | 62 | // by using the '*' as shown below: |
63 | 63 | ||
64 | [assembly : AssemblyVersion("1.0.0.0")] | 64 | [assembly : AssemblyVersion("1.0.0.0")] |
diff --git a/OpenSim/Data/MapperFactory/DataMapperFactory.cs b/OpenSim/Data/MapperFactory/DataMapperFactory.cs index 1d981f8..0b1fadd 100644 --- a/OpenSim/Data/MapperFactory/DataMapperFactory.cs +++ b/OpenSim/Data/MapperFactory/DataMapperFactory.cs | |||
@@ -49,7 +49,7 @@ namespace OpenSim.Data.MapperFactory | |||
49 | return new MSSQLDatabaseMapper(connectionString); | 49 | return new MSSQLDatabaseMapper(connectionString); |
50 | default: | 50 | default: |
51 | throw new ArgumentException("Unknown Database Mapper type [" + type + "]."); | 51 | throw new ArgumentException("Unknown Database Mapper type [" + type + "]."); |
52 | } | 52 | } |
53 | } | 53 | } |
54 | } | 54 | } |
55 | } | 55 | } |
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs index 7e6289b..e556352 100644 --- a/OpenSim/Data/MySQL/MySQLAssetData.cs +++ b/OpenSim/Data/MySQL/MySQLAssetData.cs | |||
@@ -79,7 +79,7 @@ namespace OpenSim.Data.MySQL | |||
79 | _dbConnection.Connection); | 79 | _dbConnection.Connection); |
80 | MySqlParameter p = cmd.Parameters.Add("?id", MySqlDbType.Binary, 16); | 80 | MySqlParameter p = cmd.Parameters.Add("?id", MySqlDbType.Binary, 16); |
81 | p.Value = assetID.GetBytes(); | 81 | p.Value = assetID.GetBytes(); |
82 | 82 | ||
83 | try | 83 | try |
84 | { | 84 | { |
85 | using (MySqlDataReader dbReader = cmd.ExecuteReader(CommandBehavior.SingleRow)) | 85 | using (MySqlDataReader dbReader = cmd.ExecuteReader(CommandBehavior.SingleRow)) |
@@ -111,7 +111,7 @@ namespace OpenSim.Data.MySQL | |||
111 | } | 111 | } |
112 | 112 | ||
113 | override public void CreateAsset(AssetBase asset) | 113 | override public void CreateAsset(AssetBase asset) |
114 | { | 114 | { |
115 | lock (_dbConnection) | 115 | lock (_dbConnection) |
116 | { | 116 | { |
117 | MySqlCommand cmd = | 117 | MySqlCommand cmd = |
@@ -119,10 +119,10 @@ namespace OpenSim.Data.MySQL | |||
119 | "REPLACE INTO assets(id, name, description, assetType, invType, local, temporary, data)" + | 119 | "REPLACE INTO assets(id, name, description, assetType, invType, local, temporary, data)" + |
120 | "VALUES(?id, ?name, ?description, ?assetType, ?invType, ?local, ?temporary, ?data)", | 120 | "VALUES(?id, ?name, ?description, ?assetType, ?invType, ?local, ?temporary, ?data)", |
121 | _dbConnection.Connection); | 121 | _dbConnection.Connection); |
122 | 122 | ||
123 | // need to ensure we dispose | 123 | // need to ensure we dispose |
124 | try | 124 | try |
125 | { | 125 | { |
126 | using (cmd) | 126 | using (cmd) |
127 | { | 127 | { |
128 | MySqlParameter p = cmd.Parameters.Add("?id", MySqlDbType.Binary, 16); | 128 | MySqlParameter p = cmd.Parameters.Add("?id", MySqlDbType.Binary, 16); |
@@ -145,7 +145,7 @@ namespace OpenSim.Data.MySQL | |||
145 | "MySql failure creating asset {0} with name {1}" + Environment.NewLine + e.ToString() | 145 | "MySql failure creating asset {0} with name {1}" + Environment.NewLine + e.ToString() |
146 | + Environment.NewLine + "Attempting reconnection", asset.FullID, asset.Name); | 146 | + Environment.NewLine + "Attempting reconnection", asset.FullID, asset.Name); |
147 | _dbConnection.Reconnect(); | 147 | _dbConnection.Reconnect(); |
148 | } | 148 | } |
149 | } | 149 | } |
150 | } | 150 | } |
151 | 151 | ||
diff --git a/OpenSim/Data/MySQL/MySQLDataStore.cs b/OpenSim/Data/MySQL/MySQLDataStore.cs index ac0d382..3c39a5e 100644 --- a/OpenSim/Data/MySQL/MySQLDataStore.cs +++ b/OpenSim/Data/MySQL/MySQLDataStore.cs | |||
@@ -50,12 +50,12 @@ namespace OpenSim.Data.MySQL | |||
50 | private const string m_terrainSelect = "select * from terrain limit 1"; | 50 | private const string m_terrainSelect = "select * from terrain limit 1"; |
51 | private const string m_landSelect = "select * from land"; | 51 | private const string m_landSelect = "select * from land"; |
52 | private const string m_landAccessListSelect = "select * from landaccesslist"; | 52 | private const string m_landAccessListSelect = "select * from landaccesslist"; |
53 | 53 | ||
54 | 54 | ||
55 | /// <summary> | 55 | /// <summary> |
56 | /// We're only using this to version the table! | 56 | /// We're only using this to version the table! |
57 | /// </summary> | 57 | /// </summary> |
58 | 58 | ||
59 | 59 | ||
60 | private DataSet m_dataSet; | 60 | private DataSet m_dataSet; |
61 | private MySqlDataAdapter m_primDataAdapter; | 61 | private MySqlDataAdapter m_primDataAdapter; |
@@ -65,16 +65,16 @@ namespace OpenSim.Data.MySQL | |||
65 | private MySqlDataAdapter m_terrainDataAdapter; | 65 | private MySqlDataAdapter m_terrainDataAdapter; |
66 | private MySqlDataAdapter m_landDataAdapter; | 66 | private MySqlDataAdapter m_landDataAdapter; |
67 | private MySqlDataAdapter m_landAccessListDataAdapter; | 67 | private MySqlDataAdapter m_landAccessListDataAdapter; |
68 | 68 | ||
69 | private DataTable m_primTable; | 69 | private DataTable m_primTable; |
70 | private DataTable m_shapeTable; | 70 | private DataTable m_shapeTable; |
71 | private DataTable m_itemsTable; | 71 | private DataTable m_itemsTable; |
72 | private DataTable m_terrainTable; | 72 | private DataTable m_terrainTable; |
73 | private DataTable m_landTable; | 73 | private DataTable m_landTable; |
74 | private DataTable m_landAccessListTable; | 74 | private DataTable m_landAccessListTable; |
75 | 75 | ||
76 | // Temporary attribute while this is experimental | 76 | // Temporary attribute while this is experimental |
77 | private bool persistPrimInventories; | 77 | private bool persistPrimInventories; |
78 | 78 | ||
79 | /*********************************************************************** | 79 | /*********************************************************************** |
80 | * | 80 | * |
@@ -98,9 +98,9 @@ namespace OpenSim.Data.MySQL | |||
98 | 98 | ||
99 | MySqlCommand shapeSelectCmd = new MySqlCommand(m_shapeSelect, m_connection); | 99 | MySqlCommand shapeSelectCmd = new MySqlCommand(m_shapeSelect, m_connection); |
100 | m_shapeDataAdapter = new MySqlDataAdapter(shapeSelectCmd); | 100 | m_shapeDataAdapter = new MySqlDataAdapter(shapeSelectCmd); |
101 | 101 | ||
102 | MySqlCommand itemsSelectCmd = new MySqlCommand(m_itemsSelect, m_connection); | 102 | MySqlCommand itemsSelectCmd = new MySqlCommand(m_itemsSelect, m_connection); |
103 | m_itemsDataAdapter = new MySqlDataAdapter(itemsSelectCmd); | 103 | m_itemsDataAdapter = new MySqlDataAdapter(itemsSelectCmd); |
104 | 104 | ||
105 | MySqlCommand terrainSelectCmd = new MySqlCommand(m_terrainSelect, m_connection); | 105 | MySqlCommand terrainSelectCmd = new MySqlCommand(m_terrainSelect, m_connection); |
106 | m_terrainDataAdapter = new MySqlDataAdapter(terrainSelectCmd); | 106 | m_terrainDataAdapter = new MySqlDataAdapter(terrainSelectCmd); |
@@ -111,7 +111,7 @@ namespace OpenSim.Data.MySQL | |||
111 | MySqlCommand landAccessListSelectCmd = new MySqlCommand(m_landAccessListSelect, m_connection); | 111 | MySqlCommand landAccessListSelectCmd = new MySqlCommand(m_landAccessListSelect, m_connection); |
112 | m_landAccessListDataAdapter = new MySqlDataAdapter(landAccessListSelectCmd); | 112 | m_landAccessListDataAdapter = new MySqlDataAdapter(landAccessListSelectCmd); |
113 | 113 | ||
114 | 114 | ||
115 | TestTables(m_connection); | 115 | TestTables(m_connection); |
116 | 116 | ||
117 | lock (m_dataSet) | 117 | lock (m_dataSet) |
@@ -125,13 +125,13 @@ namespace OpenSim.Data.MySQL | |||
125 | m_dataSet.Tables.Add(m_shapeTable); | 125 | m_dataSet.Tables.Add(m_shapeTable); |
126 | SetupShapeCommands(m_shapeDataAdapter, m_connection); | 126 | SetupShapeCommands(m_shapeDataAdapter, m_connection); |
127 | m_shapeDataAdapter.Fill(m_shapeTable); | 127 | m_shapeDataAdapter.Fill(m_shapeTable); |
128 | 128 | ||
129 | if (persistPrimInventories) | 129 | if (persistPrimInventories) |
130 | { | 130 | { |
131 | m_itemsTable = createItemsTable(); | 131 | m_itemsTable = createItemsTable(); |
132 | m_dataSet.Tables.Add(m_itemsTable); | 132 | m_dataSet.Tables.Add(m_itemsTable); |
133 | SetupItemsCommands(m_itemsDataAdapter, m_connection); | 133 | SetupItemsCommands(m_itemsDataAdapter, m_connection); |
134 | m_itemsDataAdapter.Fill(m_itemsTable); | 134 | m_itemsDataAdapter.Fill(m_itemsTable); |
135 | } | 135 | } |
136 | 136 | ||
137 | m_terrainTable = createTerrainTable(); | 137 | m_terrainTable = createTerrainTable(); |
@@ -195,7 +195,7 @@ namespace OpenSim.Data.MySQL | |||
195 | 195 | ||
196 | UpgradeLandTable(tableList["land"], dbconn); | 196 | UpgradeLandTable(tableList["land"], dbconn); |
197 | //database.Close(); | 197 | //database.Close(); |
198 | 198 | ||
199 | } | 199 | } |
200 | 200 | ||
201 | /// <summary> | 201 | /// <summary> |
@@ -290,12 +290,12 @@ namespace OpenSim.Data.MySQL | |||
290 | { | 290 | { |
291 | shapeRow.Delete(); | 291 | shapeRow.Delete(); |
292 | } | 292 | } |
293 | 293 | ||
294 | if (persistPrimInventories) | 294 | if (persistPrimInventories) |
295 | { | 295 | { |
296 | RemoveItems(uuid); | 296 | RemoveItems(uuid); |
297 | } | 297 | } |
298 | 298 | ||
299 | // Remove prim row | 299 | // Remove prim row |
300 | row.Delete(); | 300 | row.Delete(); |
301 | } | 301 | } |
@@ -309,18 +309,18 @@ namespace OpenSim.Data.MySQL | |||
309 | /// </summary> | 309 | /// </summary> |
310 | private void RemoveItems(LLUUID uuid) | 310 | private void RemoveItems(LLUUID uuid) |
311 | { | 311 | { |
312 | String sql = String.Format("primID = '{0}'", uuid); | 312 | String sql = String.Format("primID = '{0}'", uuid); |
313 | DataRow[] itemRows = m_itemsTable.Select(sql); | 313 | DataRow[] itemRows = m_itemsTable.Select(sql); |
314 | 314 | ||
315 | foreach (DataRow itemRow in itemRows) | 315 | foreach (DataRow itemRow in itemRows) |
316 | { | 316 | { |
317 | itemRow.Delete(); | 317 | itemRow.Delete(); |
318 | } | 318 | } |
319 | } | 319 | } |
320 | 320 | ||
321 | /// <summary> | 321 | /// <summary> |
322 | /// Load persisted objects from region storage. | 322 | /// Load persisted objects from region storage. |
323 | /// </summary> | 323 | /// </summary> |
324 | public List<SceneObjectGroup> LoadObjects(LLUUID regionUUID) | 324 | public List<SceneObjectGroup> LoadObjects(LLUUID regionUUID) |
325 | { | 325 | { |
326 | Dictionary<LLUUID, SceneObjectGroup> createdObjects = new Dictionary<LLUUID, SceneObjectGroup>(); | 326 | Dictionary<LLUUID, SceneObjectGroup> createdObjects = new Dictionary<LLUUID, SceneObjectGroup>(); |
@@ -341,17 +341,17 @@ namespace OpenSim.Data.MySQL | |||
341 | 341 | ||
342 | foreach (DataRow primRow in primsForRegion) | 342 | foreach (DataRow primRow in primsForRegion) |
343 | { | 343 | { |
344 | try | 344 | try |
345 | { | 345 | { |
346 | string uuid = (string) primRow["UUID"]; | 346 | string uuid = (string) primRow["UUID"]; |
347 | string objID = (string) primRow["SceneGroupID"]; | 347 | string objID = (string) primRow["SceneGroupID"]; |
348 | 348 | ||
349 | SceneObjectPart prim = buildPrim(primRow); | 349 | SceneObjectPart prim = buildPrim(primRow); |
350 | 350 | ||
351 | if (uuid == objID) //is new SceneObjectGroup ? | 351 | if (uuid == objID) //is new SceneObjectGroup ? |
352 | { | 352 | { |
353 | SceneObjectGroup group = new SceneObjectGroup(); | 353 | SceneObjectGroup group = new SceneObjectGroup(); |
354 | 354 | ||
355 | DataRow shapeRow = shapes.Rows.Find(Util.ToRawUuidString(prim.UUID)); | 355 | DataRow shapeRow = shapes.Rows.Find(Util.ToRawUuidString(prim.UUID)); |
356 | if (shapeRow != null) | 356 | if (shapeRow != null) |
357 | { | 357 | { |
@@ -384,11 +384,11 @@ namespace OpenSim.Data.MySQL | |||
384 | } | 384 | } |
385 | createdObjects[new LLUUID(objID)].AddPart(prim); | 385 | createdObjects[new LLUUID(objID)].AddPart(prim); |
386 | } | 386 | } |
387 | 387 | ||
388 | if (persistPrimInventories) | 388 | if (persistPrimInventories) |
389 | { | 389 | { |
390 | LoadItems(prim); | 390 | LoadItems(prim); |
391 | } | 391 | } |
392 | } | 392 | } |
393 | catch (Exception e) | 393 | catch (Exception e) |
394 | { | 394 | { |
@@ -403,7 +403,7 @@ namespace OpenSim.Data.MySQL | |||
403 | } | 403 | } |
404 | return retvals; | 404 | return retvals; |
405 | } | 405 | } |
406 | 406 | ||
407 | /// <summary> | 407 | /// <summary> |
408 | /// Load in a prim's persisted inventory. | 408 | /// Load in a prim's persisted inventory. |
409 | /// </summary> | 409 | /// </summary> |
@@ -411,31 +411,31 @@ namespace OpenSim.Data.MySQL | |||
411 | private void LoadItems(SceneObjectPart prim) | 411 | private void LoadItems(SceneObjectPart prim) |
412 | { | 412 | { |
413 | //m_log.InfoFormat("[DATASTORE]: Loading inventory for {0}, {1}", prim.Name, prim.UUID); | 413 | //m_log.InfoFormat("[DATASTORE]: Loading inventory for {0}, {1}", prim.Name, prim.UUID); |
414 | 414 | ||
415 | DataTable dbItems = m_itemsTable; | 415 | DataTable dbItems = m_itemsTable; |
416 | 416 | ||
417 | String sql = String.Format("primID = '{0}'", prim.UUID.ToString()); | 417 | String sql = String.Format("primID = '{0}'", prim.UUID.ToString()); |
418 | DataRow[] dbItemRows = dbItems.Select(sql); | 418 | DataRow[] dbItemRows = dbItems.Select(sql); |
419 | 419 | ||
420 | IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>(); | 420 | IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>(); |
421 | 421 | ||
422 | foreach (DataRow row in dbItemRows) | 422 | foreach (DataRow row in dbItemRows) |
423 | { | 423 | { |
424 | TaskInventoryItem item = buildItem(row); | 424 | TaskInventoryItem item = buildItem(row); |
425 | inventory.Add(item); | 425 | inventory.Add(item); |
426 | 426 | ||
427 | //m_log.DebugFormat("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID); | 427 | //m_log.DebugFormat("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID); |
428 | } | 428 | } |
429 | 429 | ||
430 | prim.RestoreInventoryItems(inventory); | 430 | prim.RestoreInventoryItems(inventory); |
431 | 431 | ||
432 | // XXX A nasty little hack to recover the folder id for the prim (which is currently stored in | 432 | // XXX A nasty little hack to recover the folder id for the prim (which is currently stored in |
433 | // every item). This data should really be stored in the prim table itself. | 433 | // every item). This data should really be stored in the prim table itself. |
434 | if (dbItemRows.Length > 0) | 434 | if (dbItemRows.Length > 0) |
435 | { | 435 | { |
436 | prim.FolderID = inventory[0].ParentID; | 436 | prim.FolderID = inventory[0].ParentID; |
437 | } | 437 | } |
438 | } | 438 | } |
439 | 439 | ||
440 | public void StoreTerrain(double[,] ter, LLUUID regionID) | 440 | public void StoreTerrain(double[,] ter, LLUUID regionID) |
441 | { | 441 | { |
@@ -474,8 +474,8 @@ namespace OpenSim.Data.MySQL | |||
474 | { | 474 | { |
475 | m_connection.Open(); | 475 | m_connection.Open(); |
476 | } | 476 | } |
477 | 477 | ||
478 | lock (m_dataSet) | 478 | lock (m_dataSet) |
479 | { | 479 | { |
480 | using (MySqlDataReader row = cmd.ExecuteReader()) | 480 | using (MySqlDataReader row = cmd.ExecuteReader()) |
481 | { | 481 | { |
@@ -498,7 +498,7 @@ namespace OpenSim.Data.MySQL | |||
498 | m_log.Info("[REGION DB]: No terrain found for region"); | 498 | m_log.Info("[REGION DB]: No terrain found for region"); |
499 | return null; | 499 | return null; |
500 | } | 500 | } |
501 | 501 | ||
502 | m_log.Info("[REGION DB]: Loaded terrain revision r" + rev.ToString()); | 502 | m_log.Info("[REGION DB]: Loaded terrain revision r" + rev.ToString()); |
503 | } | 503 | } |
504 | } | 504 | } |
@@ -558,7 +558,7 @@ namespace OpenSim.Data.MySQL | |||
558 | fillLandAccessRow(newAccessRow, entry, parcel.landData.globalID); | 558 | fillLandAccessRow(newAccessRow, entry, parcel.landData.globalID); |
559 | landaccesslist.Rows.Add(newAccessRow); | 559 | landaccesslist.Rows.Add(newAccessRow); |
560 | } | 560 | } |
561 | 561 | ||
562 | Commit(); | 562 | Commit(); |
563 | } | 563 | } |
564 | } | 564 | } |
@@ -624,7 +624,7 @@ namespace OpenSim.Data.MySQL | |||
624 | /*********************************************************************** | 624 | /*********************************************************************** |
625 | * | 625 | * |
626 | * Database Definition Functions | 626 | * Database Definition Functions |
627 | * | 627 | * |
628 | * This should be db agnostic as we define them in ADO.NET terms | 628 | * This should be db agnostic as we define them in ADO.NET terms |
629 | * | 629 | * |
630 | **********************************************************************/ | 630 | **********************************************************************/ |
@@ -803,7 +803,7 @@ namespace OpenSim.Data.MySQL | |||
803 | 803 | ||
804 | return shapes; | 804 | return shapes; |
805 | } | 805 | } |
806 | 806 | ||
807 | private static DataTable createItemsTable() | 807 | private static DataTable createItemsTable() |
808 | { | 808 | { |
809 | DataTable items = new DataTable("primitems"); | 809 | DataTable items = new DataTable("primitems"); |
@@ -812,8 +812,8 @@ namespace OpenSim.Data.MySQL | |||
812 | createCol(items, "primID", typeof (String)); | 812 | createCol(items, "primID", typeof (String)); |
813 | createCol(items, "assetID", typeof (String)); | 813 | createCol(items, "assetID", typeof (String)); |
814 | createCol(items, "parentFolderID", typeof (String)); | 814 | createCol(items, "parentFolderID", typeof (String)); |
815 | 815 | ||
816 | createCol(items, "invType", typeof (Int32)); | 816 | createCol(items, "invType", typeof (Int32)); |
817 | createCol(items, "assetType", typeof (Int32)); | 817 | createCol(items, "assetType", typeof (Int32)); |
818 | 818 | ||
819 | createCol(items, "name", typeof (String)); | 819 | createCol(items, "name", typeof (String)); |
@@ -834,10 +834,10 @@ namespace OpenSim.Data.MySQL | |||
834 | items.PrimaryKey = new DataColumn[] {items.Columns["itemID"]}; | 834 | items.PrimaryKey = new DataColumn[] {items.Columns["itemID"]}; |
835 | 835 | ||
836 | return items; | 836 | return items; |
837 | } | 837 | } |
838 | 838 | ||
839 | /*********************************************************************** | 839 | /*********************************************************************** |
840 | * | 840 | * |
841 | * Convert between ADO.NET <=> OpenSim Objects | 841 | * Convert between ADO.NET <=> OpenSim Objects |
842 | * | 842 | * |
843 | * These should be database independant | 843 | * These should be database independant |
@@ -932,8 +932,8 @@ namespace OpenSim.Data.MySQL | |||
932 | } | 932 | } |
933 | return prim; | 933 | return prim; |
934 | } | 934 | } |
935 | 935 | ||
936 | 936 | ||
937 | /// <summary> | 937 | /// <summary> |
938 | /// Build a prim inventory item from the persisted data. | 938 | /// Build a prim inventory item from the persisted data. |
939 | /// </summary> | 939 | /// </summary> |
@@ -942,15 +942,15 @@ namespace OpenSim.Data.MySQL | |||
942 | private static TaskInventoryItem buildItem(DataRow row) | 942 | private static TaskInventoryItem buildItem(DataRow row) |
943 | { | 943 | { |
944 | TaskInventoryItem taskItem = new TaskInventoryItem(); | 944 | TaskInventoryItem taskItem = new TaskInventoryItem(); |
945 | 945 | ||
946 | taskItem.ItemID = new LLUUID((String)row["itemID"]); | 946 | taskItem.ItemID = new LLUUID((String)row["itemID"]); |
947 | taskItem.ParentPartID = new LLUUID((String)row["primID"]); | 947 | taskItem.ParentPartID = new LLUUID((String)row["primID"]); |
948 | taskItem.AssetID = new LLUUID((String)row["assetID"]); | 948 | taskItem.AssetID = new LLUUID((String)row["assetID"]); |
949 | taskItem.ParentID = new LLUUID((String)row["parentFolderID"]); | 949 | taskItem.ParentID = new LLUUID((String)row["parentFolderID"]); |
950 | 950 | ||
951 | taskItem.InvType = Convert.ToInt32(row["invType"]); | 951 | taskItem.InvType = Convert.ToInt32(row["invType"]); |
952 | taskItem.Type = Convert.ToInt32(row["assetType"]); | 952 | taskItem.Type = Convert.ToInt32(row["assetType"]); |
953 | 953 | ||
954 | taskItem.Name = (String)row["name"]; | 954 | taskItem.Name = (String)row["name"]; |
955 | taskItem.Description = (String)row["description"]; | 955 | taskItem.Description = (String)row["description"]; |
956 | taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); | 956 | taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); |
@@ -958,15 +958,15 @@ namespace OpenSim.Data.MySQL | |||
958 | taskItem.OwnerID = new LLUUID((String)row["ownerID"]); | 958 | taskItem.OwnerID = new LLUUID((String)row["ownerID"]); |
959 | taskItem.LastOwnerID = new LLUUID((String)row["lastOwnerID"]); | 959 | taskItem.LastOwnerID = new LLUUID((String)row["lastOwnerID"]); |
960 | taskItem.GroupID = new LLUUID((String)row["groupID"]); | 960 | taskItem.GroupID = new LLUUID((String)row["groupID"]); |
961 | 961 | ||
962 | taskItem.NextOwnerMask = Convert.ToUInt32(row["nextPermissions"]); | 962 | taskItem.NextOwnerMask = Convert.ToUInt32(row["nextPermissions"]); |
963 | taskItem.OwnerMask = Convert.ToUInt32(row["currentPermissions"]); | 963 | taskItem.OwnerMask = Convert.ToUInt32(row["currentPermissions"]); |
964 | taskItem.BaseMask = Convert.ToUInt32(row["basePermissions"]); | 964 | taskItem.BaseMask = Convert.ToUInt32(row["basePermissions"]); |
965 | taskItem.EveryoneMask = Convert.ToUInt32(row["everyonePermissions"]); | 965 | taskItem.EveryoneMask = Convert.ToUInt32(row["everyonePermissions"]); |
966 | taskItem.GroupMask = Convert.ToUInt32(row["groupPermissions"]); | 966 | taskItem.GroupMask = Convert.ToUInt32(row["groupPermissions"]); |
967 | 967 | ||
968 | return taskItem; | 968 | return taskItem; |
969 | } | 969 | } |
970 | 970 | ||
971 | private static LandData buildLandData(DataRow row) | 971 | private static LandData buildLandData(DataRow row) |
972 | { | 972 | { |
@@ -1117,17 +1117,17 @@ namespace OpenSim.Data.MySQL | |||
1117 | } | 1117 | } |
1118 | } | 1118 | } |
1119 | } | 1119 | } |
1120 | 1120 | ||
1121 | private static void fillItemRow(DataRow row, TaskInventoryItem taskItem) | 1121 | private static void fillItemRow(DataRow row, TaskInventoryItem taskItem) |
1122 | { | 1122 | { |
1123 | row["itemID"] = taskItem.ItemID; | 1123 | row["itemID"] = taskItem.ItemID; |
1124 | row["primID"] = taskItem.ParentPartID; | 1124 | row["primID"] = taskItem.ParentPartID; |
1125 | row["assetID"] = taskItem.AssetID; | 1125 | row["assetID"] = taskItem.AssetID; |
1126 | row["parentFolderID"] = taskItem.ParentID; | 1126 | row["parentFolderID"] = taskItem.ParentID; |
1127 | 1127 | ||
1128 | row["invType"] = taskItem.InvType; | 1128 | row["invType"] = taskItem.InvType; |
1129 | row["assetType"] = taskItem.Type; | 1129 | row["assetType"] = taskItem.Type; |
1130 | 1130 | ||
1131 | row["name"] = taskItem.Name; | 1131 | row["name"] = taskItem.Name; |
1132 | row["description"] = taskItem.Description; | 1132 | row["description"] = taskItem.Description; |
1133 | row["creationDate"] = taskItem.CreationDate; | 1133 | row["creationDate"] = taskItem.CreationDate; |
@@ -1140,7 +1140,7 @@ namespace OpenSim.Data.MySQL | |||
1140 | row["basePermissions"] = taskItem.BaseMask; | 1140 | row["basePermissions"] = taskItem.BaseMask; |
1141 | row["everyonePermissions"] = taskItem.EveryoneMask; | 1141 | row["everyonePermissions"] = taskItem.EveryoneMask; |
1142 | row["groupPermissions"] = taskItem.GroupMask; | 1142 | row["groupPermissions"] = taskItem.GroupMask; |
1143 | } | 1143 | } |
1144 | 1144 | ||
1145 | private static void fillLandRow(DataRow row, LandData land, LLUUID regionUUID) | 1145 | private static void fillLandRow(DataRow row, LandData land, LLUUID regionUUID) |
1146 | { | 1146 | { |
@@ -1322,39 +1322,39 @@ namespace OpenSim.Data.MySQL | |||
1322 | else | 1322 | else |
1323 | { | 1323 | { |
1324 | fillShapeRow(shapeRow, prim); | 1324 | fillShapeRow(shapeRow, prim); |
1325 | } | 1325 | } |
1326 | } | 1326 | } |
1327 | 1327 | ||
1328 | // see IRegionDatastore | 1328 | // see IRegionDatastore |
1329 | public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items) | 1329 | public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items) |
1330 | { | 1330 | { |
1331 | if (!persistPrimInventories) | 1331 | if (!persistPrimInventories) |
1332 | return; | 1332 | return; |
1333 | 1333 | ||
1334 | m_log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID); | 1334 | m_log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID); |
1335 | 1335 | ||
1336 | // For now, we're just going to crudely remove all the previous inventory items | 1336 | // For now, we're just going to crudely remove all the previous inventory items |
1337 | // no matter whether they have changed or not, and replace them with the current set. | 1337 | // no matter whether they have changed or not, and replace them with the current set. |
1338 | lock (m_dataSet) | 1338 | lock (m_dataSet) |
1339 | { | 1339 | { |
1340 | RemoveItems(primID); | 1340 | RemoveItems(primID); |
1341 | 1341 | ||
1342 | // repalce with current inventory details | 1342 | // repalce with current inventory details |
1343 | foreach (TaskInventoryItem newItem in items) | 1343 | foreach (TaskInventoryItem newItem in items) |
1344 | { | 1344 | { |
1345 | // m_log.InfoFormat( | 1345 | // m_log.InfoFormat( |
1346 | // "[REGION DB]: " + | 1346 | // "[REGION DB]: " + |
1347 | // "Adding item {0}, {1} to prim ID {2}", | 1347 | // "Adding item {0}, {1} to prim ID {2}", |
1348 | // newItem.Name, newItem.ItemID, newItem.ParentPartID); | 1348 | // newItem.Name, newItem.ItemID, newItem.ParentPartID); |
1349 | 1349 | ||
1350 | DataRow newItemRow = m_itemsTable.NewRow(); | 1350 | DataRow newItemRow = m_itemsTable.NewRow(); |
1351 | fillItemRow(newItemRow, newItem); | 1351 | fillItemRow(newItemRow, newItem); |
1352 | m_itemsTable.Rows.Add(newItemRow); | 1352 | m_itemsTable.Rows.Add(newItemRow); |
1353 | } | 1353 | } |
1354 | } | 1354 | } |
1355 | 1355 | ||
1356 | Commit(); | 1356 | Commit(); |
1357 | } | 1357 | } |
1358 | 1358 | ||
1359 | /*********************************************************************** | 1359 | /*********************************************************************** |
1360 | * | 1360 | * |
@@ -1447,9 +1447,9 @@ namespace OpenSim.Data.MySQL | |||
1447 | } | 1447 | } |
1448 | sql += subsql; | 1448 | sql += subsql; |
1449 | sql += ")"; | 1449 | sql += ")"; |
1450 | 1450 | ||
1451 | //m_log.InfoFormat("[DATASTORE]: defineTable() sql {0}", sql); | 1451 | //m_log.InfoFormat("[DATASTORE]: defineTable() sql {0}", sql); |
1452 | 1452 | ||
1453 | return sql; | 1453 | return sql; |
1454 | } | 1454 | } |
1455 | 1455 | ||
@@ -1466,7 +1466,7 @@ namespace OpenSim.Data.MySQL | |||
1466 | /// This is a convenience function that collapses 5 repetitive | 1466 | /// This is a convenience function that collapses 5 repetitive |
1467 | /// lines for defining MySqlParameters to 2 parameters: | 1467 | /// lines for defining MySqlParameters to 2 parameters: |
1468 | /// column name and database type. | 1468 | /// column name and database type. |
1469 | /// | 1469 | /// |
1470 | /// It assumes certain conventions like ?param as the param | 1470 | /// It assumes certain conventions like ?param as the param |
1471 | /// name to replace in parametrized queries, and that source | 1471 | /// name to replace in parametrized queries, and that source |
1472 | /// version is always current version, both of which are fine | 1472 | /// version is always current version, both of which are fine |
@@ -1498,7 +1498,7 @@ namespace OpenSim.Data.MySQL | |||
1498 | delete.Connection = conn; | 1498 | delete.Connection = conn; |
1499 | da.DeleteCommand = delete; | 1499 | da.DeleteCommand = delete; |
1500 | } | 1500 | } |
1501 | 1501 | ||
1502 | private void SetupItemsCommands(MySqlDataAdapter da, MySqlConnection conn) | 1502 | private void SetupItemsCommands(MySqlDataAdapter da, MySqlConnection conn) |
1503 | { | 1503 | { |
1504 | da.InsertCommand = createInsertCommand("primitems", m_itemsTable); | 1504 | da.InsertCommand = createInsertCommand("primitems", m_itemsTable); |
@@ -1511,7 +1511,7 @@ namespace OpenSim.Data.MySQL | |||
1511 | delete.Parameters.Add(createMySqlParameter("itemID", typeof (String))); | 1511 | delete.Parameters.Add(createMySqlParameter("itemID", typeof (String))); |
1512 | delete.Connection = conn; | 1512 | delete.Connection = conn; |
1513 | da.DeleteCommand = delete; | 1513 | da.DeleteCommand = delete; |
1514 | } | 1514 | } |
1515 | 1515 | ||
1516 | private void SetupTerrainCommands(MySqlDataAdapter da, MySqlConnection conn) | 1516 | private void SetupTerrainCommands(MySqlDataAdapter da, MySqlConnection conn) |
1517 | { | 1517 | { |
@@ -1597,7 +1597,7 @@ namespace OpenSim.Data.MySQL | |||
1597 | { | 1597 | { |
1598 | m_log.WarnFormat("[REGION DB]: Shapes Table Already Exists: {0}", e); | 1598 | m_log.WarnFormat("[REGION DB]: Shapes Table Already Exists: {0}", e); |
1599 | } | 1599 | } |
1600 | 1600 | ||
1601 | try | 1601 | try |
1602 | { | 1602 | { |
1603 | icmd.ExecuteNonQuery(); | 1603 | icmd.ExecuteNonQuery(); |
@@ -1605,7 +1605,7 @@ namespace OpenSim.Data.MySQL | |||
1605 | catch (MySqlException e) | 1605 | catch (MySqlException e) |
1606 | { | 1606 | { |
1607 | m_log.WarnFormat("[REGION DB]: Items Table Already Exists: {0}", e); | 1607 | m_log.WarnFormat("[REGION DB]: Items Table Already Exists: {0}", e); |
1608 | } | 1608 | } |
1609 | 1609 | ||
1610 | try | 1610 | try |
1611 | { | 1611 | { |
@@ -1643,7 +1643,7 @@ namespace OpenSim.Data.MySQL | |||
1643 | MySqlCommand shapeSelectCmd = new MySqlCommand(m_shapeSelect, conn); | 1643 | MySqlCommand shapeSelectCmd = new MySqlCommand(m_shapeSelect, conn); |
1644 | MySqlDataAdapter sDa = new MySqlDataAdapter(shapeSelectCmd); | 1644 | MySqlDataAdapter sDa = new MySqlDataAdapter(shapeSelectCmd); |
1645 | MySqlCommand itemsSelectCmd = new MySqlCommand(m_itemsSelect, conn); | 1645 | MySqlCommand itemsSelectCmd = new MySqlCommand(m_itemsSelect, conn); |
1646 | MySqlDataAdapter iDa = new MySqlDataAdapter(itemsSelectCmd); | 1646 | MySqlDataAdapter iDa = new MySqlDataAdapter(itemsSelectCmd); |
1647 | MySqlCommand terrainSelectCmd = new MySqlCommand(m_terrainSelect, conn); | 1647 | MySqlCommand terrainSelectCmd = new MySqlCommand(m_terrainSelect, conn); |
1648 | MySqlDataAdapter tDa = new MySqlDataAdapter(terrainSelectCmd); | 1648 | MySqlDataAdapter tDa = new MySqlDataAdapter(terrainSelectCmd); |
1649 | MySqlCommand landSelectCmd = new MySqlCommand(m_landSelect, conn); | 1649 | MySqlCommand landSelectCmd = new MySqlCommand(m_landSelect, conn); |
@@ -1656,10 +1656,10 @@ namespace OpenSim.Data.MySQL | |||
1656 | { | 1656 | { |
1657 | pDa.Fill(tmpDS, "prims"); | 1657 | pDa.Fill(tmpDS, "prims"); |
1658 | sDa.Fill(tmpDS, "primshapes"); | 1658 | sDa.Fill(tmpDS, "primshapes"); |
1659 | 1659 | ||
1660 | if (persistPrimInventories) | 1660 | if (persistPrimInventories) |
1661 | iDa.Fill(tmpDS, "primitems"); | 1661 | iDa.Fill(tmpDS, "primitems"); |
1662 | 1662 | ||
1663 | tDa.Fill(tmpDS, "terrain"); | 1663 | tDa.Fill(tmpDS, "terrain"); |
1664 | lDa.Fill(tmpDS, "land"); | 1664 | lDa.Fill(tmpDS, "land"); |
1665 | lalDa.Fill(tmpDS, "landaccesslist"); | 1665 | lalDa.Fill(tmpDS, "landaccesslist"); |
@@ -1672,10 +1672,10 @@ namespace OpenSim.Data.MySQL | |||
1672 | 1672 | ||
1673 | pDa.Fill(tmpDS, "prims"); | 1673 | pDa.Fill(tmpDS, "prims"); |
1674 | sDa.Fill(tmpDS, "primshapes"); | 1674 | sDa.Fill(tmpDS, "primshapes"); |
1675 | 1675 | ||
1676 | if (persistPrimInventories) | 1676 | if (persistPrimInventories) |
1677 | iDa.Fill(tmpDS, "primitems"); | 1677 | iDa.Fill(tmpDS, "primitems"); |
1678 | 1678 | ||
1679 | tDa.Fill(tmpDS, "terrain"); | 1679 | tDa.Fill(tmpDS, "terrain"); |
1680 | lDa.Fill(tmpDS, "land"); | 1680 | lDa.Fill(tmpDS, "land"); |
1681 | lalDa.Fill(tmpDS, "landaccesslist"); | 1681 | lalDa.Fill(tmpDS, "landaccesslist"); |
@@ -1688,7 +1688,7 @@ namespace OpenSim.Data.MySQL | |||
1688 | return false; | 1688 | return false; |
1689 | } | 1689 | } |
1690 | } | 1690 | } |
1691 | 1691 | ||
1692 | foreach (DataColumn col in createShapeTable().Columns) | 1692 | foreach (DataColumn col in createShapeTable().Columns) |
1693 | { | 1693 | { |
1694 | if (!tmpDS.Tables["primshapes"].Columns.Contains(col.ColumnName)) | 1694 | if (!tmpDS.Tables["primshapes"].Columns.Contains(col.ColumnName)) |
@@ -1697,9 +1697,9 @@ namespace OpenSim.Data.MySQL | |||
1697 | return false; | 1697 | return false; |
1698 | } | 1698 | } |
1699 | } | 1699 | } |
1700 | 1700 | ||
1701 | // XXX primitems should probably go here eventually | 1701 | // XXX primitems should probably go here eventually |
1702 | 1702 | ||
1703 | foreach (DataColumn col in createTerrainTable().Columns) | 1703 | foreach (DataColumn col in createTerrainTable().Columns) |
1704 | { | 1704 | { |
1705 | if (!tmpDS.Tables["terrain"].Columns.Contains(col.ColumnName)) | 1705 | if (!tmpDS.Tables["terrain"].Columns.Contains(col.ColumnName)) |
@@ -1708,7 +1708,7 @@ namespace OpenSim.Data.MySQL | |||
1708 | return false; | 1708 | return false; |
1709 | } | 1709 | } |
1710 | } | 1710 | } |
1711 | 1711 | ||
1712 | foreach (DataColumn col in createLandTable().Columns) | 1712 | foreach (DataColumn col in createLandTable().Columns) |
1713 | { | 1713 | { |
1714 | if (!tmpDS.Tables["land"].Columns.Contains(col.ColumnName)) | 1714 | if (!tmpDS.Tables["land"].Columns.Contains(col.ColumnName)) |
@@ -1717,7 +1717,7 @@ namespace OpenSim.Data.MySQL | |||
1717 | return false; | 1717 | return false; |
1718 | } | 1718 | } |
1719 | } | 1719 | } |
1720 | 1720 | ||
1721 | foreach (DataColumn col in createLandAccessListTable().Columns) | 1721 | foreach (DataColumn col in createLandAccessListTable().Columns) |
1722 | { | 1722 | { |
1723 | if (!tmpDS.Tables["landaccesslist"].Columns.Contains(col.ColumnName)) | 1723 | if (!tmpDS.Tables["landaccesslist"].Columns.Contains(col.ColumnName)) |
@@ -1726,7 +1726,7 @@ namespace OpenSim.Data.MySQL | |||
1726 | return false; | 1726 | return false; |
1727 | } | 1727 | } |
1728 | } | 1728 | } |
1729 | 1729 | ||
1730 | return true; | 1730 | return true; |
1731 | } | 1731 | } |
1732 | 1732 | ||
@@ -1783,7 +1783,7 @@ namespace OpenSim.Data.MySQL | |||
1783 | else if (type == typeof (Int64)) | 1783 | else if (type == typeof (Int64)) |
1784 | { | 1784 | { |
1785 | return "bigint"; | 1785 | return "bigint"; |
1786 | } | 1786 | } |
1787 | else if (type == typeof (Double)) | 1787 | else if (type == typeof (Double)) |
1788 | { | 1788 | { |
1789 | return "float"; | 1789 | return "float"; |
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs index 90664ff..92b005d 100644 --- a/OpenSim/Data/MySQL/MySQLInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs | |||
@@ -40,7 +40,7 @@ namespace OpenSim.Data.MySQL | |||
40 | /// </summary> | 40 | /// </summary> |
41 | public class MySQLInventoryData : IInventoryData | 41 | public class MySQLInventoryData : IInventoryData |
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 | /// <summary> | 46 | /// <summary> |
@@ -249,7 +249,7 @@ namespace OpenSim.Data.MySQL | |||
249 | 249 | ||
250 | // There should only ever be one root folder for a user. However, if there's more | 250 | // There should only ever be one root folder for a user. However, if there's more |
251 | // than one we'll simply use the first one rather than failing. It would be even | 251 | // than one we'll simply use the first one rather than failing. It would be even |
252 | // nicer to print some message to this effect, but this feels like it's too low a | 252 | // nicer to print some message to this effect, but this feels like it's too low a |
253 | // to put such a message out, and it's too minor right now to spare the time to | 253 | // to put such a message out, and it's too minor right now to spare the time to |
254 | // suitably refactor. | 254 | // suitably refactor. |
255 | if (items.Count > 0) | 255 | if (items.Count > 0) |
@@ -332,13 +332,13 @@ namespace OpenSim.Data.MySQL | |||
332 | item.InvType = (int) reader["invType"]; | 332 | item.InvType = (int) reader["invType"]; |
333 | item.Creator = new LLUUID((string) reader["creatorID"]); | 333 | item.Creator = new LLUUID((string) reader["creatorID"]); |
334 | item.BasePermissions = (uint) reader["inventoryBasePermissions"]; | 334 | item.BasePermissions = (uint) reader["inventoryBasePermissions"]; |
335 | item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"]; | 335 | item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"]; |
336 | item.SalePrice = (int) reader["salePrice"]; | 336 | item.SalePrice = (int) reader["salePrice"]; |
337 | item.SaleType = Convert.ToByte(reader["saleType"]); | 337 | item.SaleType = Convert.ToByte(reader["saleType"]); |
338 | item.CreationDate = (int) reader["creationDate"]; | 338 | item.CreationDate = (int) reader["creationDate"]; |
339 | item.GroupID = new LLUUID(reader["groupID"].ToString()); | 339 | item.GroupID = new LLUUID(reader["groupID"].ToString()); |
340 | item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]); | 340 | item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]); |
341 | item.Flags = (uint) reader["flags"]; | 341 | item.Flags = (uint) reader["flags"]; |
342 | 342 | ||
343 | return item; | 343 | return item; |
344 | } | 344 | } |
@@ -483,12 +483,12 @@ namespace OpenSim.Data.MySQL | |||
483 | result.Parameters.AddWithValue("?groupID", item.GroupID); | 483 | result.Parameters.AddWithValue("?groupID", item.GroupID); |
484 | result.Parameters.AddWithValue("?groupOwned", item.GroupOwned); | 484 | result.Parameters.AddWithValue("?groupOwned", item.GroupOwned); |
485 | result.Parameters.AddWithValue("?flags", item.Flags); | 485 | result.Parameters.AddWithValue("?flags", item.Flags); |
486 | 486 | ||
487 | lock (database) | 487 | lock (database) |
488 | { | 488 | { |
489 | result.ExecuteNonQuery(); | 489 | result.ExecuteNonQuery(); |
490 | } | 490 | } |
491 | 491 | ||
492 | result.Dispose(); | 492 | result.Dispose(); |
493 | } | 493 | } |
494 | catch (MySqlException e) | 494 | catch (MySqlException e) |
@@ -507,7 +507,7 @@ namespace OpenSim.Data.MySQL | |||
507 | } | 507 | } |
508 | 508 | ||
509 | /// <summary> | 509 | /// <summary> |
510 | /// | 510 | /// |
511 | /// </summary> | 511 | /// </summary> |
512 | /// <param name="item"></param> | 512 | /// <param name="item"></param> |
513 | public void deleteInventoryItem(LLUUID itemID) | 513 | public void deleteInventoryItem(LLUUID itemID) |
@@ -517,7 +517,7 @@ namespace OpenSim.Data.MySQL | |||
517 | MySqlCommand cmd = | 517 | MySqlCommand cmd = |
518 | new MySqlCommand("DELETE FROM inventoryitems WHERE inventoryID=?uuid", database.Connection); | 518 | new MySqlCommand("DELETE FROM inventoryitems WHERE inventoryID=?uuid", database.Connection); |
519 | cmd.Parameters.AddWithValue("?uuid", itemID.ToString()); | 519 | cmd.Parameters.AddWithValue("?uuid", itemID.ToString()); |
520 | 520 | ||
521 | lock (database) | 521 | lock (database) |
522 | { | 522 | { |
523 | cmd.ExecuteNonQuery(); | 523 | cmd.ExecuteNonQuery(); |
@@ -596,7 +596,7 @@ namespace OpenSim.Data.MySQL | |||
596 | } | 596 | } |
597 | 597 | ||
598 | /// <summary> | 598 | /// <summary> |
599 | /// Append a list of all the child folders of a parent folder | 599 | /// Append a list of all the child folders of a parent folder |
600 | /// </summary> | 600 | /// </summary> |
601 | /// <param name="folders">list where folders will be appended</param> | 601 | /// <param name="folders">list where folders will be appended</param> |
602 | /// <param name="parentID">ID of parent</param> | 602 | /// <param name="parentID">ID of parent</param> |
@@ -623,11 +623,11 @@ namespace OpenSim.Data.MySQL | |||
623 | protected void deleteOneFolder(LLUUID folderID) | 623 | protected void deleteOneFolder(LLUUID folderID) |
624 | { | 624 | { |
625 | try | 625 | try |
626 | { | 626 | { |
627 | MySqlCommand cmd = | 627 | MySqlCommand cmd = |
628 | new MySqlCommand("DELETE FROM inventoryfolders WHERE folderID=?uuid", database.Connection); | 628 | new MySqlCommand("DELETE FROM inventoryfolders WHERE folderID=?uuid", database.Connection); |
629 | cmd.Parameters.AddWithValue("?uuid", folderID.ToString()); | 629 | cmd.Parameters.AddWithValue("?uuid", folderID.ToString()); |
630 | 630 | ||
631 | lock (database) | 631 | lock (database) |
632 | { | 632 | { |
633 | cmd.ExecuteNonQuery(); | 633 | cmd.ExecuteNonQuery(); |
@@ -647,7 +647,7 @@ namespace OpenSim.Data.MySQL | |||
647 | MySqlCommand cmd = | 647 | MySqlCommand cmd = |
648 | new MySqlCommand("DELETE FROM inventoryitems WHERE parentFolderID=?uuid", database.Connection); | 648 | new MySqlCommand("DELETE FROM inventoryitems WHERE parentFolderID=?uuid", database.Connection); |
649 | cmd.Parameters.AddWithValue("?uuid", folderID.ToString()); | 649 | cmd.Parameters.AddWithValue("?uuid", folderID.ToString()); |
650 | 650 | ||
651 | lock (database) | 651 | lock (database) |
652 | { | 652 | { |
653 | cmd.ExecuteNonQuery(); | 653 | cmd.ExecuteNonQuery(); |
diff --git a/OpenSim/Data/MySQL/MySQLManager.cs b/OpenSim/Data/MySQL/MySQLManager.cs index 4455c3b..f7baadc 100644 --- a/OpenSim/Data/MySQL/MySQLManager.cs +++ b/OpenSim/Data/MySQL/MySQLManager.cs | |||
@@ -302,7 +302,7 @@ namespace OpenSim.Data.MySQL | |||
302 | // Region Main gotta-have-or-we-return-null parts | 302 | // Region Main gotta-have-or-we-return-null parts |
303 | UInt64 tmp64; | 303 | UInt64 tmp64; |
304 | if (!UInt64.TryParse(reader["regionHandle"].ToString(), out tmp64)) | 304 | if (!UInt64.TryParse(reader["regionHandle"].ToString(), out tmp64)) |
305 | { | 305 | { |
306 | return null; | 306 | return null; |
307 | } | 307 | } |
308 | else | 308 | else |
@@ -310,7 +310,7 @@ namespace OpenSim.Data.MySQL | |||
310 | retval.regionHandle = tmp64; | 310 | retval.regionHandle = tmp64; |
311 | } | 311 | } |
312 | LLUUID tmp_uuid; | 312 | LLUUID tmp_uuid; |
313 | if (!LLUUID.TryParse((string)reader["uuid"], out tmp_uuid)) | 313 | if (!LLUUID.TryParse((string)reader["uuid"], out tmp_uuid)) |
314 | { | 314 | { |
315 | return null; | 315 | return null; |
316 | } | 316 | } |
@@ -321,7 +321,7 @@ namespace OpenSim.Data.MySQL | |||
321 | 321 | ||
322 | // non-critical parts | 322 | // non-critical parts |
323 | retval.regionName = (string)reader["regionName"]; | 323 | retval.regionName = (string)reader["regionName"]; |
324 | retval.originUUID = new LLUUID((string) reader["originUUID"]); | 324 | retval.originUUID = new LLUUID((string) reader["originUUID"]); |
325 | 325 | ||
326 | // Secrets | 326 | // Secrets |
327 | retval.regionRecvKey = (string) reader["regionRecvKey"]; | 327 | retval.regionRecvKey = (string) reader["regionRecvKey"]; |
@@ -360,8 +360,8 @@ namespace OpenSim.Data.MySQL | |||
360 | 360 | ||
361 | // World Map Addition | 361 | // World Map Addition |
362 | LLUUID.TryParse((string)reader["regionMapTexture"], out retval.regionMapTextureID); | 362 | LLUUID.TryParse((string)reader["regionMapTexture"], out retval.regionMapTextureID); |
363 | LLUUID.TryParse((string)reader["owner_uuid"], out retval.owner_uuid); | 363 | LLUUID.TryParse((string)reader["owner_uuid"], out retval.owner_uuid); |
364 | } | 364 | } |
365 | else | 365 | else |
366 | { | 366 | { |
367 | return null; | 367 | return null; |
@@ -418,7 +418,7 @@ namespace OpenSim.Data.MySQL | |||
418 | 418 | ||
419 | LLUUID.TryParse((string) reader["sessionID"], out tmp); | 419 | LLUUID.TryParse((string) reader["sessionID"], out tmp); |
420 | retval.SessionID = tmp; | 420 | retval.SessionID = tmp; |
421 | 421 | ||
422 | LLUUID.TryParse((string)reader["secureSessionID"], out tmp); | 422 | LLUUID.TryParse((string)reader["secureSessionID"], out tmp); |
423 | retval.SecureSessionID = tmp; | 423 | retval.SecureSessionID = tmp; |
424 | 424 | ||
@@ -488,7 +488,7 @@ namespace OpenSim.Data.MySQL | |||
488 | 488 | ||
489 | if (reader.IsDBNull(reader.GetOrdinal("profileAboutText"))) | 489 | if (reader.IsDBNull(reader.GetOrdinal("profileAboutText"))) |
490 | retval.AboutText = ""; | 490 | retval.AboutText = ""; |
491 | else | 491 | else |
492 | retval.AboutText = (string) reader["profileAboutText"]; | 492 | retval.AboutText = (string) reader["profileAboutText"]; |
493 | 493 | ||
494 | if (reader.IsDBNull(reader.GetOrdinal("profileFirstText"))) | 494 | if (reader.IsDBNull(reader.GetOrdinal("profileFirstText"))) |
@@ -511,7 +511,7 @@ namespace OpenSim.Data.MySQL | |||
511 | LLUUID.TryParse((string)reader["profileFirstImage"], out tmp); | 511 | LLUUID.TryParse((string)reader["profileFirstImage"], out tmp); |
512 | retval.FirstLifeImage = tmp; | 512 | retval.FirstLifeImage = tmp; |
513 | } | 513 | } |
514 | 514 | ||
515 | if (reader.IsDBNull(reader.GetOrdinal("webLoginKey"))) | 515 | if (reader.IsDBNull(reader.GetOrdinal("webLoginKey"))) |
516 | { | 516 | { |
517 | retval.WebLoginKey = LLUUID.Zero; | 517 | retval.WebLoginKey = LLUUID.Zero; |
diff --git a/OpenSim/Data/MySQL/MySQLUserData.cs b/OpenSim/Data/MySQL/MySQLUserData.cs index a1e1094..0acf47b 100644 --- a/OpenSim/Data/MySQL/MySQLUserData.cs +++ b/OpenSim/Data/MySQL/MySQLUserData.cs | |||
@@ -59,7 +59,7 @@ namespace OpenSim.Data.MySQL | |||
59 | { | 59 | { |
60 | // TODO: actually do something with our connect string | 60 | // TODO: actually do something with our connect string |
61 | // instead of loading the second config | 61 | // instead of loading the second config |
62 | 62 | ||
63 | IniFile iniFile = new IniFile("mysql_connection.ini"); | 63 | IniFile iniFile = new IniFile("mysql_connection.ini"); |
64 | string settingHostname = iniFile.ParseFileReadValue("hostname"); | 64 | string settingHostname = iniFile.ParseFileReadValue("hostname"); |
65 | string settingDatabase = iniFile.ParseFileReadValue("database"); | 65 | string settingDatabase = iniFile.ParseFileReadValue("database"); |
@@ -67,7 +67,7 @@ namespace OpenSim.Data.MySQL | |||
67 | string settingPassword = iniFile.ParseFileReadValue("password"); | 67 | string settingPassword = iniFile.ParseFileReadValue("password"); |
68 | string settingPooling = iniFile.ParseFileReadValue("pooling"); | 68 | string settingPooling = iniFile.ParseFileReadValue("pooling"); |
69 | string settingPort = iniFile.ParseFileReadValue("port"); | 69 | string settingPort = iniFile.ParseFileReadValue("port"); |
70 | 70 | ||
71 | m_usersTableName = iniFile.ParseFileReadValue("userstablename"); | 71 | m_usersTableName = iniFile.ParseFileReadValue("userstablename"); |
72 | if (m_usersTableName == null) | 72 | if (m_usersTableName == null) |
73 | { | 73 | { |
@@ -206,15 +206,15 @@ namespace OpenSim.Data.MySQL | |||
206 | param["?friendID"] = friend.UUID.ToString(); | 206 | param["?friendID"] = friend.UUID.ToString(); |
207 | param["?friendPerms"] = perms.ToString(); | 207 | param["?friendPerms"] = perms.ToString(); |
208 | param["?datetimestamp"] = dtvalue.ToString(); | 208 | param["?datetimestamp"] = dtvalue.ToString(); |
209 | 209 | ||
210 | try | 210 | try |
211 | { | 211 | { |
212 | lock (database) | 212 | lock (database) |
213 | { | 213 | { |
214 | IDbCommand adder = | 214 | IDbCommand adder = |
215 | database.Query( | 215 | database.Query( |
216 | "INSERT INTO `" + m_userFriendsTableName + "` " + | 216 | "INSERT INTO `" + m_userFriendsTableName + "` " + |
217 | "(`ownerID`,`friendID`,`friendPerms`,`datetimestamp`) " + | 217 | "(`ownerID`,`friendID`,`friendPerms`,`datetimestamp`) " + |
218 | "VALUES " + | 218 | "VALUES " + |
219 | "(?ownerID,?friendID,?friendPerms,?datetimestamp)", | 219 | "(?ownerID,?friendID,?friendPerms,?datetimestamp)", |
220 | param); | 220 | param); |
@@ -325,7 +325,7 @@ namespace OpenSim.Data.MySQL | |||
325 | 325 | ||
326 | // This is not a real column in the database table, it's a joined column from the opposite record | 326 | // This is not a real column in the database table, it's a joined column from the opposite record |
327 | fli.FriendListOwnerPerms = (uint)Convert.ToInt32(reader["ownerperms"]); | 327 | fli.FriendListOwnerPerms = (uint)Convert.ToInt32(reader["ownerperms"]); |
328 | 328 | ||
329 | Lfli.Add(fli); | 329 | Lfli.Add(fli); |
330 | } | 330 | } |
331 | reader.Close(); | 331 | reader.Close(); |
@@ -599,7 +599,7 @@ namespace OpenSim.Data.MySQL | |||
599 | user.UserAssetURI, user.CanDoMask, user.WantDoMask, user.AboutText, | 599 | user.UserAssetURI, user.CanDoMask, user.WantDoMask, user.AboutText, |
600 | user.FirstLifeAboutText, user.Image, user.FirstLifeImage, user.WebLoginKey); | 600 | user.FirstLifeAboutText, user.Image, user.FirstLifeImage, user.WebLoginKey); |
601 | } | 601 | } |
602 | 602 | ||
603 | return true; | 603 | return true; |
604 | } | 604 | } |
605 | 605 | ||
@@ -630,7 +630,7 @@ namespace OpenSim.Data.MySQL | |||
630 | 630 | ||
631 | /// Appearance | 631 | /// Appearance |
632 | /// TODO: stubs for now to get us to a compiling state gently | 632 | /// TODO: stubs for now to get us to a compiling state gently |
633 | // override public AvatarAppearance GetUserAppearance(LLUUID user) | 633 | // override public AvatarAppearance GetUserAppearance(LLUUID user) |
634 | // { | 634 | // { |
635 | // return new AvatarAppearance(); | 635 | // return new AvatarAppearance(); |
636 | // } | 636 | // } |
@@ -644,12 +644,12 @@ namespace OpenSim.Data.MySQL | |||
644 | { | 644 | { |
645 | return; | 645 | return; |
646 | } | 646 | } |
647 | 647 | ||
648 | override public void RemoveAttachment(LLUUID user, LLUUID item) | 648 | override public void RemoveAttachment(LLUUID user, LLUUID item) |
649 | { | 649 | { |
650 | return; | 650 | return; |
651 | } | 651 | } |
652 | 652 | ||
653 | override public List<LLUUID> GetAttachments(LLUUID user) | 653 | override public List<LLUUID> GetAttachments(LLUUID user) |
654 | { | 654 | { |
655 | return new List<LLUUID>(); | 655 | return new List<LLUUID>(); |
diff --git a/OpenSim/Data/MySQL/Properties/AssemblyInfo.cs b/OpenSim/Data/MySQL/Properties/AssemblyInfo.cs index 16b2a4f..b3e08a3 100644 --- a/OpenSim/Data/MySQL/Properties/AssemblyInfo.cs +++ b/OpenSim/Data/MySQL/Properties/AssemblyInfo.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | 30 | ||
31 | // General Information about an assembly is controlled through the following | 31 | // General information about an assembly is controlled through the following |
32 | // set of attributes. Change these attribute values to modify the information | 32 | // set of attributes. Change these attribute values to modify the information |
33 | // associated with an assembly. | 33 | // associated with an assembly. |
34 | 34 | ||
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices; | |||
41 | [assembly : AssemblyTrademark("")] | 41 | [assembly : AssemblyTrademark("")] |
42 | [assembly : AssemblyCulture("")] | 42 | [assembly : AssemblyCulture("")] |
43 | 43 | ||
44 | // Setting ComVisible to false makes the types in this assembly not visible | 44 | // Setting ComVisible to false makes the types in this assembly not visible |
45 | // to COM components. If you need to access a type in this assembly from | 45 | // to COM components. If you need to access a type in this assembly from |
46 | // COM, set the ComVisible attribute to true on that type. | 46 | // COM, set the ComVisible attribute to true on that type. |
47 | 47 | ||
48 | [assembly : ComVisible(false)] | 48 | [assembly : ComVisible(false)] |
@@ -54,11 +54,11 @@ using System.Runtime.InteropServices; | |||
54 | // Version information for an assembly consists of the following four values: | 54 | // Version information for an assembly consists of the following four values: |
55 | // | 55 | // |
56 | // Major Version | 56 | // Major Version |
57 | // Minor Version | 57 | // Minor Version |
58 | // Build Number | 58 | // Build Number |
59 | // Revision | 59 | // Revision |
60 | // | 60 | // |
61 | // You can specify all the values or you can default the Revision and Build Numbers | 61 | // You can specify all the values or you can default the Revision and Build Numbers |
62 | // by using the '*' as shown below: | 62 | // by using the '*' as shown below: |
63 | 63 | ||
64 | [assembly : AssemblyVersion("1.0.0.0")] | 64 | [assembly : AssemblyVersion("1.0.0.0")] |
diff --git a/OpenSim/Data/NHibernate/LLUUIDUserType.cs b/OpenSim/Data/NHibernate/LLUUIDUserType.cs index e4f1dc2..0f10344 100644 --- a/OpenSim/Data/NHibernate/LLUUIDUserType.cs +++ b/OpenSim/Data/NHibernate/LLUUIDUserType.cs | |||
@@ -35,7 +35,7 @@ using NHibernate.UserTypes; | |||
35 | namespace OpenSim.Data.NHibernate | 35 | namespace OpenSim.Data.NHibernate |
36 | { | 36 | { |
37 | [Serializable] | 37 | [Serializable] |
38 | public class LLUUIDUserType: IUserType | 38 | public class LLUUIDUserType: IUserType |
39 | { | 39 | { |
40 | public object Assemble(object cached, object owner) | 40 | public object Assemble(object cached, object owner) |
41 | { | 41 | { |
@@ -69,7 +69,7 @@ namespace OpenSim.Data.NHibernate | |||
69 | 69 | ||
70 | public object NullSafeGet(IDataReader rs, string[] names, object owner) | 70 | public object NullSafeGet(IDataReader rs, string[] names, object owner) |
71 | { | 71 | { |
72 | object uuid = null; | 72 | object uuid = null; |
73 | 73 | ||
74 | int ord = rs.GetOrdinal(names[0]); | 74 | int ord = rs.GetOrdinal(names[0]); |
75 | if (!rs.IsDBNull(ord)) | 75 | if (!rs.IsDBNull(ord)) |
diff --git a/OpenSim/Data/NHibernate/NHibernateAssetData.cs b/OpenSim/Data/NHibernate/NHibernateAssetData.cs index 4eb9eef..075f2e9 100644 --- a/OpenSim/Data/NHibernate/NHibernateAssetData.cs +++ b/OpenSim/Data/NHibernate/NHibernateAssetData.cs | |||
@@ -65,20 +65,20 @@ namespace OpenSim.Data.NHibernate | |||
65 | // TODO: make this a real exception type | 65 | // TODO: make this a real exception type |
66 | throw new Exception("Malformed Inventory connection string '" + connect + "'"); | 66 | throw new Exception("Malformed Inventory connection string '" + connect + "'"); |
67 | } | 67 | } |
68 | 68 | ||
69 | // NHibernate setup | 69 | // NHibernate setup |
70 | cfg = new Configuration(); | 70 | cfg = new Configuration(); |
71 | cfg.SetProperty(Environment.ConnectionProvider, | 71 | cfg.SetProperty(Environment.ConnectionProvider, |
72 | "NHibernate.Connection.DriverConnectionProvider"); | 72 | "NHibernate.Connection.DriverConnectionProvider"); |
73 | cfg.SetProperty(Environment.Dialect, | 73 | cfg.SetProperty(Environment.Dialect, |
74 | "NHibernate.Dialect." + parts[0]); | 74 | "NHibernate.Dialect." + parts[0]); |
75 | cfg.SetProperty(Environment.ConnectionDriver, | 75 | cfg.SetProperty(Environment.ConnectionDriver, |
76 | "NHibernate.Driver." + parts[1]); | 76 | "NHibernate.Driver." + parts[1]); |
77 | cfg.SetProperty(Environment.ConnectionString, parts[2]); | 77 | cfg.SetProperty(Environment.ConnectionString, parts[2]); |
78 | cfg.AddAssembly("OpenSim.Data.NHibernate"); | 78 | cfg.AddAssembly("OpenSim.Data.NHibernate"); |
79 | 79 | ||
80 | HbmSerializer.Default.Validate = true; | 80 | HbmSerializer.Default.Validate = true; |
81 | using ( MemoryStream stream = | 81 | using ( MemoryStream stream = |
82 | HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly())) | 82 | HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly())) |
83 | cfg.AddInputStream(stream); | 83 | cfg.AddInputStream(stream); |
84 | 84 | ||
diff --git a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs index fa75588..228e0b6 100644 --- a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs +++ b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs | |||
@@ -62,23 +62,23 @@ namespace OpenSim.Data.NHibernate | |||
62 | // TODO: make this a real exception type | 62 | // TODO: make this a real exception type |
63 | throw new Exception("Malformed Inventory connection string '" + connect + "'"); | 63 | throw new Exception("Malformed Inventory connection string '" + connect + "'"); |
64 | } | 64 | } |
65 | 65 | ||
66 | // Establish NHibernate Connection | 66 | // Establish NHibernate Connection |
67 | cfg = new Configuration(); | 67 | cfg = new Configuration(); |
68 | cfg.SetProperty(Environment.ConnectionProvider, | 68 | cfg.SetProperty(Environment.ConnectionProvider, |
69 | "NHibernate.Connection.DriverConnectionProvider"); | 69 | "NHibernate.Connection.DriverConnectionProvider"); |
70 | cfg.SetProperty(Environment.Dialect, | 70 | cfg.SetProperty(Environment.Dialect, |
71 | "NHibernate.Dialect." + parts[0]); | 71 | "NHibernate.Dialect." + parts[0]); |
72 | cfg.SetProperty(Environment.ConnectionDriver, | 72 | cfg.SetProperty(Environment.ConnectionDriver, |
73 | "NHibernate.Driver." + parts[1]); | 73 | "NHibernate.Driver." + parts[1]); |
74 | cfg.SetProperty(Environment.ConnectionString, parts[2]); | 74 | cfg.SetProperty(Environment.ConnectionString, parts[2]); |
75 | cfg.AddAssembly("OpenSim.Data.NHibernate"); | 75 | cfg.AddAssembly("OpenSim.Data.NHibernate"); |
76 | 76 | ||
77 | HbmSerializer.Default.Validate = true; | 77 | HbmSerializer.Default.Validate = true; |
78 | using ( MemoryStream stream = | 78 | using ( MemoryStream stream = |
79 | HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly())) | 79 | HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly())) |
80 | cfg.AddInputStream(stream); | 80 | cfg.AddInputStream(stream); |
81 | 81 | ||
82 | // If uncommented this will auto create tables, but it | 82 | // If uncommented this will auto create tables, but it |
83 | // does drops of the old tables, so we need a smarter way | 83 | // does drops of the old tables, so we need a smarter way |
84 | // to acturally manage this. | 84 | // to acturally manage this. |
@@ -120,8 +120,8 @@ namespace OpenSim.Data.NHibernate | |||
120 | 120 | ||
121 | /***************************************************************** | 121 | /***************************************************************** |
122 | * | 122 | * |
123 | * Basic CRUD operations on Data | 123 | * Basic CRUD operations on Data |
124 | * | 124 | * |
125 | ****************************************************************/ | 125 | ****************************************************************/ |
126 | 126 | ||
127 | // READ | 127 | // READ |
@@ -195,7 +195,7 @@ namespace OpenSim.Data.NHibernate | |||
195 | } | 195 | } |
196 | 196 | ||
197 | /// <summary> | 197 | /// <summary> |
198 | /// | 198 | /// |
199 | /// </summary> | 199 | /// </summary> |
200 | /// <param name="item"></param> | 200 | /// <param name="item"></param> |
201 | public void deleteInventoryItem(LLUUID itemID) | 201 | public void deleteInventoryItem(LLUUID itemID) |
@@ -279,7 +279,7 @@ namespace OpenSim.Data.NHibernate | |||
279 | } | 279 | } |
280 | 280 | ||
281 | /// <summary> | 281 | /// <summary> |
282 | /// | 282 | /// |
283 | /// </summary> | 283 | /// </summary> |
284 | /// <param name="folder"></param> | 284 | /// <param name="folder"></param> |
285 | public void deleteInventoryFolder(LLUUID folderID) | 285 | public void deleteInventoryFolder(LLUUID folderID) |
@@ -353,7 +353,7 @@ namespace OpenSim.Data.NHibernate | |||
353 | { | 353 | { |
354 | updateInventoryItem(item); | 354 | updateInventoryItem(item); |
355 | } | 355 | } |
356 | 356 | ||
357 | 357 | ||
358 | 358 | ||
359 | /// <summary> | 359 | /// <summary> |
@@ -403,9 +403,9 @@ namespace OpenSim.Data.NHibernate | |||
403 | return null; | 403 | return null; |
404 | } | 404 | } |
405 | } | 405 | } |
406 | 406 | ||
407 | /// <summary> | 407 | /// <summary> |
408 | /// Append a list of all the child folders of a parent folder | 408 | /// Append a list of all the child folders of a parent folder |
409 | /// </summary> | 409 | /// </summary> |
410 | /// <param name="folders">list where folders will be appended</param> | 410 | /// <param name="folders">list where folders will be appended</param> |
411 | /// <param name="parentID">ID of parent</param> | 411 | /// <param name="parentID">ID of parent</param> |
@@ -413,7 +413,7 @@ namespace OpenSim.Data.NHibernate | |||
413 | { | 413 | { |
414 | using (ISession session = factory.OpenSession()) | 414 | using (ISession session = factory.OpenSession()) |
415 | { | 415 | { |
416 | 416 | ||
417 | ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase)); | 417 | ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase)); |
418 | criteria.Add(Expression.Eq("ParentID", parentID)); | 418 | criteria.Add(Expression.Eq("ParentID", parentID)); |
419 | foreach (InventoryFolderBase item in criteria.List()) | 419 | foreach (InventoryFolderBase item in criteria.List()) |
@@ -443,7 +443,7 @@ namespace OpenSim.Data.NHibernate | |||
443 | 443 | ||
444 | for (int i = 0; i < folders.Count; i++) | 444 | for (int i = 0; i < folders.Count; i++) |
445 | getInventoryFolders(ref folders, folders[i].ID); | 445 | getInventoryFolders(ref folders, folders[i].ID); |
446 | 446 | ||
447 | return folders; | 447 | return folders; |
448 | } | 448 | } |
449 | } | 449 | } |
diff --git a/OpenSim/Data/NHibernate/NHibernateUserData.cs b/OpenSim/Data/NHibernate/NHibernateUserData.cs index 6ba2783..4de0291 100644 --- a/OpenSim/Data/NHibernate/NHibernateUserData.cs +++ b/OpenSim/Data/NHibernate/NHibernateUserData.cs | |||
@@ -64,20 +64,20 @@ namespace OpenSim.Data.NHibernate | |||
64 | 64 | ||
65 | // This is stubbing for now, it will become dynamic later and support different db backends | 65 | // This is stubbing for now, it will become dynamic later and support different db backends |
66 | cfg = new Configuration(); | 66 | cfg = new Configuration(); |
67 | cfg.SetProperty(Environment.ConnectionProvider, | 67 | cfg.SetProperty(Environment.ConnectionProvider, |
68 | "NHibernate.Connection.DriverConnectionProvider"); | 68 | "NHibernate.Connection.DriverConnectionProvider"); |
69 | cfg.SetProperty(Environment.Dialect, | 69 | cfg.SetProperty(Environment.Dialect, |
70 | "NHibernate.Dialect." + parts[0]); | 70 | "NHibernate.Dialect." + parts[0]); |
71 | cfg.SetProperty(Environment.ConnectionDriver, | 71 | cfg.SetProperty(Environment.ConnectionDriver, |
72 | "NHibernate.Driver." + parts[1]); | 72 | "NHibernate.Driver." + parts[1]); |
73 | cfg.SetProperty(Environment.ConnectionString, parts[2]); | 73 | cfg.SetProperty(Environment.ConnectionString, parts[2]); |
74 | cfg.AddAssembly("OpenSim.Data.NHibernate"); | 74 | cfg.AddAssembly("OpenSim.Data.NHibernate"); |
75 | 75 | ||
76 | HbmSerializer.Default.Validate = true; | 76 | HbmSerializer.Default.Validate = true; |
77 | using ( MemoryStream stream = | 77 | using ( MemoryStream stream = |
78 | HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly())) | 78 | HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly())) |
79 | cfg.AddInputStream(stream); | 79 | cfg.AddInputStream(stream); |
80 | 80 | ||
81 | // new SchemaExport(cfg).Create(true, true); | 81 | // new SchemaExport(cfg).Create(true, true); |
82 | 82 | ||
83 | factory = cfg.BuildSessionFactory(); | 83 | factory = cfg.BuildSessionFactory(); |
@@ -122,7 +122,7 @@ namespace OpenSim.Data.NHibernate | |||
122 | // BUG: CATCHALL IS BAD. | 122 | // BUG: CATCHALL IS BAD. |
123 | } | 123 | } |
124 | catch (Exception) {} | 124 | catch (Exception) {} |
125 | 125 | ||
126 | return (user != null); | 126 | return (user != null); |
127 | } | 127 | } |
128 | 128 | ||
@@ -151,7 +151,7 @@ namespace OpenSim.Data.NHibernate | |||
151 | // TODO: save agent | 151 | // TODO: save agent |
152 | transaction.Commit(); | 152 | transaction.Commit(); |
153 | } | 153 | } |
154 | } | 154 | } |
155 | } | 155 | } |
156 | else | 156 | else |
157 | { | 157 | { |
@@ -162,7 +162,7 @@ namespace OpenSim.Data.NHibernate | |||
162 | 162 | ||
163 | private static void SetAgentData(LLUUID uuid, UserAgentData agent, ISession session) | 163 | private static void SetAgentData(LLUUID uuid, UserAgentData agent, ISession session) |
164 | { | 164 | { |
165 | if (agent == null) | 165 | if (agent == null) |
166 | { | 166 | { |
167 | // TODO: got to figure out how to do a delete right | 167 | // TODO: got to figure out how to do a delete right |
168 | } | 168 | } |
@@ -178,7 +178,7 @@ namespace OpenSim.Data.NHibernate | |||
178 | session.Update(agent); | 178 | session.Update(agent); |
179 | } | 179 | } |
180 | } | 180 | } |
181 | 181 | ||
182 | } | 182 | } |
183 | override public bool UpdateUserProfile(UserProfileData profile) | 183 | override public bool UpdateUserProfile(UserProfileData profile) |
184 | { | 184 | { |
@@ -193,7 +193,7 @@ namespace OpenSim.Data.NHibernate | |||
193 | transaction.Commit(); | 193 | transaction.Commit(); |
194 | return true; | 194 | return true; |
195 | } | 195 | } |
196 | } | 196 | } |
197 | } | 197 | } |
198 | else | 198 | else |
199 | { | 199 | { |
@@ -202,7 +202,7 @@ namespace OpenSim.Data.NHibernate | |||
202 | return true; | 202 | return true; |
203 | } | 203 | } |
204 | } | 204 | } |
205 | 205 | ||
206 | override public void AddNewUserAgent(UserAgentData agent) | 206 | override public void AddNewUserAgent(UserAgentData agent) |
207 | { | 207 | { |
208 | using (ISession session = factory.OpenSession()) | 208 | using (ISession session = factory.OpenSession()) |
@@ -212,9 +212,9 @@ namespace OpenSim.Data.NHibernate | |||
212 | session.Save(agent); | 212 | session.Save(agent); |
213 | transaction.Commit(); | 213 | transaction.Commit(); |
214 | } | 214 | } |
215 | } | 215 | } |
216 | } | 216 | } |
217 | 217 | ||
218 | public void UpdateUserAgent(UserAgentData agent) | 218 | public void UpdateUserAgent(UserAgentData agent) |
219 | { | 219 | { |
220 | using (ISession session = factory.OpenSession()) | 220 | using (ISession session = factory.OpenSession()) |
@@ -224,7 +224,7 @@ namespace OpenSim.Data.NHibernate | |||
224 | session.Update(agent); | 224 | session.Update(agent); |
225 | transaction.Commit(); | 225 | transaction.Commit(); |
226 | } | 226 | } |
227 | } | 227 | } |
228 | } | 228 | } |
229 | 229 | ||
230 | override public UserAgentData GetAgentByUUID(LLUUID uuid) | 230 | override public UserAgentData GetAgentByUUID(LLUUID uuid) |
@@ -262,7 +262,7 @@ namespace OpenSim.Data.NHibernate | |||
262 | { | 262 | { |
263 | return GetUserByName(fname, lname).CurrentAgent; | 263 | return GetUserByName(fname, lname).CurrentAgent; |
264 | } | 264 | } |
265 | 265 | ||
266 | override public UserAgentData GetAgentByName(string name) | 266 | override public UserAgentData GetAgentByName(string name) |
267 | { | 267 | { |
268 | return GetAgentByName(name.Split(' ')[0], name.Split(' ')[1]); | 268 | return GetAgentByName(name.Split(' ')[0], name.Split(' ')[1]); |
@@ -273,7 +273,7 @@ namespace OpenSim.Data.NHibernate | |||
273 | List<AvatarPickerAvatar> results = new List<AvatarPickerAvatar>(); | 273 | List<AvatarPickerAvatar> results = new List<AvatarPickerAvatar>(); |
274 | string[] querysplit; | 274 | string[] querysplit; |
275 | querysplit = query.Split(' '); | 275 | querysplit = query.Split(' '); |
276 | 276 | ||
277 | if (querysplit.Length == 2) | 277 | if (querysplit.Length == 2) |
278 | { | 278 | { |
279 | using (ISession session = factory.OpenSession()) | 279 | using (ISession session = factory.OpenSession()) |
@@ -293,7 +293,7 @@ namespace OpenSim.Data.NHibernate | |||
293 | } | 293 | } |
294 | return results; | 294 | return results; |
295 | } | 295 | } |
296 | 296 | ||
297 | // TODO: actually implement these | 297 | // TODO: actually implement these |
298 | public override void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid) {return;} | 298 | public override void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid) {return;} |
299 | public override void StoreWebLoginKey(LLUUID agentID, LLUUID webLoginKey) {return;} | 299 | public override void StoreWebLoginKey(LLUUID agentID, LLUUID webLoginKey) {return;} |
@@ -306,7 +306,7 @@ namespace OpenSim.Data.NHibernate | |||
306 | 306 | ||
307 | /// Appearance | 307 | /// Appearance |
308 | /// TODO: stubs for now to get us to a compiling state gently | 308 | /// TODO: stubs for now to get us to a compiling state gently |
309 | public AvatarAppearance GetUserAppearance(LLUUID user) | 309 | public AvatarAppearance GetUserAppearance(LLUUID user) |
310 | { | 310 | { |
311 | AvatarAppearance appearance; | 311 | AvatarAppearance appearance; |
312 | // TODO: I'm sure I'll have to do something silly here | 312 | // TODO: I'm sure I'll have to do something silly here |
@@ -345,19 +345,19 @@ namespace OpenSim.Data.NHibernate | |||
345 | } | 345 | } |
346 | transaction.Commit(); | 346 | transaction.Commit(); |
347 | } | 347 | } |
348 | } | 348 | } |
349 | } | 349 | } |
350 | 350 | ||
351 | override public void AddAttachment(LLUUID user, LLUUID item) | 351 | override public void AddAttachment(LLUUID user, LLUUID item) |
352 | { | 352 | { |
353 | return; | 353 | return; |
354 | } | 354 | } |
355 | 355 | ||
356 | override public void RemoveAttachment(LLUUID user, LLUUID item) | 356 | override public void RemoveAttachment(LLUUID user, LLUUID item) |
357 | { | 357 | { |
358 | return; | 358 | return; |
359 | } | 359 | } |
360 | 360 | ||
361 | override public List<LLUUID> GetAttachments(LLUUID user) | 361 | override public List<LLUUID> GetAttachments(LLUUID user) |
362 | { | 362 | { |
363 | return new List<LLUUID>(); | 363 | return new List<LLUUID>(); |
diff --git a/OpenSim/Data/Null/NullDataStore.cs b/OpenSim/Data/Null/NullDataStore.cs index 096171c..487f72e 100644 --- a/OpenSim/Data/Null/NullDataStore.cs +++ b/OpenSim/Data/Null/NullDataStore.cs | |||
@@ -47,11 +47,11 @@ namespace OpenSim.Data.Null | |||
47 | public void RemoveObject(LLUUID obj, LLUUID regionUUID) | 47 | public void RemoveObject(LLUUID obj, LLUUID regionUUID) |
48 | { | 48 | { |
49 | } | 49 | } |
50 | 50 | ||
51 | // see IRegionDatastore | 51 | // see IRegionDatastore |
52 | public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items) | 52 | public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items) |
53 | { | 53 | { |
54 | } | 54 | } |
55 | 55 | ||
56 | public List<SceneObjectGroup> LoadObjects(LLUUID regionUUID) | 56 | public List<SceneObjectGroup> LoadObjects(LLUUID regionUUID) |
57 | { | 57 | { |
diff --git a/OpenSim/Data/Null/Properties/AssemblyInfo.cs b/OpenSim/Data/Null/Properties/AssemblyInfo.cs index 5db915c..135a64d 100644 --- a/OpenSim/Data/Null/Properties/AssemblyInfo.cs +++ b/OpenSim/Data/Null/Properties/AssemblyInfo.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | 30 | ||
31 | // General Information about an assembly is controlled through the following | 31 | // General information about an assembly is controlled through the following |
32 | // set of attributes. Change these attribute values to modify the information | 32 | // set of attributes. Change these attribute values to modify the information |
33 | // associated with an assembly. | 33 | // associated with an assembly. |
34 | 34 | ||
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices; | |||
41 | [assembly : AssemblyTrademark("")] | 41 | [assembly : AssemblyTrademark("")] |
42 | [assembly : AssemblyCulture("")] | 42 | [assembly : AssemblyCulture("")] |
43 | 43 | ||
44 | // Setting ComVisible to false makes the types in this assembly not visible | 44 | // Setting ComVisible to false makes the types in this assembly not visible |
45 | // to COM components. If you need to access a type in this assembly from | 45 | // to COM components. If you need to access a type in this assembly from |
46 | // COM, set the ComVisible attribute to true on that type. | 46 | // COM, set the ComVisible attribute to true on that type. |
47 | 47 | ||
48 | [assembly : ComVisible(false)] | 48 | [assembly : ComVisible(false)] |
@@ -54,11 +54,11 @@ using System.Runtime.InteropServices; | |||
54 | // Version information for an assembly consists of the following four values: | 54 | // Version information for an assembly consists of the following four values: |
55 | // | 55 | // |
56 | // Major Version | 56 | // Major Version |
57 | // Minor Version | 57 | // Minor Version |
58 | // Build Number | 58 | // Build Number |
59 | // Revision | 59 | // Revision |
60 | // | 60 | // |
61 | // You can specify all the values or you can default the Revision and Build Numbers | 61 | // You can specify all the values or you can default the Revision and Build Numbers |
62 | // by using the '*' as shown below: | 62 | // by using the '*' as shown below: |
63 | 63 | ||
64 | [assembly : AssemblyVersion("1.0.0.0")] | 64 | [assembly : AssemblyVersion("1.0.0.0")] |
diff --git a/OpenSim/Data/OpenSimObjectFieldMapper.cs b/OpenSim/Data/OpenSimObjectFieldMapper.cs index d67881b..ff375fb 100644 --- a/OpenSim/Data/OpenSimObjectFieldMapper.cs +++ b/OpenSim/Data/OpenSimObjectFieldMapper.cs | |||
@@ -95,6 +95,6 @@ namespace OpenSim.Data | |||
95 | } | 95 | } |
96 | 96 | ||
97 | return value; | 97 | return value; |
98 | } | 98 | } |
99 | } | 99 | } |
100 | } | 100 | } |
diff --git a/OpenSim/Data/PrimitiveBaseShapeTableMapper.cs b/OpenSim/Data/PrimitiveBaseShapeTableMapper.cs index cb3d33d..a4e39a1 100644 --- a/OpenSim/Data/PrimitiveBaseShapeTableMapper.cs +++ b/OpenSim/Data/PrimitiveBaseShapeTableMapper.cs | |||
@@ -135,7 +135,7 @@ namespace OpenSim.Data | |||
135 | 135 | ||
136 | rowMapperSchema.AddMapping<byte[]>("ExtraParams", | 136 | rowMapperSchema.AddMapping<byte[]>("ExtraParams", |
137 | delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.ExtraParams; }, | 137 | delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.ExtraParams; }, |
138 | delegate(PrimitiveBaseShapeRowMapper shape, byte[] value) { shape.Object.ExtraParams = value; }); | 138 | delegate(PrimitiveBaseShapeRowMapper shape, byte[] value) { shape.Object.ExtraParams = value; }); |
139 | } | 139 | } |
140 | 140 | ||
141 | public override PrimitiveBaseShapeRowMapper FromReader(BaseDataReader reader) | 141 | public override PrimitiveBaseShapeRowMapper FromReader(BaseDataReader reader) |
diff --git a/OpenSim/Data/Properties/AssemblyInfo.cs b/OpenSim/Data/Properties/AssemblyInfo.cs index 357aaa0..03985c3 100644 --- a/OpenSim/Data/Properties/AssemblyInfo.cs +++ b/OpenSim/Data/Properties/AssemblyInfo.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | 30 | ||
31 | // General Information about an assembly is controlled through the following | 31 | // General information about an assembly is controlled through the following |
32 | // set of attributes. Change these attribute values to modify the information | 32 | // set of attributes. Change these attribute values to modify the information |
33 | // associated with an assembly. | 33 | // associated with an assembly. |
34 | 34 | ||
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices; | |||
41 | [assembly : AssemblyTrademark("")] | 41 | [assembly : AssemblyTrademark("")] |
42 | [assembly : AssemblyCulture("")] | 42 | [assembly : AssemblyCulture("")] |
43 | 43 | ||
44 | // Setting ComVisible to false makes the types in this assembly not visible | 44 | // Setting ComVisible to false makes the types in this assembly not visible |
45 | // to COM components. If you need to access a type in this assembly from | 45 | // to COM components. If you need to access a type in this assembly from |
46 | // COM, set the ComVisible attribute to true on that type. | 46 | // COM, set the ComVisible attribute to true on that type. |
47 | 47 | ||
48 | [assembly : ComVisible(false)] | 48 | [assembly : ComVisible(false)] |
@@ -54,11 +54,11 @@ using System.Runtime.InteropServices; | |||
54 | // Version information for an assembly consists of the following four values: | 54 | // Version information for an assembly consists of the following four values: |
55 | // | 55 | // |
56 | // Major Version | 56 | // Major Version |
57 | // Minor Version | 57 | // Minor Version |
58 | // Build Number | 58 | // Build Number |
59 | // Revision | 59 | // Revision |
60 | // | 60 | // |
61 | // You can specify all the values or you can default the Revision and Build Numbers | 61 | // You can specify all the values or you can default the Revision and Build Numbers |
62 | // by using the '*' as shown below: | 62 | // by using the '*' as shown below: |
63 | 63 | ||
64 | [assembly : AssemblyVersion("1.0.0.0")] | 64 | [assembly : AssemblyVersion("1.0.0.0")] |
diff --git a/OpenSim/Data/RegionProfileData.cs b/OpenSim/Data/RegionProfileData.cs index 000a500..897dcbf 100644 --- a/OpenSim/Data/RegionProfileData.cs +++ b/OpenSim/Data/RegionProfileData.cs | |||
@@ -120,7 +120,7 @@ namespace OpenSim.Data | |||
120 | public LLUUID regionMapTextureID = new LLUUID("00000000-0000-1111-9999-000000000006"); | 120 | public LLUUID regionMapTextureID = new LLUUID("00000000-0000-1111-9999-000000000006"); |
121 | 121 | ||
122 | /// <summary> | 122 | /// <summary> |
123 | /// this particular mod to the file provides support within the spec for RegionProfileData for the | 123 | /// this particular mod to the file provides support within the spec for RegionProfileData for the |
124 | /// owner_uuid for the region | 124 | /// owner_uuid for the region |
125 | /// </summary> | 125 | /// </summary> |
126 | public LLUUID owner_uuid = LLUUID.Zero; | 126 | public LLUUID owner_uuid = LLUUID.Zero; |
@@ -128,7 +128,7 @@ namespace OpenSim.Data | |||
128 | /// <summary> | 128 | /// <summary> |
129 | /// OGS/OpenSim Specific original ID for a region after move/split | 129 | /// OGS/OpenSim Specific original ID for a region after move/split |
130 | /// </summary> | 130 | /// </summary> |
131 | public LLUUID originUUID; | 131 | public LLUUID originUUID; |
132 | 132 | ||
133 | /// <summary> | 133 | /// <summary> |
134 | /// Get Sim profile data from grid server when in grid mode | 134 | /// Get Sim profile data from grid server when in grid mode |
@@ -163,7 +163,7 @@ namespace OpenSim.Data | |||
163 | simData.serverPort = Convert.ToUInt32((string) responseData["sim_port"]); | 163 | simData.serverPort = Convert.ToUInt32((string) responseData["sim_port"]); |
164 | simData.httpPort = Convert.ToUInt32((string) responseData["http_port"]); | 164 | simData.httpPort = Convert.ToUInt32((string) responseData["http_port"]); |
165 | simData.remotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); | 165 | simData.remotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); |
166 | simData.serverURI = (string)responseData["server_uri"]; | 166 | simData.serverURI = (string)responseData["server_uri"]; |
167 | simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/"; | 167 | simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/"; |
168 | simData.UUID = new LLUUID((string) responseData["region_UUID"]); | 168 | simData.UUID = new LLUUID((string) responseData["region_UUID"]); |
169 | simData.regionName = (string) responseData["region_name"]; | 169 | simData.regionName = (string) responseData["region_name"]; |
@@ -206,7 +206,7 @@ namespace OpenSim.Data | |||
206 | simData.httpPort = Convert.ToUInt32((string) responseData["http_port"]); | 206 | simData.httpPort = Convert.ToUInt32((string) responseData["http_port"]); |
207 | simData.remotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); | 207 | simData.remotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); |
208 | simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/"; | 208 | simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/"; |
209 | simData.serverURI = (string)responseData["server_uri"]; | 209 | simData.serverURI = (string)responseData["server_uri"]; |
210 | simData.UUID = new LLUUID((string) responseData["region_UUID"]); | 210 | simData.UUID = new LLUUID((string) responseData["region_UUID"]); |
211 | simData.regionName = (string) responseData["region_name"]; | 211 | simData.regionName = (string) responseData["region_name"]; |
212 | 212 | ||
diff --git a/OpenSim/Data/SQLite/Properties/AssemblyInfo.cs b/OpenSim/Data/SQLite/Properties/AssemblyInfo.cs index 4616cbc..221495e 100644 --- a/OpenSim/Data/SQLite/Properties/AssemblyInfo.cs +++ b/OpenSim/Data/SQLite/Properties/AssemblyInfo.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | 30 | ||
31 | // General Information about an assembly is controlled through the following | 31 | // General information about an assembly is controlled through the following |
32 | // set of attributes. Change these attribute values to modify the information | 32 | // set of attributes. Change these attribute values to modify the information |
33 | // associated with an assembly. | 33 | // associated with an assembly. |
34 | 34 | ||
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices; | |||
41 | [assembly : AssemblyTrademark("")] | 41 | [assembly : AssemblyTrademark("")] |
42 | [assembly : AssemblyCulture("")] | 42 | [assembly : AssemblyCulture("")] |
43 | 43 | ||
44 | // Setting ComVisible to false makes the types in this assembly not visible | 44 | // Setting ComVisible to false makes the types in this assembly not visible |
45 | // to COM components. If you need to access a type in this assembly from | 45 | // to COM components. If you need to access a type in this assembly from |
46 | // COM, set the ComVisible attribute to true on that type. | 46 | // COM, set the ComVisible attribute to true on that type. |
47 | 47 | ||
48 | [assembly : ComVisible(false)] | 48 | [assembly : ComVisible(false)] |
@@ -54,11 +54,11 @@ using System.Runtime.InteropServices; | |||
54 | // Version information for an assembly consists of the following four values: | 54 | // Version information for an assembly consists of the following four values: |
55 | // | 55 | // |
56 | // Major Version | 56 | // Major Version |
57 | // Minor Version | 57 | // Minor Version |
58 | // Build Number | 58 | // Build Number |
59 | // Revision | 59 | // Revision |
60 | // | 60 | // |
61 | // You can specify all the values or you can default the Revision and Build Numbers | 61 | // You can specify all the values or you can default the Revision and Build Numbers |
62 | // by using the '*' as shown below: | 62 | // by using the '*' as shown below: |
63 | 63 | ||
64 | [assembly : AssemblyVersion("1.0.0.0")] | 64 | [assembly : AssemblyVersion("1.0.0.0")] |
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs index 34329bb..8d4fb99 100644 --- a/OpenSim/Data/SQLite/SQLiteAssetData.cs +++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs | |||
@@ -51,7 +51,7 @@ namespace OpenSim.Data.SQLite | |||
51 | private const string SelectAssetSQL = "select * from assets where UUID=:UUID"; | 51 | private const string SelectAssetSQL = "select * from assets where UUID=:UUID"; |
52 | private const string DeleteAssetSQL = "delete from assets where UUID=:UUID"; | 52 | private const string DeleteAssetSQL = "delete from assets where UUID=:UUID"; |
53 | private const string InsertAssetSQL = "insert into assets(UUID, Name, Description, Type, InvType, Local, Temporary, Data) values(:UUID, :Name, :Description, :Type, :InvType, :Local, :Temporary, :Data)"; | 53 | private const string InsertAssetSQL = "insert into assets(UUID, Name, Description, Type, InvType, Local, Temporary, Data) values(:UUID, :Name, :Description, :Type, :InvType, :Local, :Temporary, :Data)"; |
54 | private const string UpdateAssetSQL = "update assets set Name=:Name, Description=:Description, Type=:Type, InvType=:InvType, Local=:Local, Temporary=:Temporary, Data=:Data where UUID=:UUID"; | 54 | private const string UpdateAssetSQL = "update assets set Name=:Name, Description=:Description, Type=:Type, InvType=:InvType, Local=:Local, Temporary=:Temporary, Data=:Data where UUID=:UUID"; |
55 | private const string assetSelect = "select * from assets"; | 55 | private const string assetSelect = "select * from assets"; |
56 | 56 | ||
57 | private SqliteConnection m_conn; | 57 | private SqliteConnection m_conn; |
@@ -70,11 +70,11 @@ namespace OpenSim.Data.SQLite | |||
70 | 70 | ||
71 | override public AssetBase FetchAsset(LLUUID uuid) | 71 | override public AssetBase FetchAsset(LLUUID uuid) |
72 | { | 72 | { |
73 | 73 | ||
74 | using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn)) | 74 | using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn)) |
75 | { | 75 | { |
76 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid))); | 76 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid))); |
77 | using (IDataReader reader = cmd.ExecuteReader()) | 77 | using (IDataReader reader = cmd.ExecuteReader()) |
78 | { | 78 | { |
79 | if (reader.Read()) | 79 | if (reader.Read()) |
80 | { | 80 | { |
@@ -98,7 +98,7 @@ namespace OpenSim.Data.SQLite | |||
98 | { | 98 | { |
99 | m_log.Info("[ASSET DB]: Asset exists already, ignoring."); | 99 | m_log.Info("[ASSET DB]: Asset exists already, ignoring."); |
100 | } | 100 | } |
101 | else | 101 | else |
102 | { | 102 | { |
103 | using (SqliteCommand cmd = new SqliteCommand(InsertAssetSQL, m_conn)) | 103 | using (SqliteCommand cmd = new SqliteCommand(InsertAssetSQL, m_conn)) |
104 | { | 104 | { |
@@ -110,7 +110,7 @@ namespace OpenSim.Data.SQLite | |||
110 | cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local)); | 110 | cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local)); |
111 | cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary)); | 111 | cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary)); |
112 | cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data)); | 112 | cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data)); |
113 | 113 | ||
114 | cmd.ExecuteNonQuery(); | 114 | cmd.ExecuteNonQuery(); |
115 | } | 115 | } |
116 | } | 116 | } |
@@ -119,7 +119,7 @@ namespace OpenSim.Data.SQLite | |||
119 | override public void UpdateAsset(AssetBase asset) | 119 | override public void UpdateAsset(AssetBase asset) |
120 | { | 120 | { |
121 | LogAssetLoad(asset); | 121 | LogAssetLoad(asset); |
122 | 122 | ||
123 | using (SqliteCommand cmd = new SqliteCommand(UpdateAssetSQL, m_conn)) | 123 | using (SqliteCommand cmd = new SqliteCommand(UpdateAssetSQL, m_conn)) |
124 | { | 124 | { |
125 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.FullID))); | 125 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.FullID))); |
@@ -130,7 +130,7 @@ namespace OpenSim.Data.SQLite | |||
130 | cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local)); | 130 | cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local)); |
131 | cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary)); | 131 | cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary)); |
132 | cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data)); | 132 | cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data)); |
133 | 133 | ||
134 | cmd.ExecuteNonQuery(); | 134 | cmd.ExecuteNonQuery(); |
135 | } | 135 | } |
136 | 136 | ||
@@ -154,14 +154,14 @@ namespace OpenSim.Data.SQLite | |||
154 | using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn)) | 154 | using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn)) |
155 | { | 155 | { |
156 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid))); | 156 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid))); |
157 | using (IDataReader reader = cmd.ExecuteReader()) | 157 | using (IDataReader reader = cmd.ExecuteReader()) |
158 | { | 158 | { |
159 | if (reader.Read()) | 159 | if (reader.Read()) |
160 | { | 160 | { |
161 | reader.Close(); | 161 | reader.Close(); |
162 | return true; | 162 | return true; |
163 | } | 163 | } |
164 | else | 164 | else |
165 | { | 165 | { |
166 | reader.Close(); | 166 | reader.Close(); |
167 | return false; | 167 | return false; |
@@ -175,7 +175,7 @@ namespace OpenSim.Data.SQLite | |||
175 | using (SqliteCommand cmd = new SqliteCommand(DeleteAssetSQL, m_conn)) | 175 | using (SqliteCommand cmd = new SqliteCommand(DeleteAssetSQL, m_conn)) |
176 | { | 176 | { |
177 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid))); | 177 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid))); |
178 | 178 | ||
179 | cmd.ExecuteNonQuery(); | 179 | cmd.ExecuteNonQuery(); |
180 | } | 180 | } |
181 | } | 181 | } |
@@ -193,7 +193,7 @@ namespace OpenSim.Data.SQLite | |||
193 | /*********************************************************************** | 193 | /*********************************************************************** |
194 | * | 194 | * |
195 | * Database Definition Functions | 195 | * Database Definition Functions |
196 | * | 196 | * |
197 | * This should be db agnostic as we define them in ADO.NET terms | 197 | * This should be db agnostic as we define them in ADO.NET terms |
198 | * | 198 | * |
199 | **********************************************************************/ | 199 | **********************************************************************/ |
@@ -216,7 +216,7 @@ namespace OpenSim.Data.SQLite | |||
216 | } | 216 | } |
217 | 217 | ||
218 | /*********************************************************************** | 218 | /*********************************************************************** |
219 | * | 219 | * |
220 | * Convert between ADO.NET <=> OpenSim Objects | 220 | * Convert between ADO.NET <=> OpenSim Objects |
221 | * | 221 | * |
222 | * These should be database independant | 222 | * These should be database independant |
diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs index 1ab971c..5acc5f2 100644 --- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs +++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs | |||
@@ -106,22 +106,22 @@ namespace OpenSim.Data.SQLite | |||
106 | // new fields | 106 | // new fields |
107 | if (!Convert.IsDBNull(row["salePrice"])) | 107 | if (!Convert.IsDBNull(row["salePrice"])) |
108 | item.SalePrice = Convert.ToInt32(row["salePrice"]); | 108 | item.SalePrice = Convert.ToInt32(row["salePrice"]); |
109 | 109 | ||
110 | if (!Convert.IsDBNull(row["saleType"])) | 110 | if (!Convert.IsDBNull(row["saleType"])) |
111 | item.SaleType = Convert.ToByte(row["saleType"]); | 111 | item.SaleType = Convert.ToByte(row["saleType"]); |
112 | 112 | ||
113 | if (!Convert.IsDBNull(row["creationDate"])) | 113 | if (!Convert.IsDBNull(row["creationDate"])) |
114 | item.CreationDate = Convert.ToInt32(row["creationDate"]); | 114 | item.CreationDate = Convert.ToInt32(row["creationDate"]); |
115 | 115 | ||
116 | if (!Convert.IsDBNull(row["groupID"])) | 116 | if (!Convert.IsDBNull(row["groupID"])) |
117 | item.GroupID = new LLUUID((string)row["groupID"]); | 117 | item.GroupID = new LLUUID((string)row["groupID"]); |
118 | 118 | ||
119 | if (!Convert.IsDBNull(row["groupOwned"])) | 119 | if (!Convert.IsDBNull(row["groupOwned"])) |
120 | item.GroupOwned = Convert.ToBoolean(row["groupOwned"]); | 120 | item.GroupOwned = Convert.ToBoolean(row["groupOwned"]); |
121 | 121 | ||
122 | if (!Convert.IsDBNull(row["Flags"])) | 122 | if (!Convert.IsDBNull(row["Flags"])) |
123 | item.Flags = Convert.ToUInt32(row["Flags"]); | 123 | item.Flags = Convert.ToUInt32(row["Flags"]); |
124 | 124 | ||
125 | return item; | 125 | return item; |
126 | } | 126 | } |
127 | 127 | ||
@@ -221,7 +221,7 @@ namespace OpenSim.Data.SQLite | |||
221 | { | 221 | { |
222 | if (add) | 222 | if (add) |
223 | m_log.ErrorFormat("[INVENTORY DB]: Interface Misuse: Attempting to Add inventory item that already exists: {0}", item.ID); | 223 | m_log.ErrorFormat("[INVENTORY DB]: Interface Misuse: Attempting to Add inventory item that already exists: {0}", item.ID); |
224 | 224 | ||
225 | fillItemRow(inventoryRow, item); | 225 | fillItemRow(inventoryRow, item); |
226 | } | 226 | } |
227 | invItemsDa.Update(ds, "inventoryitems"); | 227 | invItemsDa.Update(ds, "inventoryitems"); |
@@ -314,9 +314,9 @@ namespace OpenSim.Data.SQLite | |||
314 | 314 | ||
315 | // There should only ever be one root folder for a user. However, if there's more | 315 | // There should only ever be one root folder for a user. However, if there's more |
316 | // than one we'll simply use the first one rather than failing. It would be even | 316 | // than one we'll simply use the first one rather than failing. It would be even |
317 | // nicer to print some message to this effect, but this feels like it's too low a | 317 | // nicer to print some message to this effect, but this feels like it's too low a |
318 | // to put such a message out, and it's too minor right now to spare the time to | 318 | // to put such a message out, and it's too minor right now to spare the time to |
319 | // suitably refactor. | 319 | // suitably refactor. |
320 | if (folders.Count > 0) | 320 | if (folders.Count > 0) |
321 | { | 321 | { |
322 | return folders[0]; | 322 | return folders[0]; |
@@ -327,7 +327,7 @@ namespace OpenSim.Data.SQLite | |||
327 | } | 327 | } |
328 | 328 | ||
329 | /// <summary> | 329 | /// <summary> |
330 | /// Append a list of all the child folders of a parent folder | 330 | /// Append a list of all the child folders of a parent folder |
331 | /// </summary> | 331 | /// </summary> |
332 | /// <param name="folders">list where folders will be appended</param> | 332 | /// <param name="folders">list where folders will be appended</param> |
333 | /// <param name="parentID">ID of parent</param> | 333 | /// <param name="parentID">ID of parent</param> |
@@ -435,7 +435,7 @@ namespace OpenSim.Data.SQLite | |||
435 | } | 435 | } |
436 | 436 | ||
437 | /// <summary> | 437 | /// <summary> |
438 | /// | 438 | /// |
439 | /// </summary> | 439 | /// </summary> |
440 | /// <param name="item"></param> | 440 | /// <param name="item"></param> |
441 | public void deleteInventoryItem(LLUUID itemID) | 441 | public void deleteInventoryItem(LLUUID itemID) |
@@ -664,7 +664,7 @@ namespace OpenSim.Data.SQLite | |||
664 | { | 664 | { |
665 | string createInventoryItems = defineTable(createInventoryItemsTable()); | 665 | string createInventoryItems = defineTable(createInventoryItemsTable()); |
666 | string createInventoryFolders = defineTable(createInventoryFoldersTable()); | 666 | string createInventoryFolders = defineTable(createInventoryFoldersTable()); |
667 | 667 | ||
668 | SqliteCommand pcmd = new SqliteCommand(createInventoryItems, conn); | 668 | SqliteCommand pcmd = new SqliteCommand(createInventoryItems, conn); |
669 | SqliteCommand scmd = new SqliteCommand(createInventoryFolders, conn); | 669 | SqliteCommand scmd = new SqliteCommand(createInventoryFolders, conn); |
670 | 670 | ||
@@ -697,7 +697,7 @@ namespace OpenSim.Data.SQLite | |||
697 | // Very clumsy way of checking whether we need to upgrade the database table version and then updating. Only | 697 | // Very clumsy way of checking whether we need to upgrade the database table version and then updating. Only |
698 | // putting up with this because this code should be blown away soon by nhibernate... | 698 | // putting up with this because this code should be blown away soon by nhibernate... |
699 | conn.Open(); | 699 | conn.Open(); |
700 | 700 | ||
701 | SqliteCommand cmd; | 701 | SqliteCommand cmd; |
702 | try | 702 | try |
703 | { | 703 | { |
@@ -707,7 +707,7 @@ namespace OpenSim.Data.SQLite | |||
707 | catch (SqliteSyntaxException) | 707 | catch (SqliteSyntaxException) |
708 | { | 708 | { |
709 | m_log.Info("[INVENTORY DB]: Upgrading sqlite inventory database to version 2"); | 709 | m_log.Info("[INVENTORY DB]: Upgrading sqlite inventory database to version 2"); |
710 | 710 | ||
711 | cmd = new SqliteCommand("alter table inventoryitems add column salePrice integer default 99;", conn); | 711 | cmd = new SqliteCommand("alter table inventoryitems add column salePrice integer default 99;", conn); |
712 | cmd.ExecuteNonQuery(); | 712 | cmd.ExecuteNonQuery(); |
713 | cmd = new SqliteCommand("alter table inventoryitems add column saleType integer default 0;", conn); | 713 | cmd = new SqliteCommand("alter table inventoryitems add column saleType integer default 0;", conn); |
@@ -719,15 +719,15 @@ namespace OpenSim.Data.SQLite | |||
719 | cmd = new SqliteCommand("alter table inventoryitems add column groupOwned integer default 0;", conn); | 719 | cmd = new SqliteCommand("alter table inventoryitems add column groupOwned integer default 0;", conn); |
720 | cmd.ExecuteNonQuery(); | 720 | cmd.ExecuteNonQuery(); |
721 | cmd = new SqliteCommand("alter table inventoryitems add column flags integer default 0;", conn); | 721 | cmd = new SqliteCommand("alter table inventoryitems add column flags integer default 0;", conn); |
722 | cmd.ExecuteNonQuery(); | 722 | cmd.ExecuteNonQuery(); |
723 | 723 | ||
724 | pDa.Fill(tmpDS, "inventoryitems"); | 724 | pDa.Fill(tmpDS, "inventoryitems"); |
725 | } | 725 | } |
726 | finally | 726 | finally |
727 | { | 727 | { |
728 | conn.Close(); | 728 | conn.Close(); |
729 | } | 729 | } |
730 | 730 | ||
731 | foreach (DataColumn col in createInventoryItemsTable().Columns) | 731 | foreach (DataColumn col in createInventoryItemsTable().Columns) |
732 | { | 732 | { |
733 | if (! tmpDS.Tables["inventoryitems"].Columns.Contains(col.ColumnName)) | 733 | if (! tmpDS.Tables["inventoryitems"].Columns.Contains(col.ColumnName)) |
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs index 1b577db..6a16a88 100644 --- a/OpenSim/Data/SQLite/SQLiteRegionData.cs +++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs | |||
@@ -90,11 +90,11 @@ namespace OpenSim.Data.SQLite | |||
90 | 90 | ||
91 | SqliteCommand shapeSelectCmd = new SqliteCommand(shapeSelect, m_conn); | 91 | SqliteCommand shapeSelectCmd = new SqliteCommand(shapeSelect, m_conn); |
92 | shapeDa = new SqliteDataAdapter(shapeSelectCmd); | 92 | shapeDa = new SqliteDataAdapter(shapeSelectCmd); |
93 | // SqliteCommandBuilder shapeCb = new SqliteCommandBuilder(shapeDa); | 93 | // SqliteCommandBuilder shapeCb = new SqliteCommandBuilder(shapeDa); |
94 | 94 | ||
95 | SqliteCommand itemsSelectCmd = new SqliteCommand(itemsSelect, m_conn); | 95 | SqliteCommand itemsSelectCmd = new SqliteCommand(itemsSelect, m_conn); |
96 | itemsDa = new SqliteDataAdapter(itemsSelectCmd); | 96 | itemsDa = new SqliteDataAdapter(itemsSelectCmd); |
97 | 97 | ||
98 | SqliteCommand terrainSelectCmd = new SqliteCommand(terrainSelect, m_conn); | 98 | SqliteCommand terrainSelectCmd = new SqliteCommand(terrainSelect, m_conn); |
99 | terrainDa = new SqliteDataAdapter(terrainSelectCmd); | 99 | terrainDa = new SqliteDataAdapter(terrainSelectCmd); |
100 | 100 | ||
@@ -117,7 +117,7 @@ namespace OpenSim.Data.SQLite | |||
117 | 117 | ||
118 | ds.Tables.Add(createShapeTable()); | 118 | ds.Tables.Add(createShapeTable()); |
119 | setupShapeCommands(shapeDa, m_conn); | 119 | setupShapeCommands(shapeDa, m_conn); |
120 | 120 | ||
121 | if (persistPrimInventories) | 121 | if (persistPrimInventories) |
122 | { | 122 | { |
123 | ds.Tables.Add(createItemsTable()); | 123 | ds.Tables.Add(createItemsTable()); |
@@ -183,8 +183,8 @@ namespace OpenSim.Data.SQLite | |||
183 | { | 183 | { |
184 | foreach (SceneObjectPart prim in obj.Children.Values) | 184 | foreach (SceneObjectPart prim in obj.Children.Values) |
185 | { | 185 | { |
186 | if ((prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) == 0 | 186 | if ((prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) == 0 |
187 | && (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Temporary) == 0 | 187 | && (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Temporary) == 0 |
188 | && (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) == 0) | 188 | && (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) == 0) |
189 | { | 189 | { |
190 | m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID); | 190 | m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID); |
@@ -210,7 +210,7 @@ namespace OpenSim.Data.SQLite | |||
210 | public void RemoveObject(LLUUID obj, LLUUID regionUUID) | 210 | public void RemoveObject(LLUUID obj, LLUUID regionUUID) |
211 | { | 211 | { |
212 | m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID); | 212 | m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID); |
213 | 213 | ||
214 | DataTable prims = ds.Tables["prims"]; | 214 | DataTable prims = ds.Tables["prims"]; |
215 | DataTable shapes = ds.Tables["primshapes"]; | 215 | DataTable shapes = ds.Tables["primshapes"]; |
216 | 216 | ||
@@ -234,7 +234,7 @@ namespace OpenSim.Data.SQLite | |||
234 | } | 234 | } |
235 | 235 | ||
236 | // Remove prim row | 236 | // Remove prim row |
237 | row.Delete(); | 237 | row.Delete(); |
238 | } | 238 | } |
239 | } | 239 | } |
240 | 240 | ||
@@ -247,11 +247,11 @@ namespace OpenSim.Data.SQLite | |||
247 | /// </summary> | 247 | /// </summary> |
248 | private void RemoveItems(LLUUID uuid) | 248 | private void RemoveItems(LLUUID uuid) |
249 | { | 249 | { |
250 | DataTable items = ds.Tables["primitems"]; | 250 | DataTable items = ds.Tables["primitems"]; |
251 | 251 | ||
252 | String sql = String.Format("primID = '{0}'", uuid); | 252 | String sql = String.Format("primID = '{0}'", uuid); |
253 | DataRow[] itemRows = items.Select(sql); | 253 | DataRow[] itemRows = items.Select(sql); |
254 | 254 | ||
255 | foreach (DataRow itemRow in itemRows) | 255 | foreach (DataRow itemRow in itemRows) |
256 | { | 256 | { |
257 | itemRow.Delete(); | 257 | itemRow.Delete(); |
@@ -286,7 +286,7 @@ namespace OpenSim.Data.SQLite | |||
286 | try | 286 | try |
287 | { | 287 | { |
288 | SceneObjectPart prim = null; | 288 | SceneObjectPart prim = null; |
289 | 289 | ||
290 | string uuid = (string) primRow["UUID"]; | 290 | string uuid = (string) primRow["UUID"]; |
291 | string objID = (string) primRow["SceneGroupID"]; | 291 | string objID = (string) primRow["SceneGroupID"]; |
292 | if (uuid == objID) //is new SceneObjectGroup ? | 292 | if (uuid == objID) //is new SceneObjectGroup ? |
@@ -353,25 +353,25 @@ namespace OpenSim.Data.SQLite | |||
353 | private void LoadItems(SceneObjectPart prim) | 353 | private void LoadItems(SceneObjectPart prim) |
354 | { | 354 | { |
355 | //m_log.DebugFormat("[DATASTORE]: Loading inventory for {0}, {1}", prim.Name, prim.UUID); | 355 | //m_log.DebugFormat("[DATASTORE]: Loading inventory for {0}, {1}", prim.Name, prim.UUID); |
356 | 356 | ||
357 | DataTable dbItems = ds.Tables["primitems"]; | 357 | DataTable dbItems = ds.Tables["primitems"]; |
358 | 358 | ||
359 | String sql = String.Format("primID = '{0}'", prim.UUID.ToString()); | 359 | String sql = String.Format("primID = '{0}'", prim.UUID.ToString()); |
360 | DataRow[] dbItemRows = dbItems.Select(sql); | 360 | DataRow[] dbItemRows = dbItems.Select(sql); |
361 | 361 | ||
362 | IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>(); | 362 | IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>(); |
363 | 363 | ||
364 | foreach (DataRow row in dbItemRows) | 364 | foreach (DataRow row in dbItemRows) |
365 | { | 365 | { |
366 | TaskInventoryItem item = buildItem(row); | 366 | TaskInventoryItem item = buildItem(row); |
367 | inventory.Add(item); | 367 | inventory.Add(item); |
368 | 368 | ||
369 | //m_log.DebugFormat("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID); | 369 | //m_log.DebugFormat("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID); |
370 | } | 370 | } |
371 | 371 | ||
372 | prim.RestoreInventoryItems(inventory); | 372 | prim.RestoreInventoryItems(inventory); |
373 | 373 | ||
374 | // XXX A nasty little hack to recover the folder id for the prim (which is currently stored in | 374 | // XXX A nasty little hack to recover the folder id for the prim (which is currently stored in |
375 | // every item). This data should really be stored in the prim table itself. | 375 | // every item). This data should really be stored in the prim table itself. |
376 | if (dbItemRows.Length > 0) | 376 | if (dbItemRows.Length > 0) |
377 | { | 377 | { |
@@ -548,12 +548,12 @@ namespace OpenSim.Data.SQLite | |||
548 | { | 548 | { |
549 | primDa.Update(ds, "prims"); | 549 | primDa.Update(ds, "prims"); |
550 | shapeDa.Update(ds, "primshapes"); | 550 | shapeDa.Update(ds, "primshapes"); |
551 | 551 | ||
552 | if (persistPrimInventories) | 552 | if (persistPrimInventories) |
553 | { | 553 | { |
554 | itemsDa.Update(ds, "primitems"); | 554 | itemsDa.Update(ds, "primitems"); |
555 | } | 555 | } |
556 | 556 | ||
557 | terrainDa.Update(ds, "terrain"); | 557 | terrainDa.Update(ds, "terrain"); |
558 | landDa.Update(ds, "land"); | 558 | landDa.Update(ds, "land"); |
559 | landAccessListDa.Update(ds, "landaccesslist"); | 559 | landAccessListDa.Update(ds, "landaccesslist"); |
@@ -569,7 +569,7 @@ namespace OpenSim.Data.SQLite | |||
569 | /*********************************************************************** | 569 | /*********************************************************************** |
570 | * | 570 | * |
571 | * Database Definition Functions | 571 | * Database Definition Functions |
572 | * | 572 | * |
573 | * This should be db agnostic as we define them in ADO.NET terms | 573 | * This should be db agnostic as we define them in ADO.NET terms |
574 | * | 574 | * |
575 | **********************************************************************/ | 575 | **********************************************************************/ |
@@ -705,8 +705,8 @@ namespace OpenSim.Data.SQLite | |||
705 | createCol(items, "primID", typeof (String)); | 705 | createCol(items, "primID", typeof (String)); |
706 | createCol(items, "assetID", typeof (String)); | 706 | createCol(items, "assetID", typeof (String)); |
707 | createCol(items, "parentFolderID", typeof (String)); | 707 | createCol(items, "parentFolderID", typeof (String)); |
708 | 708 | ||
709 | createCol(items, "invType", typeof (Int32)); | 709 | createCol(items, "invType", typeof (Int32)); |
710 | createCol(items, "assetType", typeof (Int32)); | 710 | createCol(items, "assetType", typeof (Int32)); |
711 | 711 | ||
712 | createCol(items, "name", typeof (String)); | 712 | createCol(items, "name", typeof (String)); |
@@ -784,7 +784,7 @@ namespace OpenSim.Data.SQLite | |||
784 | } | 784 | } |
785 | 785 | ||
786 | /*********************************************************************** | 786 | /*********************************************************************** |
787 | * | 787 | * |
788 | * Convert between ADO.NET <=> OpenSim Objects | 788 | * Convert between ADO.NET <=> OpenSim Objects |
789 | * | 789 | * |
790 | * These should be database independant | 790 | * These should be database independant |
@@ -897,7 +897,7 @@ namespace OpenSim.Data.SQLite | |||
897 | 897 | ||
898 | return prim; | 898 | return prim; |
899 | } | 899 | } |
900 | 900 | ||
901 | /// <summary> | 901 | /// <summary> |
902 | /// Build a prim inventory item from the persisted data. | 902 | /// Build a prim inventory item from the persisted data. |
903 | /// </summary> | 903 | /// </summary> |
@@ -906,15 +906,15 @@ namespace OpenSim.Data.SQLite | |||
906 | private static TaskInventoryItem buildItem(DataRow row) | 906 | private static TaskInventoryItem buildItem(DataRow row) |
907 | { | 907 | { |
908 | TaskInventoryItem taskItem = new TaskInventoryItem(); | 908 | TaskInventoryItem taskItem = new TaskInventoryItem(); |
909 | 909 | ||
910 | taskItem.ItemID = new LLUUID((String)row["itemID"]); | 910 | taskItem.ItemID = new LLUUID((String)row["itemID"]); |
911 | taskItem.ParentPartID = new LLUUID((String)row["primID"]); | 911 | taskItem.ParentPartID = new LLUUID((String)row["primID"]); |
912 | taskItem.AssetID = new LLUUID((String)row["assetID"]); | 912 | taskItem.AssetID = new LLUUID((String)row["assetID"]); |
913 | taskItem.ParentID = new LLUUID((String)row["parentFolderID"]); | 913 | taskItem.ParentID = new LLUUID((String)row["parentFolderID"]); |
914 | 914 | ||
915 | taskItem.InvType = Convert.ToInt32(row["invType"]); | 915 | taskItem.InvType = Convert.ToInt32(row["invType"]); |
916 | taskItem.Type = Convert.ToInt32(row["assetType"]); | 916 | taskItem.Type = Convert.ToInt32(row["assetType"]); |
917 | 917 | ||
918 | taskItem.Name = (String)row["name"]; | 918 | taskItem.Name = (String)row["name"]; |
919 | taskItem.Description = (String)row["description"]; | 919 | taskItem.Description = (String)row["description"]; |
920 | taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); | 920 | taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); |
@@ -922,13 +922,13 @@ namespace OpenSim.Data.SQLite | |||
922 | taskItem.OwnerID = new LLUUID((String)row["ownerID"]); | 922 | taskItem.OwnerID = new LLUUID((String)row["ownerID"]); |
923 | taskItem.LastOwnerID = new LLUUID((String)row["lastOwnerID"]); | 923 | taskItem.LastOwnerID = new LLUUID((String)row["lastOwnerID"]); |
924 | taskItem.GroupID = new LLUUID((String)row["groupID"]); | 924 | taskItem.GroupID = new LLUUID((String)row["groupID"]); |
925 | 925 | ||
926 | taskItem.NextOwnerMask = Convert.ToUInt32(row["nextPermissions"]); | 926 | taskItem.NextOwnerMask = Convert.ToUInt32(row["nextPermissions"]); |
927 | taskItem.OwnerMask = Convert.ToUInt32(row["currentPermissions"]); | 927 | taskItem.OwnerMask = Convert.ToUInt32(row["currentPermissions"]); |
928 | taskItem.BaseMask = Convert.ToUInt32(row["basePermissions"]); | 928 | taskItem.BaseMask = Convert.ToUInt32(row["basePermissions"]); |
929 | taskItem.EveryoneMask = Convert.ToUInt32(row["everyonePermissions"]); | 929 | taskItem.EveryoneMask = Convert.ToUInt32(row["everyonePermissions"]); |
930 | taskItem.GroupMask = Convert.ToUInt32(row["groupPermissions"]); | 930 | taskItem.GroupMask = Convert.ToUInt32(row["groupPermissions"]); |
931 | 931 | ||
932 | return taskItem; | 932 | return taskItem; |
933 | } | 933 | } |
934 | 934 | ||
@@ -990,14 +990,14 @@ namespace OpenSim.Data.SQLite | |||
990 | cmd.ExecuteNonQuery(); | 990 | cmd.ExecuteNonQuery(); |
991 | m_conn.Close(); | 991 | m_conn.Close(); |
992 | m_conn.Dispose(); | 992 | m_conn.Dispose(); |
993 | 993 | ||
994 | m_log.Error("[REGION DB]: The land table was recently updated. You need to restart the simulator. Exiting now."); | 994 | m_log.Error("[REGION DB]: The land table was recently updated. You need to restart the simulator. Exiting now."); |
995 | 995 | ||
996 | Thread.Sleep(10000); | 996 | Thread.Sleep(10000); |
997 | 997 | ||
998 | // ICK! but it's better then A thousand red SQLITE error messages! | 998 | // ICK! but it's better then A thousand red SQLITE error messages! |
999 | Environment.Exit(0); | 999 | Environment.Exit(0); |
1000 | 1000 | ||
1001 | } | 1001 | } |
1002 | catch (Exception) | 1002 | catch (Exception) |
1003 | { | 1003 | { |
@@ -1006,7 +1006,7 @@ namespace OpenSim.Data.SQLite | |||
1006 | Environment.Exit(0); | 1006 | Environment.Exit(0); |
1007 | } | 1007 | } |
1008 | } | 1008 | } |
1009 | 1009 | ||
1010 | return newData; | 1010 | return newData; |
1011 | } | 1011 | } |
1012 | 1012 | ||
@@ -1107,17 +1107,17 @@ namespace OpenSim.Data.SQLite | |||
1107 | row["SitTargetOrientY"] = sitTargetOrient.Y; | 1107 | row["SitTargetOrientY"] = sitTargetOrient.Y; |
1108 | row["SitTargetOrientZ"] = sitTargetOrient.Z; | 1108 | row["SitTargetOrientZ"] = sitTargetOrient.Z; |
1109 | } | 1109 | } |
1110 | 1110 | ||
1111 | private static void fillItemRow(DataRow row, TaskInventoryItem taskItem) | 1111 | private static void fillItemRow(DataRow row, TaskInventoryItem taskItem) |
1112 | { | 1112 | { |
1113 | row["itemID"] = taskItem.ItemID; | 1113 | row["itemID"] = taskItem.ItemID; |
1114 | row["primID"] = taskItem.ParentPartID; | 1114 | row["primID"] = taskItem.ParentPartID; |
1115 | row["assetID"] = taskItem.AssetID; | 1115 | row["assetID"] = taskItem.AssetID; |
1116 | row["parentFolderID"] = taskItem.ParentID; | 1116 | row["parentFolderID"] = taskItem.ParentID; |
1117 | 1117 | ||
1118 | row["invType"] = taskItem.InvType; | 1118 | row["invType"] = taskItem.InvType; |
1119 | row["assetType"] = taskItem.Type; | 1119 | row["assetType"] = taskItem.Type; |
1120 | 1120 | ||
1121 | row["name"] = taskItem.Name; | 1121 | row["name"] = taskItem.Name; |
1122 | row["description"] = taskItem.Description; | 1122 | row["description"] = taskItem.Description; |
1123 | row["creationDate"] = taskItem.CreationDate; | 1123 | row["creationDate"] = taskItem.CreationDate; |
@@ -1294,37 +1294,37 @@ namespace OpenSim.Data.SQLite | |||
1294 | fillShapeRow(shapeRow, prim); | 1294 | fillShapeRow(shapeRow, prim); |
1295 | } | 1295 | } |
1296 | } | 1296 | } |
1297 | 1297 | ||
1298 | // see IRegionDatastore | 1298 | // see IRegionDatastore |
1299 | public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items) | 1299 | public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items) |
1300 | { | 1300 | { |
1301 | if (!persistPrimInventories) | 1301 | if (!persistPrimInventories) |
1302 | return; | 1302 | return; |
1303 | 1303 | ||
1304 | m_log.InfoFormat("[REGION DB]: Entered StorePrimInventory with prim ID {0}", primID); | 1304 | m_log.InfoFormat("[REGION DB]: Entered StorePrimInventory with prim ID {0}", primID); |
1305 | 1305 | ||
1306 | DataTable dbItems = ds.Tables["primitems"]; | 1306 | DataTable dbItems = ds.Tables["primitems"]; |
1307 | 1307 | ||
1308 | // For now, we're just going to crudely remove all the previous inventory items | 1308 | // For now, we're just going to crudely remove all the previous inventory items |
1309 | // no matter whether they have changed or not, and replace them with the current set. | 1309 | // no matter whether they have changed or not, and replace them with the current set. |
1310 | lock (ds) | 1310 | lock (ds) |
1311 | { | 1311 | { |
1312 | RemoveItems(primID); | 1312 | RemoveItems(primID); |
1313 | 1313 | ||
1314 | // repalce with current inventory details | 1314 | // repalce with current inventory details |
1315 | foreach (TaskInventoryItem newItem in items) | 1315 | foreach (TaskInventoryItem newItem in items) |
1316 | { | 1316 | { |
1317 | // m_log.InfoFormat( | 1317 | // m_log.InfoFormat( |
1318 | // "[DATASTORE]: ", | 1318 | // "[DATASTORE]: ", |
1319 | // "Adding item {0}, {1} to prim ID {2}", | 1319 | // "Adding item {0}, {1} to prim ID {2}", |
1320 | // newItem.Name, newItem.ItemID, newItem.ParentPartID); | 1320 | // newItem.Name, newItem.ItemID, newItem.ParentPartID); |
1321 | 1321 | ||
1322 | DataRow newItemRow = dbItems.NewRow(); | 1322 | DataRow newItemRow = dbItems.NewRow(); |
1323 | fillItemRow(newItemRow, newItem); | 1323 | fillItemRow(newItemRow, newItem); |
1324 | dbItems.Rows.Add(newItemRow); | 1324 | dbItems.Rows.Add(newItemRow); |
1325 | } | 1325 | } |
1326 | } | 1326 | } |
1327 | 1327 | ||
1328 | Commit(); | 1328 | Commit(); |
1329 | } | 1329 | } |
1330 | 1330 | ||
@@ -1436,7 +1436,7 @@ namespace OpenSim.Data.SQLite | |||
1436 | /// This is a convenience function that collapses 5 repetitive | 1436 | /// This is a convenience function that collapses 5 repetitive |
1437 | /// lines for defining SqliteParameters to 2 parameters: | 1437 | /// lines for defining SqliteParameters to 2 parameters: |
1438 | /// column name and database type. | 1438 | /// column name and database type. |
1439 | /// | 1439 | /// |
1440 | /// It assumes certain conventions like :param as the param | 1440 | /// It assumes certain conventions like :param as the param |
1441 | /// name to replace in parametrized queries, and that source | 1441 | /// name to replace in parametrized queries, and that source |
1442 | /// version is always current version, both of which are fine | 1442 | /// version is always current version, both of which are fine |
@@ -1451,7 +1451,7 @@ namespace OpenSim.Data.SQLite | |||
1451 | param.SourceColumn = name; | 1451 | param.SourceColumn = name; |
1452 | param.SourceVersion = DataRowVersion.Current; | 1452 | param.SourceVersion = DataRowVersion.Current; |
1453 | return param; | 1453 | return param; |
1454 | } | 1454 | } |
1455 | 1455 | ||
1456 | private void setupPrimCommands(SqliteDataAdapter da, SqliteConnection conn) | 1456 | private void setupPrimCommands(SqliteDataAdapter da, SqliteConnection conn) |
1457 | { | 1457 | { |
@@ -1466,7 +1466,7 @@ namespace OpenSim.Data.SQLite | |||
1466 | delete.Connection = conn; | 1466 | delete.Connection = conn; |
1467 | da.DeleteCommand = delete; | 1467 | da.DeleteCommand = delete; |
1468 | } | 1468 | } |
1469 | 1469 | ||
1470 | private void setupItemsCommands(SqliteDataAdapter da, SqliteConnection conn) | 1470 | private void setupItemsCommands(SqliteDataAdapter da, SqliteConnection conn) |
1471 | { | 1471 | { |
1472 | da.InsertCommand = createInsertCommand("primitems", ds.Tables["primitems"]); | 1472 | da.InsertCommand = createInsertCommand("primitems", ds.Tables["primitems"]); |
@@ -1479,7 +1479,7 @@ namespace OpenSim.Data.SQLite | |||
1479 | delete.Parameters.Add(createSqliteParameter("itemID", typeof (String))); | 1479 | delete.Parameters.Add(createSqliteParameter("itemID", typeof (String))); |
1480 | delete.Connection = conn; | 1480 | delete.Connection = conn; |
1481 | da.DeleteCommand = delete; | 1481 | da.DeleteCommand = delete; |
1482 | } | 1482 | } |
1483 | 1483 | ||
1484 | private void setupTerrainCommands(SqliteDataAdapter da, SqliteConnection conn) | 1484 | private void setupTerrainCommands(SqliteDataAdapter da, SqliteConnection conn) |
1485 | { | 1485 | { |
@@ -1660,7 +1660,7 @@ namespace OpenSim.Data.SQLite | |||
1660 | return false; | 1660 | return false; |
1661 | } | 1661 | } |
1662 | } | 1662 | } |
1663 | 1663 | ||
1664 | // XXX primitems should probably go here eventually | 1664 | // XXX primitems should probably go here eventually |
1665 | 1665 | ||
1666 | foreach (DataColumn col in createTerrainTable().Columns) | 1666 | foreach (DataColumn col in createTerrainTable().Columns) |
diff --git a/OpenSim/Data/SQLite/SQLiteUserData.cs b/OpenSim/Data/SQLite/SQLiteUserData.cs index 8f78e0b..d8b140c 100644 --- a/OpenSim/Data/SQLite/SQLiteUserData.cs +++ b/OpenSim/Data/SQLite/SQLiteUserData.cs | |||
@@ -58,7 +58,7 @@ namespace OpenSim.Data.SQLite | |||
58 | 58 | ||
59 | private const string AvatarPickerAndSQL = "select * from users where username like :username and surname like :surname"; | 59 | private const string AvatarPickerAndSQL = "select * from users where username like :username and surname like :surname"; |
60 | private const string AvatarPickerOrSQL = "select * from users where username like :username or surname like :surname"; | 60 | private const string AvatarPickerOrSQL = "select * from users where username like :username or surname like :surname"; |
61 | 61 | ||
62 | private DataSet ds; | 62 | private DataSet ds; |
63 | private SqliteDataAdapter da; | 63 | private SqliteDataAdapter da; |
64 | private SqliteDataAdapter daf; | 64 | private SqliteDataAdapter daf; |
@@ -67,16 +67,16 @@ namespace OpenSim.Data.SQLite | |||
67 | override public void Initialise(string connect) | 67 | override public void Initialise(string connect) |
68 | { | 68 | { |
69 | // default to something sensible | 69 | // default to something sensible |
70 | if (connect == "") | 70 | if (connect == "") |
71 | connect = "URI=file:userprofiles.db,version=3"; | 71 | connect = "URI=file:userprofiles.db,version=3"; |
72 | 72 | ||
73 | SqliteConnection conn = new SqliteConnection(connect); | 73 | SqliteConnection conn = new SqliteConnection(connect); |
74 | TestTables(conn); | 74 | TestTables(conn); |
75 | 75 | ||
76 | // This sucks, but It doesn't seem to work with the dataset Syncing :P | 76 | // This sucks, but It doesn't seem to work with the dataset Syncing :P |
77 | g_conn = conn; | 77 | g_conn = conn; |
78 | g_conn.Open(); | 78 | g_conn.Open(); |
79 | 79 | ||
80 | ds = new DataSet(); | 80 | ds = new DataSet(); |
81 | da = new SqliteDataAdapter(new SqliteCommand(userSelect, conn)); | 81 | da = new SqliteDataAdapter(new SqliteCommand(userSelect, conn)); |
82 | daf = new SqliteDataAdapter(new SqliteCommand(userFriendsSelect, conn)); | 82 | daf = new SqliteDataAdapter(new SqliteCommand(userFriendsSelect, conn)); |
@@ -159,7 +159,7 @@ namespace OpenSim.Data.SQLite | |||
159 | override public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) | 159 | override public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) |
160 | { | 160 | { |
161 | string InsertFriends = "insert into userfriends(ownerID, friendID, friendPerms) values(:ownerID, :friendID, :perms)"; | 161 | string InsertFriends = "insert into userfriends(ownerID, friendID, friendPerms) values(:ownerID, :friendID, :perms)"; |
162 | 162 | ||
163 | using (SqliteCommand cmd = new SqliteCommand(InsertFriends, g_conn)) | 163 | using (SqliteCommand cmd = new SqliteCommand(InsertFriends, g_conn)) |
164 | { | 164 | { |
165 | cmd.Parameters.Add(new SqliteParameter(":ownerID", friendlistowner.UUID.ToString())); | 165 | cmd.Parameters.Add(new SqliteParameter(":ownerID", friendlistowner.UUID.ToString())); |
@@ -228,11 +228,11 @@ namespace OpenSim.Data.SQLite | |||
228 | m_log.Error("[USER DB]: Exception getting friends list for user: " + ex.ToString()); | 228 | m_log.Error("[USER DB]: Exception getting friends list for user: " + ex.ToString()); |
229 | } | 229 | } |
230 | } | 230 | } |
231 | 231 | ||
232 | return returnlist; | 232 | return returnlist; |
233 | } | 233 | } |
234 | 234 | ||
235 | 235 | ||
236 | 236 | ||
237 | 237 | ||
238 | #endregion | 238 | #endregion |
@@ -380,9 +380,9 @@ namespace OpenSim.Data.SQLite | |||
380 | else | 380 | else |
381 | { | 381 | { |
382 | fillUserRow(row, user); | 382 | fillUserRow(row, user); |
383 | 383 | ||
384 | } | 384 | } |
385 | // This is why we're getting the 'logins never log-off'.. because It isn't clearing the | 385 | // This is why we're getting the 'logins never log-off'.. because It isn't clearing the |
386 | // useragents table once the useragent is null | 386 | // useragents table once the useragent is null |
387 | // | 387 | // |
388 | // A database guy should look at this and figure out the best way to clear the useragents table. | 388 | // A database guy should look at this and figure out the best way to clear the useragents table. |
@@ -403,7 +403,7 @@ namespace OpenSim.Data.SQLite | |||
403 | } | 403 | } |
404 | else | 404 | else |
405 | { | 405 | { |
406 | // I just added this to help the standalone login situation. | 406 | // I just added this to help the standalone login situation. |
407 | //It still needs to be looked at by a Database guy | 407 | //It still needs to be looked at by a Database guy |
408 | DataTable ua = ds.Tables["useragents"]; | 408 | DataTable ua = ds.Tables["useragents"]; |
409 | row = ua.Rows.Find(Util.ToRawUuidString(user.ID)); | 409 | row = ua.Rows.Find(Util.ToRawUuidString(user.ID)); |
@@ -480,7 +480,7 @@ namespace OpenSim.Data.SQLite | |||
480 | 480 | ||
481 | /// Appearance | 481 | /// Appearance |
482 | /// TODO: stubs for now to get us to a compiling state gently | 482 | /// TODO: stubs for now to get us to a compiling state gently |
483 | // override public AvatarAppearance GetUserAppearance(LLUUID user) | 483 | // override public AvatarAppearance GetUserAppearance(LLUUID user) |
484 | // { | 484 | // { |
485 | // return new AvatarAppearance(); | 485 | // return new AvatarAppearance(); |
486 | // } | 486 | // } |
@@ -494,17 +494,17 @@ namespace OpenSim.Data.SQLite | |||
494 | { | 494 | { |
495 | return; | 495 | return; |
496 | } | 496 | } |
497 | 497 | ||
498 | override public void RemoveAttachment(LLUUID user, LLUUID item) | 498 | override public void RemoveAttachment(LLUUID user, LLUUID item) |
499 | { | 499 | { |
500 | return; | 500 | return; |
501 | } | 501 | } |
502 | 502 | ||
503 | override public List<LLUUID> GetAttachments(LLUUID user) | 503 | override public List<LLUUID> GetAttachments(LLUUID user) |
504 | { | 504 | { |
505 | return new List<LLUUID>(); | 505 | return new List<LLUUID>(); |
506 | } | 506 | } |
507 | 507 | ||
508 | /// <summary> | 508 | /// <summary> |
509 | /// Returns the name of the storage provider | 509 | /// Returns the name of the storage provider |
510 | /// </summary> | 510 | /// </summary> |
@@ -525,13 +525,13 @@ namespace OpenSim.Data.SQLite | |||
525 | 525 | ||
526 | /*********************************************************************** | 526 | /*********************************************************************** |
527 | * | 527 | * |
528 | * DataTable creation | 528 | * DataTable creation |
529 | * | 529 | * |
530 | **********************************************************************/ | 530 | **********************************************************************/ |
531 | /*********************************************************************** | 531 | /*********************************************************************** |
532 | * | 532 | * |
533 | * Database Definition Functions | 533 | * Database Definition Functions |
534 | * | 534 | * |
535 | * This should be db agnostic as we define them in ADO.NET terms | 535 | * This should be db agnostic as we define them in ADO.NET terms |
536 | * | 536 | * |
537 | **********************************************************************/ | 537 | **********************************************************************/ |
@@ -610,7 +610,7 @@ namespace OpenSim.Data.SQLite | |||
610 | } | 610 | } |
611 | 611 | ||
612 | /*********************************************************************** | 612 | /*********************************************************************** |
613 | * | 613 | * |
614 | * Convert between ADO.NET <=> OpenSim Objects | 614 | * Convert between ADO.NET <=> OpenSim Objects |
615 | * | 615 | * |
616 | * These should be database independant | 616 | * These should be database independant |
diff --git a/OpenSim/Data/SQLite/SQLiteUtils.cs b/OpenSim/Data/SQLite/SQLiteUtils.cs index 5bb22f7..0862de0 100644 --- a/OpenSim/Data/SQLite/SQLiteUtils.cs +++ b/OpenSim/Data/SQLite/SQLiteUtils.cs | |||
@@ -39,7 +39,7 @@ namespace OpenSim.Data.SQLite | |||
39 | /*********************************************************************** | 39 | /*********************************************************************** |
40 | * | 40 | * |
41 | * Database Definition Helper Functions | 41 | * Database Definition Helper Functions |
42 | * | 42 | * |
43 | * This should be db agnostic as we define them in ADO.NET terms | 43 | * This should be db agnostic as we define them in ADO.NET terms |
44 | * | 44 | * |
45 | **********************************************************************/ | 45 | **********************************************************************/ |
@@ -161,7 +161,7 @@ namespace OpenSim.Data.SQLite | |||
161 | /// This is a convenience function that collapses 5 repetitive | 161 | /// This is a convenience function that collapses 5 repetitive |
162 | /// lines for defining SqliteParameters to 2 parameters: | 162 | /// lines for defining SqliteParameters to 2 parameters: |
163 | /// column name and database type. | 163 | /// column name and database type. |
164 | /// | 164 | /// |
165 | /// It assumes certain conventions like :param as the param | 165 | /// It assumes certain conventions like :param as the param |
166 | /// name to replace in parametrized queries, and that source | 166 | /// name to replace in parametrized queries, and that source |
167 | /// version is always current version, both of which are fine | 167 | /// version is always current version, both of which are fine |
diff --git a/OpenSim/Data/UserDataBase.cs b/OpenSim/Data/UserDataBase.cs index 817ac3e..82cbda4 100644 --- a/OpenSim/Data/UserDataBase.cs +++ b/OpenSim/Data/UserDataBase.cs | |||
@@ -36,11 +36,11 @@ namespace OpenSim.Data | |||
36 | public abstract class UserDataBase : IUserData | 36 | public abstract class UserDataBase : IUserData |
37 | { | 37 | { |
38 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 38 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
39 | 39 | ||
40 | private Dictionary<LLUUID, AvatarAppearance> aplist = new Dictionary<LLUUID, AvatarAppearance>(); | 40 | private Dictionary<LLUUID, AvatarAppearance> aplist = new Dictionary<LLUUID, AvatarAppearance>(); |
41 | 41 | ||
42 | public abstract UserProfileData GetUserByUUID(LLUUID user); | 42 | public abstract UserProfileData GetUserByUUID(LLUUID user); |
43 | public abstract UserProfileData GetUserByName(string fname, string lname); | 43 | public abstract UserProfileData GetUserByName(string fname, string lname); |
44 | public abstract UserAgentData GetAgentByUUID(LLUUID user); | 44 | public abstract UserAgentData GetAgentByUUID(LLUUID user); |
45 | public abstract UserAgentData GetAgentByName(string name); | 45 | public abstract UserAgentData GetAgentByName(string name); |
46 | public abstract UserAgentData GetAgentByName(string fname, string lname); | 46 | public abstract UserAgentData GetAgentByName(string fname, string lname); |