aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs
diff options
context:
space:
mode:
authorMW2007-09-10 06:45:54 +0000
committerMW2007-09-10 06:45:54 +0000
commit15423539f98d47201a819e35f80b0c30ee459556 (patch)
tree3eb7831bfaaf5e0309c49f966d19869a9fe72e2b /OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs
parent* Fixed: Accessing xmlrpc with invalid xml data would crash the sim. (diff)
downloadopensim-SC-15423539f98d47201a819e35f80b0c30ee459556.zip
opensim-SC-15423539f98d47201a819e35f80b0c30ee459556.tar.gz
opensim-SC-15423539f98d47201a819e35f80b0c30ee459556.tar.bz2
opensim-SC-15423539f98d47201a819e35f80b0c30ee459556.tar.xz
hooked up sdague new sqlite asset database provider to the old asset system. So we can still use sqlite for assets while we wait for the rest of the new asset system to be wrote.
Needs more testing, so if it causes problems will have to swap back to db4o.
Diffstat (limited to 'OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs')
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs22
1 files changed, 19 insertions, 3 deletions
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs b/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs
index 9138673..b53076c 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs
@@ -34,13 +34,14 @@ using System.Data.SqlTypes;
34using Mono.Data.SqliteClient; 34using Mono.Data.SqliteClient;
35using OpenSim.Framework.Console; 35using OpenSim.Framework.Console;
36using OpenSim.Framework.Types; 36using OpenSim.Framework.Types;
37using OpenSim.Framework.Interfaces;
37 38
38namespace OpenSim.Framework.Data.SQLite 39namespace OpenSim.Framework.Data.SQLite
39{ 40{
40 /// <summary> 41 /// <summary>
41 /// A User storage interface for the DB4o database system 42 /// A User storage interface for the DB4o database system
42 /// </summary> 43 /// </summary>
43 public class SQLiteAssetData : SQLiteBase 44 public class SQLiteAssetData : SQLiteBase, IAssetProvider
44 { 45 {
45 /// <summary> 46 /// <summary>
46 /// The database manager 47 /// The database manager
@@ -64,7 +65,15 @@ namespace OpenSim.Framework.Data.SQLite
64 ds.Tables.Add(createAssetsTable()); 65 ds.Tables.Add(createAssetsTable());
65 66
66 setupAssetCommands(da, conn); 67 setupAssetCommands(da, conn);
67 da.Fill(ds.Tables["assets"]); 68 try
69 {
70 da.Fill(ds.Tables["assets"]);
71 }
72 catch (Exception)
73 {
74 MainLog.Instance.Verbose("AssetStorage", "Caught fill error on asset table");
75 }
76
68 77
69 return; 78 return;
70 } 79 }
@@ -172,7 +181,14 @@ namespace OpenSim.Framework.Data.SQLite
172 { 181 {
173 row["UUID"] = asset.FullID; 182 row["UUID"] = asset.FullID;
174 row["Name"] = asset.Name; 183 row["Name"] = asset.Name;
175 row["Description"] = asset.Description; 184 if (asset.Description != null)
185 {
186 row["Description"] = asset.Description;
187 }
188 else
189 {
190 row["Description"] = " ";
191 }
176 row["Type"] = asset.Type; 192 row["Type"] = asset.Type;
177 row["InvType"] = asset.InvType; 193 row["InvType"] = asset.InvType;
178 row["Local"] = asset.Local; 194 row["Local"] = asset.Local;