diff options
author | Sean Dague | 2009-06-29 15:05:12 +0000 |
---|---|---|
committer | Sean Dague | 2009-06-29 15:05:12 +0000 |
commit | 3dc2010da6412941bfbcdb29007b12a8f37b7bef (patch) | |
tree | f9fa0ad53b712d91d8fcc21aa6513c8a94dd4bf4 /OpenSim/Data/MySQL | |
parent | Thank you kindly, Godfrey, for a patch that: (diff) | |
download | opensim-SC-3dc2010da6412941bfbcdb29007b12a8f37b7bef.zip opensim-SC-3dc2010da6412941bfbcdb29007b12a8f37b7bef.tar.gz opensim-SC-3dc2010da6412941bfbcdb29007b12a8f37b7bef.tar.bz2 opensim-SC-3dc2010da6412941bfbcdb29007b12a8f37b7bef.tar.xz |
From: Chris Yeoh <yeohc@au1.ibm.com>
Attached is a patch that changes the oar file saving of creation date/time to an integer
instead of a string. I did this after justincc emailed me saying there is a problem
with internationalisation doing it the old way and I said I'd fix it. Its been
tested with MySQL and I've made the changes for MSSQL but that hasn't been well tested.
Diffstat (limited to 'OpenSim/Data/MySQL')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLRegionData.cs | 17 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/Resources/031_RegionStore.sql | 7 |
2 files changed, 11 insertions, 13 deletions
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs index 72c089e..a72ae45 100644 --- a/OpenSim/Data/MySQL/MySQLRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLRegionData.cs | |||
@@ -741,7 +741,7 @@ namespace OpenSim.Data.MySQL | |||
741 | "terrain_raise_limit, terrain_lower_limit, " + | 741 | "terrain_raise_limit, terrain_lower_limit, " + |
742 | "use_estate_sun, fixed_sun, sun_position, " + | 742 | "use_estate_sun, fixed_sun, sun_position, " + |
743 | "covenant, Sandbox, sunvectorx, sunvectory, " + | 743 | "covenant, Sandbox, sunvectorx, sunvectory, " + |
744 | "sunvectorz, loaded_creation_date, loaded_creation_time, " + | 744 | "sunvectorz, loaded_creation_datetime, " + |
745 | "loaded_creation_id) values ( ?RegionUUID, ?BlockTerraform, " + | 745 | "loaded_creation_id) values ( ?RegionUUID, ?BlockTerraform, " + |
746 | "?BlockFly, ?AllowDamage, ?RestrictPushing, " + | 746 | "?BlockFly, ?AllowDamage, ?RestrictPushing, " + |
747 | "?AllowLandResell, ?AllowLandJoinDivide, " + | 747 | "?AllowLandResell, ?AllowLandJoinDivide, " + |
@@ -756,7 +756,7 @@ namespace OpenSim.Data.MySQL | |||
756 | "?TerrainLowerLimit, ?UseEstateSun, ?FixedSun, " + | 756 | "?TerrainLowerLimit, ?UseEstateSun, ?FixedSun, " + |
757 | "?SunPosition, ?Covenant, ?Sandbox, " + | 757 | "?SunPosition, ?Covenant, ?Sandbox, " + |
758 | "?SunVectorX, ?SunVectorY, ?SunVectorZ, " + | 758 | "?SunVectorX, ?SunVectorY, ?SunVectorZ, " + |
759 | "?LoadedCreationDate, ?LoadedCreationTime, ?LoadedCreationID)"; | 759 | "?LoadedCreationDateTime, ?LoadedCreationID)"; |
760 | 760 | ||
761 | FillRegionSettingsCommand(cmd, rs); | 761 | FillRegionSettingsCommand(cmd, rs); |
762 | 762 | ||
@@ -1042,15 +1042,7 @@ namespace OpenSim.Data.MySQL | |||
1042 | newSettings.SunPosition = Convert.ToDouble(row["sun_position"]); | 1042 | newSettings.SunPosition = Convert.ToDouble(row["sun_position"]); |
1043 | newSettings.Covenant = new UUID((String) row["covenant"]); | 1043 | newSettings.Covenant = new UUID((String) row["covenant"]); |
1044 | 1044 | ||
1045 | if (row["loaded_creation_date"] is DBNull) | 1045 | newSettings.LoadedCreationDateTime = Convert.ToInt32(row["loaded_creation_datetime"]); |
1046 | newSettings.LoadedCreationDate = ""; | ||
1047 | else | ||
1048 | newSettings.LoadedCreationDate = (String) row["loaded_creation_date"]; | ||
1049 | |||
1050 | if (row["loaded_creation_time"] is DBNull) | ||
1051 | newSettings.LoadedCreationTime = ""; | ||
1052 | else | ||
1053 | newSettings.LoadedCreationTime = (String) row["loaded_creation_time"]; | ||
1054 | 1046 | ||
1055 | if (row["loaded_creation_id"] is DBNull) | 1047 | if (row["loaded_creation_id"] is DBNull) |
1056 | newSettings.LoadedCreationID = ""; | 1048 | newSettings.LoadedCreationID = ""; |
@@ -1375,8 +1367,7 @@ namespace OpenSim.Data.MySQL | |||
1375 | cmd.Parameters.AddWithValue("FixedSun", settings.FixedSun); | 1367 | cmd.Parameters.AddWithValue("FixedSun", settings.FixedSun); |
1376 | cmd.Parameters.AddWithValue("SunPosition", settings.SunPosition); | 1368 | cmd.Parameters.AddWithValue("SunPosition", settings.SunPosition); |
1377 | cmd.Parameters.AddWithValue("Covenant", settings.Covenant.ToString()); | 1369 | cmd.Parameters.AddWithValue("Covenant", settings.Covenant.ToString()); |
1378 | cmd.Parameters.AddWithValue("LoadedCreationDate", settings.LoadedCreationDate); | 1370 | cmd.Parameters.AddWithValue("LoadedCreationDateTime", settings.LoadedCreationDate); |
1379 | cmd.Parameters.AddWithValue("LoadedCreationTime", settings.LoadedCreationTime); | ||
1380 | cmd.Parameters.AddWithValue("LoadedCreationID", settings.LoadedCreationID); | 1371 | cmd.Parameters.AddWithValue("LoadedCreationID", settings.LoadedCreationID); |
1381 | 1372 | ||
1382 | } | 1373 | } |
diff --git a/OpenSim/Data/MySQL/Resources/031_RegionStore.sql b/OpenSim/Data/MySQL/Resources/031_RegionStore.sql new file mode 100644 index 0000000..d069296 --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/031_RegionStore.sql | |||
@@ -0,0 +1,7 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE regionsettings DROP COLUMN loaded_creation_date; | ||
4 | ALTER TABLE regionsettings DROP COLUMN loaded_creation_time; | ||
5 | ALTER TABLE regionsettings ADD COLUMN loaded_creation_datetime int unsigned NOT NULL default 0; | ||
6 | |||
7 | COMMIT; | ||