aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Data.SQLite
diff options
context:
space:
mode:
authorSean Dague2007-09-10 13:34:20 +0000
committerSean Dague2007-09-10 13:34:20 +0000
commita1be7f4be50a645be22eb7d80679530906e8aeba (patch)
treee1171b08f6fff26e0f6fbb95a936054e956b8e19 /OpenSim/Framework/Data.SQLite
parentmass update of urls in source code to new website (diff)
downloadopensim-SC-a1be7f4be50a645be22eb7d80679530906e8aeba.zip
opensim-SC-a1be7f4be50a645be22eb7d80679530906e8aeba.tar.gz
opensim-SC-a1be7f4be50a645be22eb7d80679530906e8aeba.tar.bz2
opensim-SC-a1be7f4be50a645be22eb7d80679530906e8aeba.tar.xz
added some debugging for tracing where asset code isn't working with sqlite
Diffstat (limited to 'OpenSim/Framework/Data.SQLite')
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs21
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteBase.cs4
2 files changed, 24 insertions, 1 deletions
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs b/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs
index a49043b..f50cc03 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs
@@ -100,6 +100,15 @@ namespace OpenSim.Framework.Data.SQLite
100 100
101 public void UpdateAsset(AssetBase asset) 101 public void UpdateAsset(AssetBase asset)
102 { 102 {
103 MainLog.Instance.Verbose("AssetStorage",
104 "Asset: " + asset.FullID +
105 ", Name: " + asset.Name +
106 ", Description: " + asset.Description +
107 ", Type: " + asset.Type +
108 ", InvType: " + asset.InvType +
109 ", Temporary: " + asset.Temporary +
110 ", Local: " + asset.Local +
111 ", Data Length: " + asset.Data.Length );
103 DataTable assets = ds.Tables["assets"]; 112 DataTable assets = ds.Tables["assets"];
104 DataRow row = assets.Rows.Find(asset.FullID); 113 DataRow row = assets.Rows.Find(asset.FullID);
105 if (row == null) 114 if (row == null)
@@ -112,6 +121,11 @@ namespace OpenSim.Framework.Data.SQLite
112 { 121 {
113 fillAssetRow(row, asset); 122 fillAssetRow(row, asset);
114 } 123 }
124 if (ds.HasChanges()) {
125 DataSet changed = ds.GetChanges();
126 da.Update(changed, "assets");
127 ds.AcceptChanges();
128 }
115 } 129 }
116 130
117 public bool ExistsAsset(LLUUID uuid) 131 public bool ExistsAsset(LLUUID uuid)
@@ -122,7 +136,12 @@ namespace OpenSim.Framework.Data.SQLite
122 136
123 public void CommitAssets() // force a sync to the database 137 public void CommitAssets() // force a sync to the database
124 { 138 {
125 da.Update(ds, "assets"); 139 MainLog.Instance.Verbose("AssetStorage", "Attempting commit");
140 if (ds.HasChanges()) {
141 DataSet changed = ds.GetChanges();
142 da.Update(changed, "assets");
143 ds.AcceptChanges();
144 }
126 } 145 }
127 146
128 /*********************************************************************** 147 /***********************************************************************
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteBase.cs b/OpenSim/Framework/Data.SQLite/SQLiteBase.cs
index a59804c..06fa3bb 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteBase.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteBase.cs
@@ -197,6 +197,8 @@ namespace OpenSim.Framework.Data.SQLite
197 return DbType.UInt64; 197 return DbType.UInt64;
198 } else if (type == typeof(System.Double)) { 198 } else if (type == typeof(System.Double)) {
199 return DbType.Double; 199 return DbType.Double;
200 } else if (type == typeof(System.Boolean)) {
201 return DbType.Boolean;
200 } else if (type == typeof(System.Byte[])) { 202 } else if (type == typeof(System.Byte[])) {
201 return DbType.Binary; 203 return DbType.Binary;
202 } else { 204 } else {
@@ -220,6 +222,8 @@ namespace OpenSim.Framework.Data.SQLite
220 return "varchar(255)"; 222 return "varchar(255)";
221 } else if (type == typeof(System.Double)) { 223 } else if (type == typeof(System.Double)) {
222 return "float"; 224 return "float";
225 } else if (type == typeof(System.Boolean)) {
226 return "integer";
223 } else if (type == typeof(System.Byte[])) { 227 } else if (type == typeof(System.Byte[])) {
224 return "blob"; 228 return "blob";
225 } else { 229 } else {