aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/SQLite/SQLiteRegionData.cs34
1 files changed, 34 insertions, 0 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs
index e075c22..01c63ef 100644
--- a/OpenSim/Data/SQLite/SQLiteRegionData.cs
+++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs
@@ -763,6 +763,7 @@ namespace OpenSim.Data.SQLite
763 createCol(land, "UserLookAtX", typeof (Double)); 763 createCol(land, "UserLookAtX", typeof (Double));
764 createCol(land, "UserLookAtY", typeof (Double)); 764 createCol(land, "UserLookAtY", typeof (Double));
765 createCol(land, "UserLookAtZ", typeof (Double)); 765 createCol(land, "UserLookAtZ", typeof (Double));
766 createCol(land, "AuthbuyerID", typeof(String));
766 767
767 land.PrimaryKey = new DataColumn[] {land.Columns["UUID"]}; 768 land.PrimaryKey = new DataColumn[] {land.Columns["UUID"]};
768 769
@@ -969,7 +970,40 @@ namespace OpenSim.Data.SQLite
969 new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]), 970 new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]),
970 Convert.ToSingle(row["UserLookAtZ"])); 971 Convert.ToSingle(row["UserLookAtZ"]));
971 newData.parcelAccessList = new List<ParcelManager.ParcelAccessEntry>(); 972 newData.parcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
973 LLUUID authBuyerID = LLUUID.Zero;
972 974
975 try
976 {
977 Helpers.TryParse((string)row["AuthbuyerID"], out authBuyerID);
978 }
979 catch (InvalidCastException)
980 {
981 // Database table was created before we got here and now has null values :P
982 try
983 {
984 m_conn.Open();
985 SqliteCommand cmd =
986 new SqliteCommand("ALTER TABLE land ADD COLUMN AuthbuyerID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000';", m_conn);
987 cmd.ExecuteNonQuery();
988 m_conn.Close();
989 m_conn.Dispose();
990
991 m_log.Error("[SQLITE]: The land table was recently updated. You need to restart the simulator. Exiting now.");
992
993 System.Threading.Thread.Sleep(10000);
994
995 // ICK! but it's better then A thousand red SQLITE error messages!
996 Environment.Exit(0);
997
998 }
999 catch (System.Exception)
1000 {
1001 // ICK! but it's better then A thousand red SQLITE error messages!
1002 m_log.Error("[SQLITE]: The land table was recently updated. You need to restart the simulator");
1003 Environment.Exit(0);
1004 }
1005 }
1006
973 return newData; 1007 return newData;
974 } 1008 }
975 1009