mirror of
https://github.com/opensim/opensim.git
synced 2026-05-15 03:15:41 +08:00
at last we can login and see objects ( friends is dead and disable in
scenepresence)
This commit is contained in:
@@ -60,32 +60,31 @@ namespace OpenSim.Data.MySQL
|
||||
protected int ExecuteNonQuery(MySqlCommand cmd)
|
||||
{
|
||||
lock (m_dbLock)
|
||||
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
|
||||
{
|
||||
dbcon.Open();
|
||||
cmd.Connection = dbcon;
|
||||
|
||||
try
|
||||
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
|
||||
{
|
||||
dbcon.Open();
|
||||
cmd.Connection = dbcon;
|
||||
|
||||
try
|
||||
{
|
||||
return cmd.ExecuteNonQuery();
|
||||
dbcon.Open();
|
||||
cmd.Connection = dbcon;
|
||||
|
||||
try
|
||||
{
|
||||
return cmd.ExecuteNonQuery();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Error(e.Message, e);
|
||||
m_log.Error(Environment.StackTrace.ToString());
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Error(e.Message, e);
|
||||
m_log.Error(Environment.StackTrace.ToString());
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Error(e.Message, e);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1089,42 +1089,43 @@ namespace OpenSim.Data.MySQL
|
||||
using (MySqlCommand cmd = dbcon.CreateCommand())
|
||||
{
|
||||
cmd.CommandText = "replace into regionsettings (regionUUID, " +
|
||||
"block_terraform, block_fly, allow_damage, " +
|
||||
"restrict_pushing, allow_land_resell, " +
|
||||
"allow_land_join_divide, block_show_in_search, " +
|
||||
"agent_limit, object_bonus, maturity, " +
|
||||
"disable_scripts, disable_collisions, " +
|
||||
"disable_physics, terrain_texture_1, " +
|
||||
"terrain_texture_2, terrain_texture_3, " +
|
||||
"terrain_texture_4, elevation_1_nw, " +
|
||||
"elevation_2_nw, elevation_1_ne, " +
|
||||
"elevation_2_ne, elevation_1_se, " +
|
||||
"elevation_2_se, elevation_1_sw, " +
|
||||
"elevation_2_sw, water_height, " +
|
||||
"terrain_raise_limit, terrain_lower_limit, " +
|
||||
"use_estate_sun, fixed_sun, sun_position, " +
|
||||
"covenant, covenant_datetime, Sandbox, sunvectorx, sunvectory, " +
|
||||
"sunvectorz, loaded_creation_datetime, " +
|
||||
"loaded_creation_id, map_tile_ID, block_search, casino, " +
|
||||
"TelehubObject, parcel_tile_ID) " +
|
||||
"values (?RegionUUID, ?BlockTerraform, " +
|
||||
"?BlockFly, ?AllowDamage, ?RestrictPushing, " +
|
||||
"?AllowLandResell, ?AllowLandJoinDivide, " +
|
||||
"?BlockShowInSearch, ?AgentLimit, ?ObjectBonus, " +
|
||||
"?Maturity, ?DisableScripts, ?DisableCollisions, " +
|
||||
"?DisablePhysics, ?TerrainTexture1, " +
|
||||
"?TerrainTexture2, ?TerrainTexture3, " +
|
||||
"?TerrainTexture4, ?Elevation1NW, ?Elevation2NW, " +
|
||||
"?Elevation1NE, ?Elevation2NE, ?Elevation1SE, " +
|
||||
"?Elevation2SE, ?Elevation1SW, ?Elevation2SW, " +
|
||||
"?WaterHeight, ?TerrainRaiseLimit, " +
|
||||
"?TerrainLowerLimit, ?UseEstateSun, ?FixedSun, " +
|
||||
"?SunPosition, ?Covenant, ?CovenantChangedDateTime, ?Sandbox, " +
|
||||
"?SunVectorX, ?SunVectorY, ?SunVectorZ, " +
|
||||
"?LoadedCreationDateTime, ?LoadedCreationID, " +
|
||||
"?TerrainImageID, ?block_search, ?casino, " +
|
||||
"?TelehubObject, ?ParcelImageID)";
|
||||
"block_terraform, block_fly, allow_damage, " +
|
||||
"restrict_pushing, allow_land_resell, " +
|
||||
"allow_land_join_divide, block_show_in_search, " +
|
||||
"agent_limit, object_bonus, maturity, " +
|
||||
"disable_scripts, disable_collisions, " +
|
||||
"disable_physics, terrain_texture_1, " +
|
||||
"terrain_texture_2, terrain_texture_3, " +
|
||||
"terrain_texture_4, elevation_1_nw, " +
|
||||
"elevation_2_nw, elevation_1_ne, " +
|
||||
"elevation_2_ne, elevation_1_se, " +
|
||||
"elevation_2_se, elevation_1_sw, " +
|
||||
"elevation_2_sw, water_height, " +
|
||||
"terrain_raise_limit, terrain_lower_limit, " +
|
||||
"use_estate_sun, fixed_sun, sun_position, " +
|
||||
"covenant, covenant_datetime, Sandbox, sunvectorx, sunvectory, " +
|
||||
"sunvectorz, loaded_creation_datetime, " +
|
||||
"loaded_creation_id, map_tile_ID, block_search, casino, " +
|
||||
"TelehubObject, parcel_tile_ID) " +
|
||||
"values (?RegionUUID, ?BlockTerraform, " +
|
||||
"?BlockFly, ?AllowDamage, ?RestrictPushing, " +
|
||||
"?AllowLandResell, ?AllowLandJoinDivide, " +
|
||||
"?BlockShowInSearch, ?AgentLimit, ?ObjectBonus, " +
|
||||
"?Maturity, ?DisableScripts, ?DisableCollisions, " +
|
||||
"?DisablePhysics, ?TerrainTexture1, " +
|
||||
"?TerrainTexture2, ?TerrainTexture3, " +
|
||||
"?TerrainTexture4, ?Elevation1NW, ?Elevation2NW, " +
|
||||
"?Elevation1NE, ?Elevation2NE, ?Elevation1SE, " +
|
||||
"?Elevation2SE, ?Elevation1SW, ?Elevation2SW, " +
|
||||
"?WaterHeight, ?TerrainRaiseLimit, " +
|
||||
"?TerrainLowerLimit, ?UseEstateSun, ?FixedSun, " +
|
||||
"?SunPosition, ?Covenant, ?CovenantChangedDateTime, ?Sandbox, " +
|
||||
"?SunVectorX, ?SunVectorY, ?SunVectorZ, " +
|
||||
"?LoadedCreationDateTime, ?LoadedCreationID, " +
|
||||
"?TerrainImageID, ?block_search, ?casino, " +
|
||||
"?TelehubObject, ?ParcelImageID)";
|
||||
|
||||
FillRegionSettingsCommand(cmd, rs);
|
||||
ExecuteNonQuery(cmd);
|
||||
}
|
||||
|
||||
@@ -1566,34 +1567,6 @@ namespace OpenSim.Data.MySQL
|
||||
return entry;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="val"></param>
|
||||
/// <returns></returns>
|
||||
private static Array SerializeTerrain(double[,] val, double[,] oldTerrain)
|
||||
{
|
||||
MemoryStream str = new MemoryStream(((int)Constants.RegionSize * (int)Constants.RegionSize) *sizeof (double));
|
||||
BinaryWriter bw = new BinaryWriter(str);
|
||||
|
||||
// TODO: COMPATIBILITY - Add byte-order conversions
|
||||
for (int x = 0; x < (int)Constants.RegionSize; x++)
|
||||
for (int y = 0; y < (int)Constants.RegionSize; y++)
|
||||
{
|
||||
double height = 20.0;
|
||||
if (oldTerrain != null)
|
||||
height = oldTerrain[x, y];
|
||||
if (!double.IsNaN(val[x, y]))
|
||||
height = val[x, y];
|
||||
if (height == 0.0)
|
||||
height = double.Epsilon;
|
||||
|
||||
bw.Write(height);
|
||||
}
|
||||
|
||||
return str.ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fill the prim command with prim values
|
||||
/// </summary>
|
||||
|
||||
@@ -71,14 +71,14 @@ namespace OpenSim.Data.MySQL
|
||||
if (words.Length == 1)
|
||||
{
|
||||
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);
|
||||
cmd.Parameters.AddWithValue("?search", words[0] + "%");
|
||||
cmd.Parameters.AddWithValue("?search", "%" + words[0] + "%");
|
||||
cmd.Parameters.AddWithValue("?ScopeID", scopeID.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
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);
|
||||
cmd.Parameters.AddWithValue("?searchFirst", words[0] + "%");
|
||||
cmd.Parameters.AddWithValue("?searchLast", words[1] + "%");
|
||||
cmd.Parameters.AddWithValue("?searchFirst", "%" + words[0] + "%");
|
||||
cmd.Parameters.AddWithValue("?searchLast", "%" + words[1] + "%");
|
||||
cmd.Parameters.AddWithValue("?ScopeID", scopeID.ToString());
|
||||
}
|
||||
|
||||
|
||||
@@ -914,7 +914,6 @@ namespace OpenSim.Data.MySQL
|
||||
using (MySqlCommand cmd = new MySqlCommand(query, dbcon))
|
||||
{
|
||||
cmd.Parameters.AddWithValue("?Id", pref.UserId.ToString());
|
||||
|
||||
using (MySqlDataReader reader = cmd.ExecuteReader())
|
||||
{
|
||||
if (reader.HasRows)
|
||||
|
||||
@@ -939,7 +939,6 @@ ALTER TABLE prims ADD COLUMN AttachedPosY double default 0;
|
||||
ALTER TABLE prims ADD COLUMN AttachedPosZ double default 0;
|
||||
ALTER TABLE primshapes ADD COLUMN LastAttachPoint int(4) not null default '0';
|
||||
COMMIT;
|
||||
<<<<<<< HEAD
|
||||
|
||||
:VERSION 50 #---- Change LandFlags to unsigned
|
||||
|
||||
@@ -948,6 +947,3 @@ BEGIN;
|
||||
ALTER TABLE land CHANGE COLUMN LandFlags LandFlags int unsigned default null;
|
||||
|
||||
COMMIT;
|
||||
|
||||
=======
|
||||
>>>>>>> avn/ubitvar
|
||||
|
||||
@@ -81,7 +81,6 @@ CREATE TABLE IF NOT EXISTS `userdata` (
|
||||
|
||||
commit;
|
||||
|
||||
<<<<<<< HEAD
|
||||
:VERSION 3 # -------------------------------
|
||||
begin;
|
||||
CREATE TABLE IF NOT EXISTS `usersettings` (
|
||||
@@ -97,5 +96,3 @@ commit;
|
||||
begin;
|
||||
ALTER TABLE userpicks ADD COLUMN gatekeeper varchar(255);
|
||||
commit;
|
||||
=======
|
||||
>>>>>>> avn/ubitvar
|
||||
|
||||
Reference in New Issue
Block a user