aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data
diff options
context:
space:
mode:
authorDr Scofield2008-06-27 23:03:39 +0000
committerDr Scofield2008-06-27 23:03:39 +0000
commit748f72326d9a295958bc9ba63bbb1a5d39030ef7 (patch)
tree58f2c9a5f6b8ffab5ad3621070aa17cb1c1e3e6b /OpenSim/Data
parentmore warnings to go. (diff)
downloadopensim-SC_OLD-748f72326d9a295958bc9ba63bbb1a5d39030ef7.zip
opensim-SC_OLD-748f72326d9a295958bc9ba63bbb1a5d39030ef7.tar.gz
opensim-SC_OLD-748f72326d9a295958bc9ba63bbb1a5d39030ef7.tar.bz2
opensim-SC_OLD-748f72326d9a295958bc9ba63bbb1a5d39030ef7.tar.xz
last round of warning squashing. calling it a day now.
Diffstat (limited to 'OpenSim/Data')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLDataStore.cs4
-rw-r--r--OpenSim/Data/MSSQL/MSSQLGridData.cs8
-rw-r--r--OpenSim/Data/MSSQL/MSSQLManager.cs2
-rw-r--r--OpenSim/Data/MySQL/MySQLAssetData.cs20
-rw-r--r--OpenSim/Data/MySQL/MySQLDataStore.cs304
-rw-r--r--OpenSim/Data/MySQL/MySQLGridData.cs8
-rw-r--r--OpenSim/Data/MySQL/MySQLManager.cs26
-rw-r--r--OpenSim/Data/NHibernate/NHibernateAssetData.cs24
-rw-r--r--OpenSim/Data/NHibernate/NHibernateInventoryData.cs2
-rw-r--r--OpenSim/Data/NHibernate/NHibernateManager.cs8
-rw-r--r--OpenSim/Data/NHibernate/NHibernateUserData.cs12
-rw-r--r--OpenSim/Data/SQLite/SQLiteAssetData.cs46
-rw-r--r--OpenSim/Data/SQLite/SQLiteGridData.cs8
-rw-r--r--OpenSim/Data/SQLite/SQLiteInventoryStore.cs20
-rw-r--r--OpenSim/Data/SQLite/SQLiteRegionData.cs96
-rw-r--r--OpenSim/Data/SQLite/SQLiteUserData.cs6
16 files changed, 303 insertions, 291 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLDataStore.cs b/OpenSim/Data/MSSQL/MSSQLDataStore.cs
index 42eab8e..17a52a8 100644
--- a/OpenSim/Data/MSSQL/MSSQLDataStore.cs
+++ b/OpenSim/Data/MSSQL/MSSQLDataStore.cs
@@ -370,7 +370,7 @@ namespace OpenSim.Data.MSSQL
370 int revision = Util.UnixTimeSinceEpoch(); 370 int revision = Util.UnixTimeSinceEpoch();
371 m_log.Info("[REGION DB]: Storing terrain revision r" + revision.ToString()); 371 m_log.Info("[REGION DB]: Storing terrain revision r" + revision.ToString());
372 372
373 DataTable terrain = m_dataSet.Tables["terrain"]; 373 // DataTable terrain = m_dataSet.Tables["terrain"];
374 lock (m_dataSet) 374 lock (m_dataSet)
375 { 375 {
376 SqlCommand cmd = new SqlCommand("insert into terrain(RegionUUID, Revision, Heightfield)" + 376 SqlCommand cmd = new SqlCommand("insert into terrain(RegionUUID, Revision, Heightfield)" +
@@ -400,7 +400,7 @@ namespace OpenSim.Data.MSSQL
400 where RegionUUID=@RegionUUID order by Revision desc" 400 where RegionUUID=@RegionUUID order by Revision desc"
401 , m_connection); 401 , m_connection);
402 402
403 SqlParameter param = new SqlParameter(); 403 // SqlParameter param = new SqlParameter();
404 cmd.Parameters.Add(new SqlParameter("@RegionUUID", regionID.UUID)); 404 cmd.Parameters.Add(new SqlParameter("@RegionUUID", regionID.UUID));
405 405
406 if (m_connection.State != ConnectionState.Open) 406 if (m_connection.State != ConnectionState.Open)
diff --git a/OpenSim/Data/MSSQL/MSSQLGridData.cs b/OpenSim/Data/MSSQL/MSSQLGridData.cs
index d67e463..e2b0dd6 100644
--- a/OpenSim/Data/MSSQL/MSSQLGridData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLGridData.cs
@@ -434,11 +434,11 @@ namespace OpenSim.Data.MSSQL
434 /// <returns></returns> 434 /// <returns></returns>
435 public bool AuthenticateSim(LLUUID uuid, ulong handle, string authhash, string challenge) 435 public bool AuthenticateSim(LLUUID uuid, ulong handle, string authhash, string challenge)
436 { 436 {
437 SHA512Managed HashProvider = new SHA512Managed(); 437 // SHA512Managed HashProvider = new SHA512Managed();
438 Encoding TextProvider = new UTF8Encoding(); 438 // Encoding TextProvider = new UTF8Encoding();
439 439
440 byte[] stream = TextProvider.GetBytes(uuid.ToString() + ":" + handle.ToString() + ":" + challenge); 440 // byte[] stream = TextProvider.GetBytes(uuid.ToString() + ":" + handle.ToString() + ":" + challenge);
441 byte[] hash = HashProvider.ComputeHash(stream); 441 // byte[] hash = HashProvider.ComputeHash(stream);
442 return false; 442 return false;
443 } 443 }
444 444
diff --git a/OpenSim/Data/MSSQL/MSSQLManager.cs b/OpenSim/Data/MSSQL/MSSQLManager.cs
index a170a87..bea02fe 100644
--- a/OpenSim/Data/MSSQL/MSSQLManager.cs
+++ b/OpenSim/Data/MSSQL/MSSQLManager.cs
@@ -544,7 +544,7 @@ namespace OpenSim.Data.MSSQL
544 public string getVersion() 544 public string getVersion()
545 { 545 {
546 Module module = GetType().Module; 546 Module module = GetType().Module;
547 string dllName = module.Assembly.ManifestModule.Name; 547 // string dllName = module.Assembly.ManifestModule.Name;
548 Version dllVersion = module.Assembly.GetName().Version; 548 Version dllVersion = module.Assembly.GetName().Version;
549 549
550 550
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs
index ac7fa1d..fc331cd 100644
--- a/OpenSim/Data/MySQL/MySQLAssetData.cs
+++ b/OpenSim/Data/MySQL/MySQLAssetData.cs
@@ -120,16 +120,16 @@ namespace OpenSim.Data.MySQL
120 /// </list> 120 /// </list>
121 /// </summary> 121 /// </summary>
122 /// <param name="oldVersion"></param> 122 /// <param name="oldVersion"></param>
123 private void UpgradeAssetsTable(string oldVersion) 123 // private void UpgradeAssetsTable(string oldVersion)
124 { 124 // {
125 // null as the version, indicates that the table didn't exist 125 // // null as the version, indicates that the table didn't exist
126 if (oldVersion == null) 126 // if (oldVersion == null)
127 { 127 // {
128 m_log.Info("[ASSETS DB]: Creating new database tables"); 128 // m_log.Info("[ASSETS DB]: Creating new database tables");
129 _dbConnection.ExecuteResourceSql("CreateAssetsTable.sql"); 129 // _dbConnection.ExecuteResourceSql("CreateAssetsTable.sql");
130 return; 130 // return;
131 } 131 // }
132 } 132 // }
133 133
134 /// <summary> 134 /// <summary>
135 /// Ensure that the assets related tables exists and are at the latest version 135 /// Ensure that the assets related tables exists and are at the latest version
diff --git a/OpenSim/Data/MySQL/MySQLDataStore.cs b/OpenSim/Data/MySQL/MySQLDataStore.cs
index aa4c111..87bce10 100644
--- a/OpenSim/Data/MySQL/MySQLDataStore.cs
+++ b/OpenSim/Data/MySQL/MySQLDataStore.cs
@@ -272,19 +272,19 @@ namespace OpenSim.Data.MySQL
272 /// </summary> 272 /// </summary>
273 /// <param name="oldVersion"></param> 273 /// <param name="oldVersion"></param>
274 /// <param name="dbconn">The database connection handler</param> 274 /// <param name="dbconn">The database connection handler</param>
275 private void UpgradeLandTable(string oldVersion, MySqlConnection dbconn) 275 // private void UpgradeLandTable(string oldVersion, MySqlConnection dbconn)
276 { 276 // {
277 // null as the version, indicates that the table didn't exist 277 // // null as the version, indicates that the table didn't exist
278 if (oldVersion == null) 278 // if (oldVersion == null)
279 { 279 // {
280 ExecuteResourceSql("CreateLandTable.sql",dbconn); 280 // ExecuteResourceSql("CreateLandTable.sql",dbconn);
281 oldVersion = "Rev. 2; InnoDB free: 0 kB"; 281 // oldVersion = "Rev. 2; InnoDB free: 0 kB";
282 } 282 // }
283 if (!oldVersion.Contains("Rev.")) 283 // if (!oldVersion.Contains("Rev."))
284 { 284 // {
285 ExecuteResourceSql("UpgradeLandTableToVersion2.sql", dbconn); 285 // ExecuteResourceSql("UpgradeLandTableToVersion2.sql", dbconn);
286 } 286 // }
287 } 287 // }
288 288
289 /// <summary> 289 /// <summary>
290 /// Adds an object into region storage 290 /// Adds an object into region storage
@@ -534,7 +534,7 @@ namespace OpenSim.Data.MySQL
534 where RegionUUID=?RegionUUID order by Revision desc limit 1" 534 where RegionUUID=?RegionUUID order by Revision desc limit 1"
535 , m_connection); 535 , m_connection);
536 536
537 MySqlParameter param = new MySqlParameter(); 537 // MySqlParameter param = new MySqlParameter();
538 cmd.Parameters.Add(new MySqlParameter("?RegionUUID", Util.ToRawUuidString(regionID))); 538 cmd.Parameters.Add(new MySqlParameter("?RegionUUID", Util.ToRawUuidString(regionID)));
539 539
540 if (m_connection.State != ConnectionState.Open) 540 if (m_connection.State != ConnectionState.Open)
@@ -1768,30 +1768,30 @@ namespace OpenSim.Data.MySQL
1768 /// </summary> 1768 /// </summary>
1769 /// <param name="dt"></param> 1769 /// <param name="dt"></param>
1770 /// <returns></returns> 1770 /// <returns></returns>
1771 private static string defineTable(DataTable dt) 1771 // private static string defineTable(DataTable dt)
1772 { 1772 // {
1773 string sql = "create table " + dt.TableName + "("; 1773 // string sql = "create table " + dt.TableName + "(";
1774 string subsql = String.Empty; 1774 // string subsql = String.Empty;
1775 foreach (DataColumn col in dt.Columns) 1775 // foreach (DataColumn col in dt.Columns)
1776 { 1776 // {
1777 if (subsql.Length > 0) 1777 // if (subsql.Length > 0)
1778 { 1778 // {
1779 // a map function would rock so much here 1779 // // a map function would rock so much here
1780 subsql += ",\n"; 1780 // subsql += ",\n";
1781 } 1781 // }
1782 subsql += col.ColumnName + " " + MySqlType(col.DataType); 1782 // subsql += col.ColumnName + " " + MySqlType(col.DataType);
1783 if (dt.PrimaryKey.Length > 0 && col == dt.PrimaryKey[0]) 1783 // if (dt.PrimaryKey.Length > 0 && col == dt.PrimaryKey[0])
1784 { 1784 // {
1785 subsql += " primary key"; 1785 // subsql += " primary key";
1786 } 1786 // }
1787 } 1787 // }
1788 sql += subsql; 1788 // sql += subsql;
1789 sql += ")"; 1789 // sql += ")";
1790 1790
1791 //m_log.InfoFormat("[DATASTORE]: defineTable() sql {0}", sql); 1791 // //m_log.InfoFormat("[DATASTORE]: defineTable() sql {0}", sql);
1792 1792
1793 return sql; 1793 // return sql;
1794 } 1794 // }
1795 1795
1796 /*********************************************************************** 1796 /***********************************************************************
1797 * 1797 *
@@ -1944,93 +1944,93 @@ namespace OpenSim.Data.MySQL
1944 /// 1944 ///
1945 /// </summary> 1945 /// </summary>
1946 /// <param name="conn">MySQL connection handler</param> 1946 /// <param name="conn">MySQL connection handler</param>
1947 private static void InitDB(MySqlConnection conn) 1947 // private static void InitDB(MySqlConnection conn)
1948 { 1948 // {
1949 string createPrims = defineTable(createPrimTable()); 1949 // string createPrims = defineTable(createPrimTable());
1950 string createShapes = defineTable(createShapeTable()); 1950 // string createShapes = defineTable(createShapeTable());
1951 string createItems = defineTable(createItemsTable()); 1951 // string createItems = defineTable(createItemsTable());
1952 string createTerrain = defineTable(createTerrainTable()); 1952 // string createTerrain = defineTable(createTerrainTable());
1953 1953
1954 // Land table is created from the Versionable Test Table routine now. 1954 // // Land table is created from the Versionable Test Table routine now.
1955 //string createLand = defineTable(createLandTable()); 1955 // //string createLand = defineTable(createLandTable());
1956 string createLandAccessList = defineTable(createLandAccessListTable()); 1956 // string createLandAccessList = defineTable(createLandAccessListTable());
1957 1957
1958 MySqlCommand pcmd = new MySqlCommand(createPrims, conn); 1958 // MySqlCommand pcmd = new MySqlCommand(createPrims, conn);
1959 MySqlCommand scmd = new MySqlCommand(createShapes, conn); 1959 // MySqlCommand scmd = new MySqlCommand(createShapes, conn);
1960 MySqlCommand icmd = new MySqlCommand(createItems, conn); 1960 // MySqlCommand icmd = new MySqlCommand(createItems, conn);
1961 MySqlCommand tcmd = new MySqlCommand(createTerrain, conn); 1961 // MySqlCommand tcmd = new MySqlCommand(createTerrain, conn);
1962 //MySqlCommand lcmd = new MySqlCommand(createLand, conn); 1962 // //MySqlCommand lcmd = new MySqlCommand(createLand, conn);
1963 MySqlCommand lalcmd = new MySqlCommand(createLandAccessList, conn); 1963 // MySqlCommand lalcmd = new MySqlCommand(createLandAccessList, conn);
1964 1964
1965 if (conn.State != ConnectionState.Open) 1965 // if (conn.State != ConnectionState.Open)
1966 { 1966 // {
1967 try 1967 // try
1968 { 1968 // {
1969 conn.Open(); 1969 // conn.Open();
1970 } 1970 // }
1971 catch (Exception ex) 1971 // catch (Exception ex)
1972 { 1972 // {
1973 m_log.Error("[REGION DB]: Error connecting to MySQL server: " + ex.Message); 1973 // m_log.Error("[REGION DB]: Error connecting to MySQL server: " + ex.Message);
1974 m_log.Error("[REGION DB]: Application is terminating!"); 1974 // m_log.Error("[REGION DB]: Application is terminating!");
1975 Thread.CurrentThread.Abort(); 1975 // Thread.CurrentThread.Abort();
1976 } 1976 // }
1977 } 1977 // }
1978 1978
1979 try 1979 // try
1980 { 1980 // {
1981 pcmd.ExecuteNonQuery(); 1981 // pcmd.ExecuteNonQuery();
1982 } 1982 // }
1983 catch (MySqlException e) 1983 // catch (MySqlException e)
1984 { 1984 // {
1985 m_log.WarnFormat("[REGION DB]: Primitives Table Already Exists: {0}", e); 1985 // m_log.WarnFormat("[REGION DB]: Primitives Table Already Exists: {0}", e);
1986 } 1986 // }
1987 1987
1988 try 1988 // try
1989 { 1989 // {
1990 scmd.ExecuteNonQuery(); 1990 // scmd.ExecuteNonQuery();
1991 } 1991 // }
1992 catch (MySqlException e) 1992 // catch (MySqlException e)
1993 { 1993 // {
1994 m_log.WarnFormat("[REGION DB]: Shapes Table Already Exists: {0}", e); 1994 // m_log.WarnFormat("[REGION DB]: Shapes Table Already Exists: {0}", e);
1995 } 1995 // }
1996 1996
1997 try 1997 // try
1998 { 1998 // {
1999 icmd.ExecuteNonQuery(); 1999 // icmd.ExecuteNonQuery();
2000 } 2000 // }
2001 catch (MySqlException e) 2001 // catch (MySqlException e)
2002 { 2002 // {
2003 m_log.WarnFormat("[REGION DB]: Items Table Already Exists: {0}", e); 2003 // m_log.WarnFormat("[REGION DB]: Items Table Already Exists: {0}", e);
2004 } 2004 // }
2005 2005
2006 try 2006 // try
2007 { 2007 // {
2008 tcmd.ExecuteNonQuery(); 2008 // tcmd.ExecuteNonQuery();
2009 } 2009 // }
2010 catch (MySqlException e) 2010 // catch (MySqlException e)
2011 { 2011 // {
2012 m_log.WarnFormat("[REGION DB]: Terrain Table Already Exists: {0}", e); 2012 // m_log.WarnFormat("[REGION DB]: Terrain Table Already Exists: {0}", e);
2013 } 2013 // }
2014 2014
2015 //try 2015 // //try
2016 //{ 2016 // //{
2017 //lcmd.ExecuteNonQuery(); 2017 // //lcmd.ExecuteNonQuery();
2018 //} 2018 // //}
2019 //catch (MySqlException e) 2019 // //catch (MySqlException e)
2020 //{ 2020 // //{
2021 //m_log.WarnFormat("[MySql]: Land Table Already Exists: {0}", e); 2021 // //m_log.WarnFormat("[MySql]: Land Table Already Exists: {0}", e);
2022 //} 2022 // //}
2023 2023
2024 try 2024 // try
2025 { 2025 // {
2026 lalcmd.ExecuteNonQuery(); 2026 // lalcmd.ExecuteNonQuery();
2027 } 2027 // }
2028 catch (MySqlException e) 2028 // catch (MySqlException e)
2029 { 2029 // {
2030 m_log.WarnFormat("[REGION DB]: LandAccessList Table Already Exists: {0}", e); 2030 // m_log.WarnFormat("[REGION DB]: LandAccessList Table Already Exists: {0}", e);
2031 } 2031 // }
2032 conn.Close(); 2032 // conn.Close();
2033 } 2033 // }
2034 2034
2035 /// <summary> 2035 /// <summary>
2036 /// 2036 ///
@@ -2189,32 +2189,32 @@ namespace OpenSim.Data.MySQL
2189 /// <param name="type"></param> 2189 /// <param name="type"></param>
2190 /// <returns></returns> 2190 /// <returns></returns>
2191 /// <remarks>this is something we'll need to implement for each db slightly differently.</remarks> 2191 /// <remarks>this is something we'll need to implement for each db slightly differently.</remarks>
2192 private static string MySqlType(Type type) 2192 // private static string MySqlType(Type type)
2193 { 2193 // {
2194 if (type == typeof (String)) 2194 // if (type == typeof (String))
2195 { 2195 // {
2196 return "varchar(255)"; 2196 // return "varchar(255)";
2197 } 2197 // }
2198 else if (type == typeof (Int32)) 2198 // else if (type == typeof (Int32))
2199 { 2199 // {
2200 return "integer"; 2200 // return "integer";
2201 } 2201 // }
2202 else if (type == typeof (Int64)) 2202 // else if (type == typeof (Int64))
2203 { 2203 // {
2204 return "bigint"; 2204 // return "bigint";
2205 } 2205 // }
2206 else if (type == typeof (Double)) 2206 // else if (type == typeof (Double))
2207 { 2207 // {
2208 return "float"; 2208 // return "float";
2209 } 2209 // }
2210 else if (type == typeof (Byte[])) 2210 // else if (type == typeof (Byte[]))
2211 { 2211 // {
2212 return "longblob"; 2212 // return "longblob";
2213 } 2213 // }
2214 else 2214 // else
2215 { 2215 // {
2216 return "string"; 2216 // return "string";
2217 } 2217 // }
2218 } 2218 // }
2219 } 2219 }
2220} 2220}
diff --git a/OpenSim/Data/MySQL/MySQLGridData.cs b/OpenSim/Data/MySQL/MySQLGridData.cs
index 7abc85a..bb71c99 100644
--- a/OpenSim/Data/MySQL/MySQLGridData.cs
+++ b/OpenSim/Data/MySQL/MySQLGridData.cs
@@ -402,11 +402,11 @@ namespace OpenSim.Data.MySQL
402 /// <returns></returns> 402 /// <returns></returns>
403 public bool AuthenticateSim(LLUUID uuid, ulong handle, string authhash, string challenge) 403 public bool AuthenticateSim(LLUUID uuid, ulong handle, string authhash, string challenge)
404 { 404 {
405 SHA512Managed HashProvider = new SHA512Managed(); 405 // SHA512Managed HashProvider = new SHA512Managed();
406 Encoding TextProvider = new UTF8Encoding(); 406 // Encoding TextProvider = new UTF8Encoding();
407 407
408 byte[] stream = TextProvider.GetBytes(uuid.ToString() + ":" + handle.ToString() + ":" + challenge); 408 // byte[] stream = TextProvider.GetBytes(uuid.ToString() + ":" + handle.ToString() + ":" + challenge);
409 byte[] hash = HashProvider.ComputeHash(stream); 409 // byte[] hash = HashProvider.ComputeHash(stream);
410 410
411 return false; 411 return false;
412 } 412 }
diff --git a/OpenSim/Data/MySQL/MySQLManager.cs b/OpenSim/Data/MySQL/MySQLManager.cs
index 7c3ed28..61fd039 100644
--- a/OpenSim/Data/MySQL/MySQLManager.cs
+++ b/OpenSim/Data/MySQL/MySQLManager.cs
@@ -156,7 +156,7 @@ namespace OpenSim.Data.MySQL
156 public string getVersion() 156 public string getVersion()
157 { 157 {
158 Module module = GetType().Module; 158 Module module = GetType().Module;
159 string dllName = module.Assembly.ManifestModule.Name; 159 // string dllName = module.Assembly.ManifestModule.Name;
160 Version dllVersion = module.Assembly.GetName().Version; 160 Version dllVersion = module.Assembly.GetName().Version;
161 161
162 return 162 return
@@ -916,8 +916,12 @@ namespace OpenSim.Data.MySQL
916 IDbCommand result = Query(sql, parameters); 916 IDbCommand result = Query(sql, parameters);
917 917
918 //Console.WriteLine(result.CommandText); 918 //Console.WriteLine(result.CommandText);
919 int x; 919 // int x;
920 if ((x = result.ExecuteNonQuery()) > 0) 920 // if ((x = result.ExecuteNonQuery()) > 0)
921 // {
922 // returnval = true;
923 // }
924 if (result.ExecuteNonQuery() > 0)
921 { 925 {
922 returnval = true; 926 returnval = true;
923 } 927 }
@@ -952,8 +956,12 @@ namespace OpenSim.Data.MySQL
952 956
953 IDbCommand result = Query(sql, parameters); 957 IDbCommand result = Query(sql, parameters);
954 958
955 int x; 959 // int x;
956 if ((x = result.ExecuteNonQuery()) > 0) 960 // if ((x = result.ExecuteNonQuery()) > 0)
961 // {
962 // returnval = true;
963 // }
964 if (result.ExecuteNonQuery() > 0)
957 { 965 {
958 returnval = true; 966 returnval = true;
959 } 967 }
@@ -1000,8 +1008,12 @@ namespace OpenSim.Data.MySQL
1000 IDbCommand result = Query(sql, parameters); 1008 IDbCommand result = Query(sql, parameters);
1001 1009
1002 //Console.WriteLine(result.CommandText); 1010 //Console.WriteLine(result.CommandText);
1003 int x; 1011 // int x;
1004 if ((x = result.ExecuteNonQuery()) > 0) 1012 // if ((x = result.ExecuteNonQuery()) > 0)
1013 // {
1014 // returnval = true;
1015 // }
1016 if (result.ExecuteNonQuery() > 0)
1005 { 1017 {
1006 returnval = true; 1018 returnval = true;
1007 } 1019 }
diff --git a/OpenSim/Data/NHibernate/NHibernateAssetData.cs b/OpenSim/Data/NHibernate/NHibernateAssetData.cs
index a339ee3..174667e 100644
--- a/OpenSim/Data/NHibernate/NHibernateAssetData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateAssetData.cs
@@ -137,18 +137,18 @@ namespace OpenSim.Data.NHibernate
137 } 137 }
138 } 138 }
139 139
140 private void LogAssetLoad(AssetBase asset) 140 // private void LogAssetLoad(AssetBase asset)
141 { 141 // {
142 string temporary = asset.Temporary ? "Temporary" : "Stored"; 142 // string temporary = asset.Temporary ? "Temporary" : "Stored";
143 string local = asset.Local ? "Local" : "Remote"; 143 // string local = asset.Local ? "Local" : "Remote";
144 144
145 int assetLength = (asset.Data != null) ? asset.Data.Length : 0; 145 // int assetLength = (asset.Data != null) ? asset.Data.Length : 0;
146 146
147 m_log.Info("[SQLITE]: " + 147 // m_log.Info("[SQLITE]: " +
148 string.Format("Loaded {6} {5} Asset: [{0}][{3}/{4}] \"{1}\":{2} ({7} bytes)", 148 // string.Format("Loaded {6} {5} Asset: [{0}][{3}/{4}] \"{1}\":{2} ({7} bytes)",
149 asset.FullID, asset.Name, asset.Description, asset.Type, 149 // asset.FullID, asset.Name, asset.Description, asset.Type,
150 asset.InvType, temporary, local, assetLength)); 150 // asset.InvType, temporary, local, assetLength));
151 } 151 // }
152 152
153 override public bool ExistsAsset(LLUUID uuid) 153 override public bool ExistsAsset(LLUUID uuid)
154 { 154 {
diff --git a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
index 46dcbad..153d2d5 100644
--- a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
@@ -277,7 +277,7 @@ namespace OpenSim.Data.NHibernate
277 public string getVersion() 277 public string getVersion()
278 { 278 {
279 Module module = GetType().Module; 279 Module module = GetType().Module;
280 string dllName = module.Assembly.ManifestModule.Name; 280 // string dllName = module.Assembly.ManifestModule.Name;
281 Version dllVersion = module.Assembly.GetName().Version; 281 Version dllVersion = module.Assembly.GetName().Version;
282 282
283 283
diff --git a/OpenSim/Data/NHibernate/NHibernateManager.cs b/OpenSim/Data/NHibernate/NHibernateManager.cs
index 6f13294..4c5ec01 100644
--- a/OpenSim/Data/NHibernate/NHibernateManager.cs
+++ b/OpenSim/Data/NHibernate/NHibernateManager.cs
@@ -33,11 +33,11 @@ namespace OpenSim.Data.NHibernate
33{ 33{
34 internal class NHibernateManager 34 internal class NHibernateManager
35 { 35 {
36 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 36 // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
37 37
38 private ISessionFactory factory; 38 // private ISessionFactory factory;
39 private ISession session; 39 // private ISession session;
40 private ITransaction transaction; 40 // private ITransaction transaction;
41 41
42 public NHibernateManager() 42 public NHibernateManager()
43 { 43 {
diff --git a/OpenSim/Data/NHibernate/NHibernateUserData.cs b/OpenSim/Data/NHibernate/NHibernateUserData.cs
index 9cb576d..9d9aec9 100644
--- a/OpenSim/Data/NHibernate/NHibernateUserData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateUserData.cs
@@ -91,7 +91,7 @@ namespace OpenSim.Data.NHibernate
91 { 91 {
92 user = session.Load(typeof(UserProfileData), uuid) as UserProfileData; 92 user = session.Load(typeof(UserProfileData), uuid) as UserProfileData;
93 } 93 }
94 catch (ObjectNotFoundException e) 94 catch (ObjectNotFoundException)
95 { 95 {
96 user = null; 96 user = null;
97 } 97 }
@@ -108,7 +108,7 @@ namespace OpenSim.Data.NHibernate
108 user = session.Load(typeof(UserProfileData), uuid) as UserProfileData; 108 user = session.Load(typeof(UserProfileData), uuid) as UserProfileData;
109 user.CurrentAgent = GetAgentByUUID(uuid); 109 user.CurrentAgent = GetAgentByUUID(uuid);
110 } 110 }
111 catch (ObjectNotFoundException e) 111 catch (ObjectNotFoundException)
112 { 112 {
113 user = null; 113 user = null;
114 } 114 }
@@ -143,7 +143,7 @@ namespace OpenSim.Data.NHibernate
143 UserAgentData old = session.Load(typeof(UserAgentData), uuid) as UserAgentData; 143 UserAgentData old = session.Load(typeof(UserAgentData), uuid) as UserAgentData;
144 session.Delete(old); 144 session.Delete(old);
145 } 145 }
146 catch (ObjectNotFoundException e) 146 catch (ObjectNotFoundException)
147 { 147 {
148 } 148 }
149 session.Save(agent); 149 session.Save(agent);
@@ -173,7 +173,7 @@ namespace OpenSim.Data.NHibernate
173 UserAgentData old = session.Load(typeof(UserAgentData), agent.ProfileID) as UserAgentData; 173 UserAgentData old = session.Load(typeof(UserAgentData), agent.ProfileID) as UserAgentData;
174 session.Delete(old); 174 session.Delete(old);
175 } 175 }
176 catch (ObjectNotFoundException e) 176 catch (ObjectNotFoundException)
177 { 177 {
178 } 178 }
179 session.Save(agent); 179 session.Save(agent);
@@ -260,7 +260,7 @@ namespace OpenSim.Data.NHibernate
260 // TODO: I'm sure I'll have to do something silly here 260 // TODO: I'm sure I'll have to do something silly here
261 try { 261 try {
262 appearance = session.Load(typeof(AvatarAppearance), user) as AvatarAppearance; 262 appearance = session.Load(typeof(AvatarAppearance), user) as AvatarAppearance;
263 } catch (ObjectNotFoundException e) { 263 } catch (ObjectNotFoundException) {
264 appearance = null; 264 appearance = null;
265 } 265 }
266 return appearance; 266 return appearance;
@@ -271,7 +271,7 @@ namespace OpenSim.Data.NHibernate
271 AvatarAppearance appearance; 271 AvatarAppearance appearance;
272 try { 272 try {
273 appearance = session.Load(typeof(AvatarAppearance), uuid) as AvatarAppearance; 273 appearance = session.Load(typeof(AvatarAppearance), uuid) as AvatarAppearance;
274 } catch (ObjectNotFoundException e) { 274 } catch (ObjectNotFoundException) {
275 appearance = null; 275 appearance = null;
276 } 276 }
277 277
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs
index 018501f..24c75e3 100644
--- a/OpenSim/Data/SQLite/SQLiteAssetData.cs
+++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs
@@ -250,22 +250,22 @@ namespace OpenSim.Data.SQLite
250 /// Create the "assets" table 250 /// Create the "assets" table
251 /// </summary> 251 /// </summary>
252 /// <returns></returns> 252 /// <returns></returns>
253 private static DataTable createAssetsTable() 253 // private static DataTable createAssetsTable()
254 { 254 // {
255 DataTable assets = new DataTable("assets"); 255 // DataTable assets = new DataTable("assets");
256 256
257 SQLiteUtil.createCol(assets, "UUID", typeof (String)); 257 // SQLiteUtil.createCol(assets, "UUID", typeof (String));
258 SQLiteUtil.createCol(assets, "Name", typeof (String)); 258 // SQLiteUtil.createCol(assets, "Name", typeof (String));
259 SQLiteUtil.createCol(assets, "Description", typeof (String)); 259 // SQLiteUtil.createCol(assets, "Description", typeof (String));
260 SQLiteUtil.createCol(assets, "Type", typeof (Int32)); 260 // SQLiteUtil.createCol(assets, "Type", typeof (Int32));
261 SQLiteUtil.createCol(assets, "InvType", typeof (Int32)); 261 // SQLiteUtil.createCol(assets, "InvType", typeof (Int32));
262 SQLiteUtil.createCol(assets, "Local", typeof (Boolean)); 262 // SQLiteUtil.createCol(assets, "Local", typeof (Boolean));
263 SQLiteUtil.createCol(assets, "Temporary", typeof (Boolean)); 263 // SQLiteUtil.createCol(assets, "Temporary", typeof (Boolean));
264 SQLiteUtil.createCol(assets, "Data", typeof (Byte[])); 264 // SQLiteUtil.createCol(assets, "Data", typeof (Byte[]));
265 // Add in contraints 265 // // Add in contraints
266 assets.PrimaryKey = new DataColumn[] {assets.Columns["UUID"]}; 266 // assets.PrimaryKey = new DataColumn[] {assets.Columns["UUID"]};
267 return assets; 267 // return assets;
268 } 268 // }
269 269
270 /*********************************************************************** 270 /***********************************************************************
271 * 271 *
@@ -312,12 +312,12 @@ namespace OpenSim.Data.SQLite
312 /// 312 ///
313 /// </summary> 313 /// </summary>
314 /// <param name="conn"></param> 314 /// <param name="conn"></param>
315 private static void InitDB(SqliteConnection conn) 315 // private static void InitDB(SqliteConnection conn)
316 { 316 // {
317 string createAssets = SQLiteUtil.defineTable(createAssetsTable()); 317 // string createAssets = SQLiteUtil.defineTable(createAssetsTable());
318 SqliteCommand pcmd = new SqliteCommand(createAssets, conn); 318 // SqliteCommand pcmd = new SqliteCommand(createAssets, conn);
319 pcmd.ExecuteNonQuery(); 319 // pcmd.ExecuteNonQuery();
320 } 320 // }
321 321
322 /// <summary> 322 /// <summary>
323 /// 323 ///
@@ -358,7 +358,7 @@ namespace OpenSim.Data.SQLite
358 get 358 get
359 { 359 {
360 Module module = GetType().Module; 360 Module module = GetType().Module;
361 string dllName = module.Assembly.ManifestModule.Name; 361 // string dllName = module.Assembly.ManifestModule.Name;
362 Version dllVersion = module.Assembly.GetName().Version; 362 Version dllVersion = module.Assembly.GetName().Version;
363 363
364 return 364 return
diff --git a/OpenSim/Data/SQLite/SQLiteGridData.cs b/OpenSim/Data/SQLite/SQLiteGridData.cs
index 0d24a40..6fd7235 100644
--- a/OpenSim/Data/SQLite/SQLiteGridData.cs
+++ b/OpenSim/Data/SQLite/SQLiteGridData.cs
@@ -230,11 +230,11 @@ namespace OpenSim.Data.SQLite
230 /// <returns></returns> 230 /// <returns></returns>
231 public bool AuthenticateSim(LLUUID uuid, ulong handle, string authhash, string challenge) 231 public bool AuthenticateSim(LLUUID uuid, ulong handle, string authhash, string challenge)
232 { 232 {
233 SHA512Managed HashProvider = new SHA512Managed(); 233 // SHA512Managed HashProvider = new SHA512Managed();
234 Encoding TextProvider = new UTF8Encoding(); 234 // Encoding TextProvider = new UTF8Encoding();
235 235
236 byte[] stream = TextProvider.GetBytes(uuid.ToString() + ":" + handle.ToString() + ":" + challenge); 236 // byte[] stream = TextProvider.GetBytes(uuid.ToString() + ":" + handle.ToString() + ":" + challenge);
237 byte[] hash = HashProvider.ComputeHash(stream); 237 // byte[] hash = HashProvider.ComputeHash(stream);
238 238
239 return false; 239 return false;
240 } 240 }
diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
index f7a1fdc..99560a0 100644
--- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
+++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
@@ -297,7 +297,7 @@ namespace OpenSim.Data.SQLite
297 public string getVersion() 297 public string getVersion()
298 { 298 {
299 Module module = GetType().Module; 299 Module module = GetType().Module;
300 string dllName = module.Assembly.ManifestModule.Name; 300 // string dllName = module.Assembly.ManifestModule.Name;
301 Version dllVersion = module.Assembly.GetName().Version; 301 Version dllVersion = module.Assembly.GetName().Version;
302 302
303 303
@@ -741,17 +741,17 @@ namespace OpenSim.Data.SQLite
741 /// 741 ///
742 /// </summary> 742 /// </summary>
743 /// <param name="conn"></param> 743 /// <param name="conn"></param>
744 private static void InitDB(SqliteConnection conn) 744 // private static void InitDB(SqliteConnection conn)
745 { 745 // {
746 string createInventoryItems = defineTable(createInventoryItemsTable()); 746 // string createInventoryItems = defineTable(createInventoryItemsTable());
747 string createInventoryFolders = defineTable(createInventoryFoldersTable()); 747 // string createInventoryFolders = defineTable(createInventoryFoldersTable());
748 748
749 SqliteCommand pcmd = new SqliteCommand(createInventoryItems, conn); 749 // SqliteCommand pcmd = new SqliteCommand(createInventoryItems, conn);
750 SqliteCommand scmd = new SqliteCommand(createInventoryFolders, conn); 750 // SqliteCommand scmd = new SqliteCommand(createInventoryFolders, conn);
751 751
752 pcmd.ExecuteNonQuery(); 752 // pcmd.ExecuteNonQuery();
753 scmd.ExecuteNonQuery(); 753 // scmd.ExecuteNonQuery();
754 } 754 // }
755 755
756 /// <summary> 756 /// <summary>
757 /// 757 ///
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs
index 86f4370..13d444e 100644
--- a/OpenSim/Data/SQLite/SQLiteRegionData.cs
+++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs
@@ -1686,27 +1686,27 @@ namespace OpenSim.Data.SQLite
1686 /// </summary> 1686 /// </summary>
1687 /// <param name="dt">Data Table</param> 1687 /// <param name="dt">Data Table</param>
1688 /// <returns></returns> 1688 /// <returns></returns>
1689 private static string defineTable(DataTable dt) 1689 // private static string defineTable(DataTable dt)
1690 { 1690 // {
1691 string sql = "create table " + dt.TableName + "("; 1691 // string sql = "create table " + dt.TableName + "(";
1692 string subsql = String.Empty; 1692 // string subsql = String.Empty;
1693 foreach (DataColumn col in dt.Columns) 1693 // foreach (DataColumn col in dt.Columns)
1694 { 1694 // {
1695 if (subsql.Length > 0) 1695 // if (subsql.Length > 0)
1696 { 1696 // {
1697 // a map function would rock so much here 1697 // // a map function would rock so much here
1698 subsql += ",\n"; 1698 // subsql += ",\n";
1699 } 1699 // }
1700 subsql += col.ColumnName + " " + sqliteType(col.DataType); 1700 // subsql += col.ColumnName + " " + sqliteType(col.DataType);
1701 if (dt.PrimaryKey.Length > 0 && col == dt.PrimaryKey[0]) 1701 // if (dt.PrimaryKey.Length > 0 && col == dt.PrimaryKey[0])
1702 { 1702 // {
1703 subsql += " primary key"; 1703 // subsql += " primary key";
1704 } 1704 // }
1705 } 1705 // }
1706 sql += subsql; 1706 // sql += subsql;
1707 sql += ")"; 1707 // sql += ")";
1708 return sql; 1708 // return sql;
1709 } 1709 // }
1710 1710
1711 /*********************************************************************** 1711 /***********************************************************************
1712 * 1712 *
@@ -2083,32 +2083,32 @@ namespace OpenSim.Data.SQLite
2083 /// <param name="type">a Type</param> 2083 /// <param name="type">a Type</param>
2084 /// <returns>an sqliteType</returns> 2084 /// <returns>an sqliteType</returns>
2085 /// <remarks>this is something we'll need to implement for each db slightly differently.</remarks> 2085 /// <remarks>this is something we'll need to implement for each db slightly differently.</remarks>
2086 private static string sqliteType(Type type) 2086 // private static string sqliteType(Type type)
2087 { 2087 // {
2088 if (type == typeof (String)) 2088 // if (type == typeof (String))
2089 { 2089 // {
2090 return "varchar(255)"; 2090 // return "varchar(255)";
2091 } 2091 // }
2092 else if (type == typeof (Int32)) 2092 // else if (type == typeof (Int32))
2093 { 2093 // {
2094 return "integer"; 2094 // return "integer";
2095 } 2095 // }
2096 else if (type == typeof (Int64)) 2096 // else if (type == typeof (Int64))
2097 { 2097 // {
2098 return "integer"; 2098 // return "integer";
2099 } 2099 // }
2100 else if (type == typeof (Double)) 2100 // else if (type == typeof (Double))
2101 { 2101 // {
2102 return "float"; 2102 // return "float";
2103 } 2103 // }
2104 else if (type == typeof (Byte[])) 2104 // else if (type == typeof (Byte[]))
2105 { 2105 // {
2106 return "blob"; 2106 // return "blob";
2107 } 2107 // }
2108 else 2108 // else
2109 { 2109 // {
2110 return "string"; 2110 // return "string";
2111 } 2111 // }
2112 } 2112 // }
2113 } 2113 }
2114} 2114}
diff --git a/OpenSim/Data/SQLite/SQLiteUserData.cs b/OpenSim/Data/SQLite/SQLiteUserData.cs
index 24c7944..c7673bd 100644
--- a/OpenSim/Data/SQLite/SQLiteUserData.cs
+++ b/OpenSim/Data/SQLite/SQLiteUserData.cs
@@ -557,8 +557,8 @@ namespace OpenSim.Data.SQLite
557 try { 557 try {
558 aa = aplist[user]; 558 aa = aplist[user];
559 m_log.Info("[APPEARANCE] Found appearance for " + user.ToString() + aa.ToString()); 559 m_log.Info("[APPEARANCE] Found appearance for " + user.ToString() + aa.ToString());
560 } catch (System.Collections.Generic.KeyNotFoundException e) { 560 } catch (System.Collections.Generic.KeyNotFoundException) {
561 m_log.Info("[APPEARANCE] No appearance found for " + user.ToString()); 561 m_log.InfoFormat("[APPEARANCE] No appearance found for {0}", user.ToString());
562 } 562 }
563 return aa; 563 return aa;
564 } 564 }
@@ -971,7 +971,7 @@ namespace OpenSim.Data.SQLite
971 private static bool TestTables(SqliteConnection conn, Migration m) 971 private static bool TestTables(SqliteConnection conn, Migration m)
972 { 972 {
973 SqliteCommand cmd = new SqliteCommand(userSelect, conn); 973 SqliteCommand cmd = new SqliteCommand(userSelect, conn);
974 SqliteCommand fcmd = new SqliteCommand(userFriendsSelect, conn); 974 // SqliteCommand fcmd = new SqliteCommand(userFriendsSelect, conn);
975 SqliteDataAdapter pDa = new SqliteDataAdapter(cmd); 975 SqliteDataAdapter pDa = new SqliteDataAdapter(cmd);
976 SqliteDataAdapter fDa = new SqliteDataAdapter(cmd); 976 SqliteDataAdapter fDa = new SqliteDataAdapter(cmd);
977 977