diff options
author | Justin Clarke Casey | 2009-02-19 18:09:10 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-02-19 18:09:10 +0000 |
commit | 07609565617aa7936758acba5fd625877564a10d (patch) | |
tree | 73123e37f14fea5f171cbe04753c21758f25afc1 /OpenSim/Data/MSSQL/MSSQLAssetData.cs | |
parent | * Okay, so finally got my head around this. Problem is that upstream Prebuild... (diff) | |
download | opensim-SC-07609565617aa7936758acba5fd625877564a10d.zip opensim-SC-07609565617aa7936758acba5fd625877564a10d.tar.gz opensim-SC-07609565617aa7936758acba5fd625877564a10d.tar.bz2 opensim-SC-07609565617aa7936758acba5fd625877564a10d.tar.xz |
* Apply http://opensimulator.org/mantis/view.php?id=3142
* Changes varchar(36) columns to UUID type in MSSQL - this will be much more efficient
* ===As always, please, please backup your database before applying this patch===
* Thanks Ruud Lathrop (for the patch) and StrawberryFride (for the review)
Diffstat (limited to 'OpenSim/Data/MSSQL/MSSQLAssetData.cs')
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLAssetData.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLAssetData.cs b/OpenSim/Data/MSSQL/MSSQLAssetData.cs index 0361a7d..61db8f5 100644 --- a/OpenSim/Data/MSSQL/MSSQLAssetData.cs +++ b/OpenSim/Data/MSSQL/MSSQLAssetData.cs | |||
@@ -28,8 +28,8 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Data; | 29 | using System.Data; |
30 | using System.Reflection; | 30 | using System.Reflection; |
31 | using log4net; | ||
32 | using OpenMetaverse; | 31 | using OpenMetaverse; |
32 | using log4net; | ||
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | 34 | ||
35 | namespace OpenSim.Data.MSSQL | 35 | namespace OpenSim.Data.MSSQL |
@@ -71,7 +71,7 @@ namespace OpenSim.Data.MSSQL | |||
71 | /// <param name="connectionString">connect string</param> | 71 | /// <param name="connectionString">connect string</param> |
72 | override public void Initialise(string connectionString) | 72 | override public void Initialise(string connectionString) |
73 | { | 73 | { |
74 | TicksToEpoch = new DateTime(1970, 1, 1).Ticks; | 74 | TicksToEpoch = new System.DateTime(1970, 1, 1).Ticks; |
75 | 75 | ||
76 | if (!string.IsNullOrEmpty(connectionString)) | 76 | if (!string.IsNullOrEmpty(connectionString)) |
77 | { | 77 | { |
@@ -132,7 +132,7 @@ namespace OpenSim.Data.MSSQL | |||
132 | { | 132 | { |
133 | AssetBase asset = new AssetBase(); | 133 | AssetBase asset = new AssetBase(); |
134 | // Region Main | 134 | // Region Main |
135 | asset.FullID = new UUID((string)reader["id"]); | 135 | asset.FullID = new UUID((Guid)reader["id"]); |
136 | asset.Name = (string)reader["name"]; | 136 | asset.Name = (string)reader["name"]; |
137 | asset.Description = (string)reader["description"]; | 137 | asset.Description = (string)reader["description"]; |
138 | asset.Type = Convert.ToSByte(reader["assetType"]); | 138 | asset.Type = Convert.ToSByte(reader["assetType"]); |
@@ -162,7 +162,7 @@ namespace OpenSim.Data.MSSQL | |||
162 | " VALUES " + | 162 | " VALUES " + |
163 | "(@id, @name, @description, @assetType, @local, @temporary, @create_time, @access_time, @data)")) | 163 | "(@id, @name, @description, @assetType, @local, @temporary, @create_time, @access_time, @data)")) |
164 | { | 164 | { |
165 | int now = (int)((DateTime.Now.Ticks - TicksToEpoch) / 10000000); | 165 | int now = (int)((System.DateTime.Now.Ticks - TicksToEpoch) / 10000000); |
166 | command.Parameters.Add(database.CreateParameter("id", asset.FullID)); | 166 | command.Parameters.Add(database.CreateParameter("id", asset.FullID)); |
167 | command.Parameters.Add(database.CreateParameter("name", asset.Name)); | 167 | command.Parameters.Add(database.CreateParameter("name", asset.Name)); |
168 | command.Parameters.Add(database.CreateParameter("description", asset.Description)); | 168 | command.Parameters.Add(database.CreateParameter("description", asset.Description)); |