diff options
author | UbitUmarov | 2015-09-03 18:39:08 +0100 |
---|---|---|
committer | UbitUmarov | 2015-09-03 18:39:08 +0100 |
commit | cdaed113872f0615a0d2864cc54064a4432054c6 (patch) | |
tree | 246e62dfeffac632cdcd9738a77faebd30b3bd6c /OpenSim/Data | |
parent | seems to compile ( tests comented out) (diff) | |
download | opensim-SC-cdaed113872f0615a0d2864cc54064a4432054c6.zip opensim-SC-cdaed113872f0615a0d2864cc54064a4432054c6.tar.gz opensim-SC-cdaed113872f0615a0d2864cc54064a4432054c6.tar.bz2 opensim-SC-cdaed113872f0615a0d2864cc54064a4432054c6.tar.xz |
at last we can login and see objects ( friends is dead and disable in
scenepresence)
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLFramework.cs | 29 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLSimulationData.cs | 101 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLUserAccountData.cs | 6 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLUserProfilesData.cs | 1 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/Resources/RegionStore.migrations | 4 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/Resources/UserProfiles.migrations | 3 | ||||
-rw-r--r-- | OpenSim/Data/PGSQL/Resources/UserProfiles.migrations | 3 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/Resources/UserProfiles.migrations | 12 |
8 files changed, 66 insertions, 93 deletions
diff --git a/OpenSim/Data/MySQL/MySQLFramework.cs b/OpenSim/Data/MySQL/MySQLFramework.cs index a522912..34791cf 100644 --- a/OpenSim/Data/MySQL/MySQLFramework.cs +++ b/OpenSim/Data/MySQL/MySQLFramework.cs | |||
@@ -60,32 +60,31 @@ namespace OpenSim.Data.MySQL | |||
60 | protected int ExecuteNonQuery(MySqlCommand cmd) | 60 | protected int ExecuteNonQuery(MySqlCommand cmd) |
61 | { | 61 | { |
62 | lock (m_dbLock) | 62 | lock (m_dbLock) |
63 | using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) | ||
64 | { | 63 | { |
65 | dbcon.Open(); | 64 | using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) |
66 | cmd.Connection = dbcon; | ||
67 | |||
68 | try | ||
69 | { | 65 | { |
70 | dbcon.Open(); | ||
71 | cmd.Connection = dbcon; | ||
72 | |||
73 | try | 66 | try |
74 | { | 67 | { |
75 | return cmd.ExecuteNonQuery(); | 68 | dbcon.Open(); |
69 | cmd.Connection = dbcon; | ||
70 | |||
71 | try | ||
72 | { | ||
73 | return cmd.ExecuteNonQuery(); | ||
74 | } | ||
75 | catch (Exception e) | ||
76 | { | ||
77 | m_log.Error(e.Message, e); | ||
78 | m_log.Error(Environment.StackTrace.ToString()); | ||
79 | return 0; | ||
80 | } | ||
76 | } | 81 | } |
77 | catch (Exception e) | 82 | catch (Exception e) |
78 | { | 83 | { |
79 | m_log.Error(e.Message, e); | 84 | m_log.Error(e.Message, e); |
80 | m_log.Error(Environment.StackTrace.ToString()); | ||
81 | return 0; | 85 | return 0; |
82 | } | 86 | } |
83 | } | 87 | } |
84 | catch (Exception e) | ||
85 | { | ||
86 | m_log.Error(e.Message, e); | ||
87 | return 0; | ||
88 | } | ||
89 | } | 88 | } |
90 | } | 89 | } |
91 | } | 90 | } |
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index 549d129..a62d347 100644 --- a/OpenSim/Data/MySQL/MySQLSimulationData.cs +++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs | |||
@@ -1089,42 +1089,43 @@ namespace OpenSim.Data.MySQL | |||
1089 | using (MySqlCommand cmd = dbcon.CreateCommand()) | 1089 | using (MySqlCommand cmd = dbcon.CreateCommand()) |
1090 | { | 1090 | { |
1091 | cmd.CommandText = "replace into regionsettings (regionUUID, " + | 1091 | cmd.CommandText = "replace into regionsettings (regionUUID, " + |
1092 | "block_terraform, block_fly, allow_damage, " + | 1092 | "block_terraform, block_fly, allow_damage, " + |
1093 | "restrict_pushing, allow_land_resell, " + | 1093 | "restrict_pushing, allow_land_resell, " + |
1094 | "allow_land_join_divide, block_show_in_search, " + | 1094 | "allow_land_join_divide, block_show_in_search, " + |
1095 | "agent_limit, object_bonus, maturity, " + | 1095 | "agent_limit, object_bonus, maturity, " + |
1096 | "disable_scripts, disable_collisions, " + | 1096 | "disable_scripts, disable_collisions, " + |
1097 | "disable_physics, terrain_texture_1, " + | 1097 | "disable_physics, terrain_texture_1, " + |
1098 | "terrain_texture_2, terrain_texture_3, " + | 1098 | "terrain_texture_2, terrain_texture_3, " + |
1099 | "terrain_texture_4, elevation_1_nw, " + | 1099 | "terrain_texture_4, elevation_1_nw, " + |
1100 | "elevation_2_nw, elevation_1_ne, " + | 1100 | "elevation_2_nw, elevation_1_ne, " + |
1101 | "elevation_2_ne, elevation_1_se, " + | 1101 | "elevation_2_ne, elevation_1_se, " + |
1102 | "elevation_2_se, elevation_1_sw, " + | 1102 | "elevation_2_se, elevation_1_sw, " + |
1103 | "elevation_2_sw, water_height, " + | 1103 | "elevation_2_sw, water_height, " + |
1104 | "terrain_raise_limit, terrain_lower_limit, " + | 1104 | "terrain_raise_limit, terrain_lower_limit, " + |
1105 | "use_estate_sun, fixed_sun, sun_position, " + | 1105 | "use_estate_sun, fixed_sun, sun_position, " + |
1106 | "covenant, covenant_datetime, Sandbox, sunvectorx, sunvectory, " + | 1106 | "covenant, covenant_datetime, Sandbox, sunvectorx, sunvectory, " + |
1107 | "sunvectorz, loaded_creation_datetime, " + | 1107 | "sunvectorz, loaded_creation_datetime, " + |
1108 | "loaded_creation_id, map_tile_ID, block_search, casino, " + | 1108 | "loaded_creation_id, map_tile_ID, block_search, casino, " + |
1109 | "TelehubObject, parcel_tile_ID) " + | 1109 | "TelehubObject, parcel_tile_ID) " + |
1110 | "values (?RegionUUID, ?BlockTerraform, " + | 1110 | "values (?RegionUUID, ?BlockTerraform, " + |
1111 | "?BlockFly, ?AllowDamage, ?RestrictPushing, " + | 1111 | "?BlockFly, ?AllowDamage, ?RestrictPushing, " + |
1112 | "?AllowLandResell, ?AllowLandJoinDivide, " + | 1112 | "?AllowLandResell, ?AllowLandJoinDivide, " + |
1113 | "?BlockShowInSearch, ?AgentLimit, ?ObjectBonus, " + | 1113 | "?BlockShowInSearch, ?AgentLimit, ?ObjectBonus, " + |
1114 | "?Maturity, ?DisableScripts, ?DisableCollisions, " + | 1114 | "?Maturity, ?DisableScripts, ?DisableCollisions, " + |
1115 | "?DisablePhysics, ?TerrainTexture1, " + | 1115 | "?DisablePhysics, ?TerrainTexture1, " + |
1116 | "?TerrainTexture2, ?TerrainTexture3, " + | 1116 | "?TerrainTexture2, ?TerrainTexture3, " + |
1117 | "?TerrainTexture4, ?Elevation1NW, ?Elevation2NW, " + | 1117 | "?TerrainTexture4, ?Elevation1NW, ?Elevation2NW, " + |
1118 | "?Elevation1NE, ?Elevation2NE, ?Elevation1SE, " + | 1118 | "?Elevation1NE, ?Elevation2NE, ?Elevation1SE, " + |
1119 | "?Elevation2SE, ?Elevation1SW, ?Elevation2SW, " + | 1119 | "?Elevation2SE, ?Elevation1SW, ?Elevation2SW, " + |
1120 | "?WaterHeight, ?TerrainRaiseLimit, " + | 1120 | "?WaterHeight, ?TerrainRaiseLimit, " + |
1121 | "?TerrainLowerLimit, ?UseEstateSun, ?FixedSun, " + | 1121 | "?TerrainLowerLimit, ?UseEstateSun, ?FixedSun, " + |
1122 | "?SunPosition, ?Covenant, ?CovenantChangedDateTime, ?Sandbox, " + | 1122 | "?SunPosition, ?Covenant, ?CovenantChangedDateTime, ?Sandbox, " + |
1123 | "?SunVectorX, ?SunVectorY, ?SunVectorZ, " + | 1123 | "?SunVectorX, ?SunVectorY, ?SunVectorZ, " + |
1124 | "?LoadedCreationDateTime, ?LoadedCreationID, " + | 1124 | "?LoadedCreationDateTime, ?LoadedCreationID, " + |
1125 | "?TerrainImageID, ?block_search, ?casino, " + | 1125 | "?TerrainImageID, ?block_search, ?casino, " + |
1126 | "?TelehubObject, ?ParcelImageID)"; | 1126 | "?TelehubObject, ?ParcelImageID)"; |
1127 | 1127 | ||
1128 | FillRegionSettingsCommand(cmd, rs); | ||
1128 | ExecuteNonQuery(cmd); | 1129 | ExecuteNonQuery(cmd); |
1129 | } | 1130 | } |
1130 | 1131 | ||
@@ -1567,34 +1568,6 @@ namespace OpenSim.Data.MySQL | |||
1567 | } | 1568 | } |
1568 | 1569 | ||
1569 | /// <summary> | 1570 | /// <summary> |
1570 | /// | ||
1571 | /// </summary> | ||
1572 | /// <param name="val"></param> | ||
1573 | /// <returns></returns> | ||
1574 | private static Array SerializeTerrain(double[,] val, double[,] oldTerrain) | ||
1575 | { | ||
1576 | MemoryStream str = new MemoryStream(((int)Constants.RegionSize * (int)Constants.RegionSize) *sizeof (double)); | ||
1577 | BinaryWriter bw = new BinaryWriter(str); | ||
1578 | |||
1579 | // TODO: COMPATIBILITY - Add byte-order conversions | ||
1580 | for (int x = 0; x < (int)Constants.RegionSize; x++) | ||
1581 | for (int y = 0; y < (int)Constants.RegionSize; y++) | ||
1582 | { | ||
1583 | double height = 20.0; | ||
1584 | if (oldTerrain != null) | ||
1585 | height = oldTerrain[x, y]; | ||
1586 | if (!double.IsNaN(val[x, y])) | ||
1587 | height = val[x, y]; | ||
1588 | if (height == 0.0) | ||
1589 | height = double.Epsilon; | ||
1590 | |||
1591 | bw.Write(height); | ||
1592 | } | ||
1593 | |||
1594 | return str.ToArray(); | ||
1595 | } | ||
1596 | |||
1597 | /// <summary> | ||
1598 | /// Fill the prim command with prim values | 1571 | /// Fill the prim command with prim values |
1599 | /// </summary> | 1572 | /// </summary> |
1600 | /// <param name="row"></param> | 1573 | /// <param name="row"></param> |
diff --git a/OpenSim/Data/MySQL/MySQLUserAccountData.cs b/OpenSim/Data/MySQL/MySQLUserAccountData.cs index 4ff3175..59cfe70 100644 --- a/OpenSim/Data/MySQL/MySQLUserAccountData.cs +++ b/OpenSim/Data/MySQL/MySQLUserAccountData.cs | |||
@@ -71,14 +71,14 @@ namespace OpenSim.Data.MySQL | |||
71 | if (words.Length == 1) | 71 | if (words.Length == 1) |
72 | { | 72 | { |
73 | cmd.CommandText = String.Format("select * from {0} where (ScopeID=?ScopeID or ScopeID='00000000-0000-0000-0000-000000000000') and (FirstName like ?search or LastName like ?search) and active=1", m_Realm); | 73 | cmd.CommandText = String.Format("select * from {0} where (ScopeID=?ScopeID or ScopeID='00000000-0000-0000-0000-000000000000') and (FirstName like ?search or LastName like ?search) and active=1", m_Realm); |
74 | cmd.Parameters.AddWithValue("?search", words[0] + "%"); | 74 | cmd.Parameters.AddWithValue("?search", "%" + words[0] + "%"); |
75 | cmd.Parameters.AddWithValue("?ScopeID", scopeID.ToString()); | 75 | cmd.Parameters.AddWithValue("?ScopeID", scopeID.ToString()); |
76 | } | 76 | } |
77 | else | 77 | else |
78 | { | 78 | { |
79 | cmd.CommandText = String.Format("select * from {0} where (ScopeID=?ScopeID or ScopeID='00000000-0000-0000-0000-000000000000') and (FirstName like ?searchFirst and LastName like ?searchLast) and active=1", m_Realm); | 79 | cmd.CommandText = String.Format("select * from {0} where (ScopeID=?ScopeID or ScopeID='00000000-0000-0000-0000-000000000000') and (FirstName like ?searchFirst and LastName like ?searchLast) and active=1", m_Realm); |
80 | cmd.Parameters.AddWithValue("?searchFirst", words[0] + "%"); | 80 | cmd.Parameters.AddWithValue("?searchFirst", "%" + words[0] + "%"); |
81 | cmd.Parameters.AddWithValue("?searchLast", words[1] + "%"); | 81 | cmd.Parameters.AddWithValue("?searchLast", "%" + words[1] + "%"); |
82 | cmd.Parameters.AddWithValue("?ScopeID", scopeID.ToString()); | 82 | cmd.Parameters.AddWithValue("?ScopeID", scopeID.ToString()); |
83 | } | 83 | } |
84 | 84 | ||
diff --git a/OpenSim/Data/MySQL/MySQLUserProfilesData.cs b/OpenSim/Data/MySQL/MySQLUserProfilesData.cs index c241e90..295e131 100644 --- a/OpenSim/Data/MySQL/MySQLUserProfilesData.cs +++ b/OpenSim/Data/MySQL/MySQLUserProfilesData.cs | |||
@@ -914,7 +914,6 @@ namespace OpenSim.Data.MySQL | |||
914 | using (MySqlCommand cmd = new MySqlCommand(query, dbcon)) | 914 | using (MySqlCommand cmd = new MySqlCommand(query, dbcon)) |
915 | { | 915 | { |
916 | cmd.Parameters.AddWithValue("?Id", pref.UserId.ToString()); | 916 | cmd.Parameters.AddWithValue("?Id", pref.UserId.ToString()); |
917 | |||
918 | using (MySqlDataReader reader = cmd.ExecuteReader()) | 917 | using (MySqlDataReader reader = cmd.ExecuteReader()) |
919 | { | 918 | { |
920 | if (reader.HasRows) | 919 | if (reader.HasRows) |
diff --git a/OpenSim/Data/MySQL/Resources/RegionStore.migrations b/OpenSim/Data/MySQL/Resources/RegionStore.migrations index 738f5c2..097271a 100644 --- a/OpenSim/Data/MySQL/Resources/RegionStore.migrations +++ b/OpenSim/Data/MySQL/Resources/RegionStore.migrations | |||
@@ -939,7 +939,6 @@ ALTER TABLE prims ADD COLUMN AttachedPosY double default 0; | |||
939 | ALTER TABLE prims ADD COLUMN AttachedPosZ double default 0; | 939 | ALTER TABLE prims ADD COLUMN AttachedPosZ double default 0; |
940 | ALTER TABLE primshapes ADD COLUMN LastAttachPoint int(4) not null default '0'; | 940 | ALTER TABLE primshapes ADD COLUMN LastAttachPoint int(4) not null default '0'; |
941 | COMMIT; | 941 | COMMIT; |
942 | <<<<<<< HEAD | ||
943 | 942 | ||
944 | :VERSION 50 #---- Change LandFlags to unsigned | 943 | :VERSION 50 #---- Change LandFlags to unsigned |
945 | 944 | ||
@@ -948,6 +947,3 @@ BEGIN; | |||
948 | ALTER TABLE land CHANGE COLUMN LandFlags LandFlags int unsigned default null; | 947 | ALTER TABLE land CHANGE COLUMN LandFlags LandFlags int unsigned default null; |
949 | 948 | ||
950 | COMMIT; | 949 | COMMIT; |
951 | |||
952 | ======= | ||
953 | >>>>>>> avn/ubitvar | ||
diff --git a/OpenSim/Data/MySQL/Resources/UserProfiles.migrations b/OpenSim/Data/MySQL/Resources/UserProfiles.migrations index 3df9b9b..87e99fa 100644 --- a/OpenSim/Data/MySQL/Resources/UserProfiles.migrations +++ b/OpenSim/Data/MySQL/Resources/UserProfiles.migrations | |||
@@ -81,7 +81,6 @@ CREATE TABLE IF NOT EXISTS `userdata` ( | |||
81 | 81 | ||
82 | commit; | 82 | commit; |
83 | 83 | ||
84 | <<<<<<< HEAD | ||
85 | :VERSION 3 # ------------------------------- | 84 | :VERSION 3 # ------------------------------- |
86 | begin; | 85 | begin; |
87 | CREATE TABLE IF NOT EXISTS `usersettings` ( | 86 | CREATE TABLE IF NOT EXISTS `usersettings` ( |
@@ -97,5 +96,3 @@ commit; | |||
97 | begin; | 96 | begin; |
98 | ALTER TABLE userpicks ADD COLUMN gatekeeper varchar(255); | 97 | ALTER TABLE userpicks ADD COLUMN gatekeeper varchar(255); |
99 | commit; | 98 | commit; |
100 | ======= | ||
101 | >>>>>>> avn/ubitvar | ||
diff --git a/OpenSim/Data/PGSQL/Resources/UserProfiles.migrations b/OpenSim/Data/PGSQL/Resources/UserProfiles.migrations index a67107a..c1580b2 100644 --- a/OpenSim/Data/PGSQL/Resources/UserProfiles.migrations +++ b/OpenSim/Data/PGSQL/Resources/UserProfiles.migrations | |||
@@ -81,7 +81,6 @@ CREATE TABLE userdata ( | |||
81 | 81 | ||
82 | commit; | 82 | commit; |
83 | 83 | ||
84 | <<<<<<< HEAD | ||
85 | :VERSION 3 # ------------------------------- | 84 | :VERSION 3 # ------------------------------- |
86 | begin; | 85 | begin; |
87 | CREATE TABLE usersettings ( | 86 | CREATE TABLE usersettings ( |
@@ -154,5 +153,3 @@ BEGIN; | |||
154 | ALTER TABLE usersettings ALTER COLUMN imviaemail SET DATA TYPE boolean USING CASE WHEN false THEN false ELSE true END; | 153 | ALTER TABLE usersettings ALTER COLUMN imviaemail SET DATA TYPE boolean USING CASE WHEN false THEN false ELSE true END; |
155 | 154 | ||
156 | COMMIT; | 155 | COMMIT; |
157 | ======= | ||
158 | >>>>>>> avn/ubitvar | ||
diff --git a/OpenSim/Data/SQLite/Resources/UserProfiles.migrations b/OpenSim/Data/SQLite/Resources/UserProfiles.migrations index 16581f6..207dde0 100644 --- a/OpenSim/Data/SQLite/Resources/UserProfiles.migrations +++ b/OpenSim/Data/SQLite/Resources/UserProfiles.migrations | |||
@@ -88,3 +88,15 @@ CREATE TABLE IF NOT EXISTS userdata ( | |||
88 | 88 | ||
89 | commit; | 89 | commit; |
90 | 90 | ||
91 | |||
92 | :VERSION 3 # ------------------------------- | ||
93 | |||
94 | begin; | ||
95 | CREATE TABLE IF NOT EXISTS usersettings ( | ||
96 | useruuid char(36) NOT NULL, | ||
97 | imviaemail binary(1) NOT NULL, | ||
98 | visible binary(1) NOT NULL, | ||
99 | email varchar(254) NOT NULL, | ||
100 | PRIMARY KEY (useruuid) | ||
101 | ) | ||
102 | commit; | ||