Commit Graph

1260 Commits (0.7.6.3)

Author SHA1 Message Date
Melanie e98d8d500f Fix logins and avatar appearance. Contains a Migration. May contain nuts.
This will cause visual params to be persisted along with worn items. With
this, alpha and tattoo laters will be saved. Multiple layers MAY work, but
not tested because I don't use Viewer 2.
2010-10-30 19:06:47 +01:00
Melanie 551015db63 Alphabetize results on region search by prefix matching 2010-10-18 20:29:00 +01:00
Melanie 2be93066da Bump migration version on LastSeen field so it is actually run 2010-10-18 19:08:26 +01:00
Diva Canto e039a8c8c2 UPdated the MySql driver to 6.2.4. Also established a much larger MySqlCommand timeout on fetching prims. 2010-10-15 15:43:06 -07:00
Justin Clark-Casey (justincc) aa60c4b129 fix build break 2010-10-13 22:18:57 +01:00
Melanie Thielker ccd5610997 Correctly update the LastSeen field 2010-10-13 18:41:09 +01:00
Melanie Thielker 01728fb19e Ensure no UUID.Zero region ID is ever written to presence. Add a Migration
to add a LastSeen field of type "Timestamp" to Presence for MySQL
2010-10-13 18:40:33 +01:00
Jeff Ames bc9f793a92 Formatting cleanup. 2010-10-04 21:28:17 -04:00
Teravus Ovares (Dan Olivares) acd5bbdb71 * One more item for CSharpSqlite
* Hopefully this will enable mac people to use SQLite again
* Someone cooler then me will need to figure out how to define CSharpSqlite with Mono so the conditional will pick up.
* There's also an error that occurs when you first load OpenSimulator under CSharpSQLite that goes away after.
* The databases are not byte for byte compatible.  Mono.Data.Sqlite is able to read CSharpSqlite made databases but not the reverse way.
2010-09-23 01:45:54 -04:00
Teravus Ovares (Dan Olivares) 983c6a74b1 * Add CSharpSqlite to prebuild
* Use a conditional define to determine whether we're using CSharpSqlite or Mono.Data.Sqlite
#if CSharpSqlite
    using Community.CsharpSqlite.Sqlite;
#else
    using Mono.Data.Sqlite;
#endif
* Hopefully, this will restore sqlite functionality on a Mac.  In visual studio, you can edit the OpenSim.Data.SQLite project, go to the Build tab and enter CSharpSqlite in the box.  I'm not sure how to define CSharpSqlite in Mono, someone better at it then me will have to take the job of figuring out the best way to define it in Mono.
2010-09-23 01:21:08 -04:00
Justin Clark-Casey (justincc) a22f007246 Improve the explanative text of migration failures
When running for the first time, people see migration failures because of sql statements that are trying to move data from old tables (e.g. users).  The amended text attempts to calm their nerves.
2010-09-18 03:37:10 +01:00
John Hurliman 860b2a502f Changed SceneObjectGroup to store parts with the fast and thread-safe MapAndArray collection 2010-09-16 17:30:46 -07:00
John Hurliman c03b24cbfd Merged 2010-09-12 14:21:51 -07:00
John Hurliman 0db1ed0b5a * Added ISimulationDataService and IEstateDataService
* Removed StorageManager
* CONFIG CHANGE: There are no more database settings in OpenSim.ini. Check the config-include configuration files for region store and estate store database settings
2010-09-12 14:20:26 -07:00
Jeff Ames f1f0bc23f4 Formatting cleanup. 2010-09-12 13:43:49 -04:00
Jeff Ames 20cd1da6bf Add copyright headers. 2010-09-12 12:54:31 -04:00
John Hurliman e2544584ad Changed all string references of "IRegionDataStore" to "ISimulationDataStore" 2010-09-11 22:02:34 -07:00
John Hurliman 109b517583 Fixed the naming mess around data connectors for simulation data 2010-09-11 20:43:06 -07:00
John Hurliman 47ac9f97b1 Re-enabled asset last access time logging in MySQL 2010-09-11 18:29:38 -07:00
John Hurliman dd277a0d02 First pass at cleaning up thread safety in EntityManager and SceneGraph 2010-09-10 12:04:12 -07:00
Justin Clark-Casey (justincc) 11f4a65f42 Fix deletion persistence when freshly delinked prims are removed
Previously, Scene.Inventory.DeRezObjects() forced the persistence of prims before deletion.
This is necessary so that freshly delinked prims can be deleted (otherwise they remain as parts of their old group and reappear on server restart).
However, DeRezObjects() deleted to user inventory, which is required by llDie() or direct region module unlink and deletion.
Therefore, forced persistence has been pushed down into Scene.UnlinkSceneObject() to be more general, this is still on the DeRezObjects() path.

Uncommented TestDelinkPersistence() since this now passes.
Tests required considerable elaboration of MockRegionDataPlugin to reflect underlying storing of parts.
2010-09-07 01:12:06 +01:00
Melanie Thielker 6a0a878f7c Remove "Dwell" support from core and replace it with calls to methods
on IDwellModule
2010-09-05 14:28:33 +01:00
Justin Clark-Casey (justincc) b9db495d91 Fix sqlite migration problems by moving migrations in 019_RegionStore.sql and 020 into RegionStore.migrations
This shows that panda is still not running the sqlite database tests since this change fixes the test failure in that area when "nant test" is executed locally
2010-09-01 22:06:56 +01:00
Melanie eefb207c1b Fix a casting operation to use ToString() 2010-08-30 02:10:11 +01:00
Jonathan Freedman 0a83fde85c Implements parcel media setting persistence and packet / CAPS handling
properly for the new media settings.

Signed-off-by: Melanie <melanie@t-data.com>
2010-08-30 02:07:55 +01:00
Justin Clark-Casey (justincc) 692cf3c657 Remove parts locking from data classes since these are using a copy of the scene object 2010-08-26 00:17:26 +01:00
Justin Clark-Casey (justincc) 8031f8ec09 Improve consistency of locking for SOG.m_parts in order to avoid race conditions in linking and unlinking 2010-08-26 00:08:53 +01:00
Justin Clark-Casey (justincc) 289c21099c Add automated test at the opensim 'api' level to check that a given item goes to the correct directory
Also removes some mono compiler warnings
2010-08-24 16:50:31 +01:00
Melanie Thielker f58a809536 Skip conversion if fields that are null in the database. This may
uncover errors elsewhere.
2010-08-19 11:45:56 +01:00
Marck 30d0bf4207 Fix SQLite database plugin for UserAccountData queries with a single word. 2010-08-15 17:27:06 -07:00
Justin Clark-Casey (justincc) 39a748b47a refactor: Use SOP.Flags rather than SOP.ObjectFlags 2010-08-13 20:23:53 +01:00
Diva Canto 7741143fb5 Enforce DB limits on region name to 32 chars, or else (not good). Removed a piece of code from Hyperlinker that didn't work anyway. Shortened the hyperlink region name. 2010-08-10 11:17:38 -07:00
Justin Clark-Casey (justincc) 3b26baf282 Even if all data migratios are up to date, still print the current revision to the log 2010-08-09 22:54:13 +01:00
Melanie a5e4a2bb3b Add distance sort for null, too 2010-08-08 18:18:42 +01:00
Melanie Thielker 1f25b9e8db Thank you, Marck00, for a patch that implemented region distance sorting
for fallback regions. Applied with changes.
2010-08-08 17:37:50 +01:00
Justin Clark-Casey (justincc) 1270727c96 Merge branch 'moap' 2010-08-06 18:29:30 +01:00
Justin Clark-Casey (justincc) 7f3f1bfe88 fix mysql/mssql prim serialization problem 2010-08-04 20:23:18 +01:00
Justin Clark-Casey (justincc) 2a0254f2da Implement MediaUrl persistence for MySQL and MsSQL
Not sure how I forgot this.  This may resolve problems with media textures not persisting over restart for these databases.
2010-08-03 17:54:40 +01:00
Justin Clark-Casey (justincc) 9d8a67fe13 get rid of PrimitiveBaseShape.MediaRaw staging post
using an OSD serialization rather than auto forces serialization code to be placed in OpenSim.Framework
this makes the media texture raw data staging post in PrimitiveBaseShape redundant, now we just directly call the code in PrimitiveBaseShape.MediaList itself
2010-08-03 16:26:27 +01:00
Diva Canto c4ecbd1fb1 White space from previous commit. 2010-07-31 16:40:58 -07:00
Marck f91ec19224 Implemented console command "show hyperlinks". 2010-07-31 16:38:23 -07:00
Justin Clark-Casey (justincc) 109ddd1bd5 add mssql support for media on a prim
compiles but not tested.  please test and correct if necessary!
2010-07-26 23:34:23 +01:00
Justin Clark-Casey (justincc) 849fc0483f add mysql support for media on a prim 2010-07-26 23:34:23 +01:00
Justin Clark-Casey (justincc) 412fed975f relocate serialization code from SQLiteRegionData to MoapModule using load and save events.
This is better modularity.  It also allows MoapModule to be replaced with some other media module that may behave completely differently in the future.
Remaining non-modularity:
PrimitiveBaseShape needs explicit Media and MediaRaw fields.  MediaRaw is required in order to shuttle the pre-serialization data back and forth from the database layer.
The database also needs to know about MediaRaw though not about Media.
IMO, it would be extremely nice to remove these hard codings but this is a bridge too far at the present time.
2010-07-26 23:34:23 +01:00
Justin Clark-Casey (justincc) afdbeba4e4 Put a wrapper around the media texture region serialization
THIS WILL BREAK EXISTING MEDIA TEXTURE PERSISTENCE.  Please delete your existing sqlite databases if you are experimenting with this branch.
This wrapper will make it easier to maintain compatibility if the media texture data evolves.
This will also make it easier to store non-sl media texture data.
2010-07-26 23:34:22 +01:00
Justin Clark-Casey (justincc) f872a2af11 add missing regionstore migration file for new fields. D'oh!
this should enable persistence now
2010-07-26 23:34:22 +01:00
Justin Clark-Casey (justincc) fc76ce0f46 fix bug where prim persistence would fail if media had never been set 2010-07-26 23:34:21 +01:00
Justin Clark-Casey (justincc) 43f480864b fix problem persisting when only one face had a media texture 2010-07-26 23:34:20 +01:00
Justin Clark-Casey (justincc) 9682e0c733 Implement media texture persistence over server restarts for sqlite
This is currently persisting media as an OSDArray serialized to LLSD XML.
2010-07-26 23:34:19 +01:00
Diva Canto 6afa55d446 Removed a few obsolete mono addin references. Mantis #4854 2010-07-14 14:47:01 -07:00
Justin Clark-Casey (justincc) 5d83b3f991 comment out obsolete assert that 'item has been passed to another user since it was last set' perms flag was set when a prim item was added to a scene object 2010-07-14 17:53:43 +01:00
Melanie dd14016885 Revamp the permissions propagation. This MAY mess up. Please test.
Change the slam bit from 3 to 4. Assume the old slam bit is always set.
The new slam bit is a "changed owner" bit, correcting a bug where an item
passed from the creator to another with less than full perms, then back (sale
test) would arrive back full perm. Lots of in-code docs.
2010-07-13 20:45:16 +01:00
Diva Canto fe60b6783d Hopefully fixes mantis #4852 2010-07-08 16:21:01 -07:00
Diva Canto 76d2f0f68e Same patch as before but for SQLite. 2010-06-27 12:40:17 -07:00
Diva Canto b0129b35f8 Added checks to XInventory DB layer to truncate names and descriptions. 2010-06-27 12:37:16 -07:00
Justin Clark-Casey (justincc) d399bd3eb7 minor: fix spelling mistake interupt -> interrupt in migrations
This is for  mantis 4783
2010-06-25 21:18:52 +01:00
Melanie a3ebd4db3f Revert "This is a HACK! Downright nasty. For some reason, the devs of the mysql"
Didn't do what it said on the package!

This reverts commit 8643db3ef0.
2010-06-19 23:45:56 +01:00
Melanie 8643db3ef0 This is a HACK! Downright nasty. For some reason, the devs of the mysql
connector have decided that their vision of timeouts is the only valid one.
This uses reflection to show them the finger. Please test.
2010-06-19 22:48:43 +01:00
Melanie e3432b8f63 Revert "Set command timeout to infinity on migrations"
This reverts commit 51d30fd34a.
2010-06-17 17:48:34 +01:00
Melanie 51d30fd34a Set command timeout to infinity on migrations 2010-06-17 17:43:40 +01:00
Diva Canto 9c9ce9e8dd * Deleted duplicated migration that was failing anyway.
* Added an error message in initial estate owner creation that makes it clear what needs to happen.
2010-06-14 11:50:42 -07:00
Melanie 008e840cf2 Add the BEGIN; I had missed 2010-06-09 16:37:20 +01:00
Melanie 668c3b4062 Re-add Migration version 32, which apparently got dropped completely. 2010-06-09 16:34:18 +01:00
Diva Canto 5c0068723f Changed XInventoryData's CreatorID to a string. 2010-06-08 15:52:26 -07:00
Diva Canto 9b9804a498 * Changed CreatorIDs consistently to varchar(128)
* Deleted redundant migration for assets in SQLite
* Rewrote XInventory migrations in SQLite in the new style
2010-06-08 15:47:14 -07:00
Melanie a246cbce8d Add a migration to adjust types in the WL table. The new connector likes that
better
2010-06-08 00:37:38 +01:00
Justin Clark-Casey (justincc) 75878c8f43 get TestSaveIarV0_1() working again by setting up an OpenSim.Data.Null.UserAuthenticationData plugin
additional tweaks to get this working properly
2010-06-04 20:43:05 +01:00
Justin Clark-Casey (justincc) 86f2339b6e remove estate stuff in sqlite region migrations since this also exists in estate migrations, change Sandbox to sandbox in sqlite region migrations
re-enabling the sqlite data tests revealed these errors!
2010-06-04 18:46:58 +01:00
Justin Clark-Casey (justincc) 5c322335e5 add sqlite database back to database tests
this appears to be okay even though we reuse it between runs without deleting it first.
size of the database appears not to be changing though that could be deceptive
2010-06-04 18:27:16 +01:00
Justin Clark-Casey (justincc) 55040a84a5 Fix bug where prim items were not loaded in the new sqlite database handler
This addresses mantis http://opensimulator.org/mantis/view.php?id=4739
2010-06-04 17:14:12 +01:00
Melanie 1c7f60ab49 Merge branch 'unitests'
Signed-off-by: Melanie <melanie@t-data.com>
2010-05-26 10:56:24 +01:00
AlexRa 5d65ef2db3 Minor correction to AssetTests.cs
(forgot to change test descriptions, has no effect on running the tests)
2010-05-26 10:25:56 +03:00
Diva Canto 1ab826d67c The 8th migration statement in AssetStore.migrations didn't look right. 2010-05-23 12:22:47 -07:00
AlexRa 57f4729eea Ensured that tests are skipped for wrong conn string, also m_log chng
The base test class now tries to connect to DB, ignores all tests in the
class if unable to.

Also m_log changed to instance field (which in this case shouldn't cause
any problems),  to avoid having to define it separately in each derived
class.  Here I touched things that I don't understand well (using log4net),
so please review this commit.
2010-05-23 12:46:33 +03:00
AlexRa b9b6d9c4ea Removed (unused?) empty SQL files from MSSQL resource dir
There was a whole bunch of these SQL files, all empty and apparently
unused.  Removing them is just a clean-up, if anybody has a reason for these
files to be there, feel free to revert.
2010-05-23 11:48:30 +03:00
AlexRa 05d9ca1b26 MySQL Migrations: Minor correcton to Region/Estate split
(some Estate SQL left behind in the Region migration)
2010-05-23 11:48:28 +03:00
AlexRa 52a3dbd076 MSSQL Migration: CreatorID in InventoryItems changed to VARCHAR(36)
Again, the same thing about potentially having non-GUID CreatorID.
2010-05-23 11:48:25 +03:00
AlexRa 89b7c64b6f Various minor changes in the data tests 2010-05-23 11:48:22 +03:00
AlexRa 9976cb93ce Further corrections to MS SQL stores (now passes all tests)
Besides, AssetData is slightly optimized to StoreAsset in one request
("IF EXISTS() UPDATE ... ELSE INSERT ...")

The main change in the MS SQL Inventory implem. is that it now return
empty list (or whatever) when called with UUID.Zero, which is consistent
with how the code for other DBs work.

I did no changes at all in XInventory, as there is no test set for them.
2010-05-23 11:48:19 +03:00
AlexRa ebc2b6d4f6 Split migrations for RegionStore and EstateStore (see WARNING!)
ok, so the estate stores now want their own migration files, but as it
happened the SQL definition were inside the Region migrations.
It seems better/cleaner to keep each 'store' separately updatable.

WARNING: any editing in the middle of the migration scripts (as opposite
to just appending to them) has the potential of messing up updates of
existing databases.  As far as I can see, this one is (probably) safe,
the worst that could happen is the EstateStore migration silently fail
if the estate the tables are already there.
2010-05-23 11:48:16 +03:00
AlexRa 2537acc04d Unitests: Asset, Estate, Region (the "legacy" one), Inventory
The tests have been modified to work under NUnit 2.4.6
(the one currently used in the project).

They will also work with NUnit 2.5+ as is, but will look better
if you #define NUNIT25 for them.
2010-05-23 11:48:10 +03:00
AlexRa 330ad501a5 Added MS SQL test conn to INI - only as an example, modify before use!!!
NOTE that this INI file is currently loaded as a embedded RESOURCE, which is weird and has a
disadvantage of having to rebuild the Tests whenever the conn strings are changed.
The only reason is that I couldn't figure out a reliable way to put this INI into the correct
dir at runtime. If somebody can do it, that would be cool.
2010-05-23 11:48:08 +03:00
AlexRa 40031e6d37 Removed MySql and SQLite-specific asset test files 2010-05-23 11:48:05 +03:00
AlexRa b1e6e99506 BasicAssetTest.cs replaced by AssetTests.cs
AssetTests: The name has changed to reflect the fact it is no longer a base class,
but the complete asset test for all supported databases.

The test can also check storing of CreatorID, but the feature is
disabled at this commit!
2010-05-23 11:48:02 +03:00
AlexRa 749cf0f6eb Bugfix in tests (must clear db before migrations, not after) 2010-05-23 11:47:59 +03:00
AlexRa f527584ed3 EstateData tests passing on all DBs 2010-05-23 11:47:56 +03:00
AlexRa 94f4c20866 Corrections in RegionTests.cs. It now fully works!
The problem was that some tests relied on prior tests
to leave the DB in a particular state, but the test class
cleared the DB every time. The affected tests have been
merged into one to remove the dependencies.

tested on all 3 Dbs, all tests green.
2010-05-23 11:47:54 +03:00
AlexRa 6322a085b3 Minor corrections in BasicDataServiceTest.cs
(added more functions for cleaning up DB from the
derived tests)
2010-05-23 11:47:51 +03:00
AlexRa 187a98615b MSSQL: added asset_flags, CreatorID to migrations 2010-05-23 11:47:48 +03:00
AlexRa 49f4cc4246 MSSQLAssetData updated to support [CreatorID], [asset_flags] 2010-05-23 11:47:45 +03:00
AlexRa f7bf3facff MSSQLAssetData: fixed some weirdness
Fixed unfinished SQL in FetchAssetMetadataSet, fixed SQL
in UpdateAsset (must not modify ID).

NOT tested!  But apparently shouldn't work worse than the previous version,
esp. the FetchMetadata thing.
2010-05-23 11:47:42 +03:00
AlexRa 7f70ae0ebd All data tests made DBMS-independent 2010-05-23 11:47:39 +03:00
AlexRa 91ad1f4ee7 Added generic base classes for testing database services
These are some generic classes that simplify writing tests
for any of the data connectors and databases. Among other
things, configuring the connection strings is done once,
in a separate resource file.

Tests based on the new BasicDataServiceTest class require
NUnit 2.5 or better.
2010-05-23 11:47:36 +03:00
Diva Canto 213e372253 Cleaned up MySql migrations a bit more, got rid of all old-form migration files. Restored Presence table to its taboo-breaking form. 2010-05-20 20:24:50 -07:00
Melanie 859beaf830 Revert one of the previous patches' hunks. The new code looked better, but
was less efficient.
2010-05-20 11:03:38 +01:00
AlexRa ce787a4c41 Series of patches to include creator ID in assets.
Contains a migration.

SQLite: May contain nuts.

The SQLite migration copies the entire asset table. Be prepared for quite a wait. Don't interrupt it. Back up your assets db.

BasicAssetTest checks CreatorID storage, new test for weird CreatorID

(now also checks that non-GUID or empty CreatorID gets stored correctly)

Signed-off-by: Melanie <melanie@t-data.com>
2010-05-20 11:01:51 +01:00
AlexRa d6a6668bd7 Scrambled asset type in BasicAssetTest.cs!
The asset type wasn't in the list of "DontScramble" fields,
so the test assets were stored with randomized type, which
caused exception on reading them.

Also the scrambler was moved from local var to the class level,
so it could be used in the new tests I've added (see the next commit).
2010-05-19 21:50:34 +03:00
AlexRa 64fe823b92 MySQLAssetData.cs now supports asset_flags, CreatorID 2010-05-19 21:50:32 +03:00
AlexRa eacd8d0263 MySQL: added CreatorID, moved asset_flag to migration script 2010-05-19 21:50:30 +03:00
AlexRa accf8c420d SQLite: CreatorID added (and asset_flags moved) to the migration script 2010-05-19 21:49:30 +03:00
AlexRa c6977cbd4d Added CreatorID to SQLite asset data 2010-05-19 21:49:24 +03:00
AlexRa ccee95552f A bit of harmless refactoring in SQLiteAssetData.cs 2010-05-19 21:49:22 +03:00
AlexRa 527a257b9f Kind of fixed Melanie's "Exception(sql)" correction
Throwing an Ex. with SQL command in the message looks weird,
this is a bit better, but I'm still not sure if that's the
proper way to handle.  Also, there is a catch one level up,
so is this one necessary?
2010-05-19 21:49:18 +03:00
Melanie e4b8d76b10 Change appender to deal with line feeds more intelligently.
Change migration error reporting to not truncate the statement when
reporting. It's a bit messier than the old error reporting, but at least
one gets an idea of what could be wrong again. And things look a lot
neater now.
2010-05-19 04:17:56 +01:00
Melanie 0c209a469b Clean up output a bit 2010-05-19 03:48:03 +01:00
Melanie 20642f2f21 Fix the migration message to say "Continuing" again. Remove line feed, which
prevented the full message from displaying.
2010-05-19 03:26:37 +01:00
Melanie 9fa8013ca5 Remove the return that was inserted in the last merge to allow
migrations to continue in the face of an error
2010-05-19 03:07:31 +01:00
Melanie dedc0c0bd4 Revert "Allow migration steps to fail again without bringing down the house"
This reverts commit 167db50259.
2010-05-19 02:47:31 +01:00
Melanie 167db50259 Allow migration steps to fail again without bringing down the house 2010-05-19 02:33:23 +01:00
Melanie 298368dd99 Merge commit 'alex/mssql-estate-bugfix'
This fixes some type conversion bugs and also makes the estate lists
work properly for MSSQL. Strawberry, please check this.

Signed-off-by: Melanie <melanie@t-data.com>
2010-05-18 23:39:09 +01:00
Melanie d2bc673667 Make m_log in migrations private. Define new m_log in derived class 2010-05-18 23:33:05 +01:00
Melanie caf61ab7d8 Binary Guids are 16 chars long. Fix parser. 2010-05-18 23:22:30 +01:00
AlexRa deae030145 Some more corrections after MySQL connector update 2010-05-19 02:28:19 +03:00
AlexRa 8a0c5d14d4 All (?) MySQL stores fixed to use DBGuid.FromDB()
This was needed if we want to update to the latest MySQL
connector dll.  It automatically converts CHAR(36) to
Guids, so getting them as strings no longer works.

By using DBGuid.FromDB(), we unlink from any particular
storage format of GUIDs, could even make them BINARY(16)
if we like.

Actually not all MySql units are touched, but the remaining ones don't
seem to be affected (they don't read GUIDs from DB)
2010-05-19 01:33:02 +03:00
AlexRa a27d49b188 Added DBGuids.cs (static func DBGuid.FromDB()
This DBMS-independent function to be used converting UUIDs
from whatever format used in the DB (string/binary/Guid).
This is mostly needed for MySQL, as in MSSQL they are always
UNIQUEIDENTIFIERs and in SQLite always strings (but would look
better if we use it there anyway).
2010-05-19 01:32:50 +03:00
AlexRa d95f232629 Massive bugfix in MSSQLEstateData (now works!) 2010-05-18 21:08:51 +03:00
AlexRa dfeb9a0b5c MS SQL migrations converted to the new format 2010-05-16 17:04:50 +03:00
AlexRa 1ad12851d0 Migrations for SQLite converted to new format 2010-05-16 17:04:39 +03:00
AlexRa ee713cb253 Converted MySQL migration history to the new format
Replaced all NNN_StoreName.sql migration resources with a more
readable, single-file-per-store
2010-05-16 17:04:13 +03:00
AlexRa b49fb3db7c Added MySqlMigrations.cs (supports stored proc/funcs)
Uses MySqlScript class to correctly run proc/func definitions
that need delimiter change. Requires MySql.Data.dll 6.2 or later.
2010-05-16 16:25:08 +03:00
AlexRa 8b6a295874 Migration.cs supports single-file migration history format
Scans for migration resources in either old-style "scattered" (one file per version)
or new-style "integrated" format (single file "Resources/{StoreName}.migrations[.nnn]") with ":VERSION nnn" sections).
In the new-style migrations it also recognizes ':GO' separators for parts of the SQL script
that must be sent to the server separately.  The old-style migrations are loaded each in one piece
and don't support the ':GO' feature.

Status:  TESTED and works fine in all modes!
2010-05-16 16:22:38 +03:00
Diva Canto 6f2f0fa0ca OK, this really fixes it, I promise. 2010-05-09 14:12:59 -07:00
Diva Canto 9cf6b81256 Yey for unit tests. The previous commit had a couple of bugs on SQL statements. Fixed here. 2010-05-09 14:02:02 -07:00
Diva Canto b233a4b2ca * Fixed spamming the assets table with map tiles. The tile image ID is now stored in regionsettings. Upon generation of a new tile image, the old one is deleted. Tested for SQLite and MySql standalone.
* Fixed small bug with map search where the local sim regions weren't found.
2010-05-09 13:39:56 -07:00
Melanie bc6995f921 Add Delete handler to SQLite (NG) 2010-05-09 18:02:36 +01:00
Melanie 60357d3778 Implement the "delete" path for assets. Adds a new option to allow remote asset deletion in robust handler. 2010-05-09 17:56:52 +01:00
Melanie 9b22393cf3 Add a field asset_flags and a corresponding enum to the asset database. This
CHANGES THE ASSET SERVER PROTOCOL and means you CAN NOT MIX PRIOR VERSIONS
WITH LATER ONES. It may also eat your babies, yada, yada, yada.
The usual cautions for migrations to the assets table apply.
Coding: Can not guarantee nut free.
2010-05-09 17:02:22 +01:00
Diva Canto 15562017f2 These files are part of the GridUserService write-up. 2010-05-07 21:32:02 -07:00
Diva Canto a58859a0d4 GridUserService in place. Replaces the contrived concept of storing user's home and position info in the presence service. WARNING: I violated a taboo by deleting 2 migration files and simplifying the original table creation for Presence. This should not cause any problems to anyone, though. Things will work with the new simplified table, as well as with the previous contrived one. If there are any problems, solving them is as easy as dropping the presence table and deleting its row in the migrations table. The presence info only exists during a user's session anyway.
BTW, the Meshing files want to be committed too -- EOFs.
2010-05-07 21:29:56 -07:00
Diva Canto 484584b83c Fixed: migration #2 for SQLite. Problem was that ATTACH cannot be done inside a transaction. 2010-05-04 09:44:30 -07:00
Melanie Thielker 9635af61f0 Allow regions to get the list of the other regions in the estate 2010-05-04 15:52:29 +01:00
Melanie Thielker 23d7a942ea Refix the fix 2010-05-03 23:11:48 +01:00
Melanie Thielker 92dff5edb1 Add folder version incrementing to XInventoryService. Fixes offline give
for avatar->avatar
2010-05-03 23:11:37 +01:00
Diva Canto bd49985afa Switched everything to XInventory by default. The old Inventory is still there for now, in case bugs pop up with XInventory. 2010-05-02 10:31:35 -07:00
Justin Clark-Casey (justincc) f3662e3d15 minor: eliminate more debug Console.WriteLines, convert one to logging instead 2010-04-30 22:22:03 +01:00
Justin Clark-Casey (justincc) d921329799 take out some debug logging in the sqlite db adaptor 2010-04-30 18:18:21 +01:00
Justin Clark-Casey (justincc) 89e79c1133 Merge branch 'master' of ssh://justincc@opensimulator.org/var/git/opensim 2010-04-30 17:54:00 +01:00
Justin Clark-Casey (justincc) cc67de5b86 rename SQLiteNG to SQLite and SQLite to SQLiteLegacy
this seems the least evil way forward since mono 2.6 and later will see increasing usage, and this only works with what was SQLiteNG
MAC USERS WILL NEED TO CHANGE REFERENCES TO "OpenSim.Data.SQLite.dll" to "OpenSim.Data.SQLiteLegacy.dll" in OpenSim.ini and config-include/StandaloneCommon.ini (if using standalone)
See the OpenSim.ini.example and StandaloneCommon.ini.example files for more details
This commit also temporarily changes unsigned ParentEstateID values in the OpenSim.Data.Tests to signed temporarily, since the new plugin enforces creation of signed fields in the database (which is what the SQL actually specifies).  And change data columns in sqlite is a pita.
2010-04-30 17:45:00 +01:00
AlexRa be1141f0f7 Refactoring in Migration.cs: "using()" instead of explicit Dispose()
This ensures that 'cmd' gets disposed on errors
2010-04-28 13:40:35 +03:00
AlexRa b49e9eff56 Fixed comments in Migration.cs: wrong argument order (no change to code) 2010-04-28 13:11:42 +03:00
AlexRa 8b75302a1e Just a bit of spellchecking in the comments 2010-04-28 12:21:39 +03:00
Justin Clark-Casey (justincc) 6e99e5b47a get region prim saving working properly in SQLiteNG
it wasn't working because of debug work that I'd forgotton to take out
2010-04-23 20:56:24 +01:00
Justin Clark-Casey (justincc) f313d57fa4 Merge branch 'master' of ssh://justincc@opensimulator.org/var/git/opensim 2010-04-23 20:11:26 +01:00
Justin Clark-Casey (justincc) 1b488c2581 dispose of the DbCommand used to execute migrations after we've finished with it rather than within the loop
disposing of it within the loop causes Mono.Data.Sqlite.dll to get upset, and it's the wrong behaviour anyway
2010-04-23 20:08:24 +01:00
Justin Clark-Casey e78f874cfd put SQLiteNG classes in their own namespace to avoid confusion 2010-04-23 19:40:15 +01:00
Justin Clark-Casey (justincc) fcbac43114 minor: correct the assembly information for SQLiteNG 2010-04-23 19:14:43 +01:00
Justin Clark-Casey (justincc) 5ee77886ac Merge branch 'master' of ssh://justincc@opensimulator.org/var/git/opensim 2010-04-23 19:05:32 +01:00
Justin Clark-Casey (justincc) e84cc2f9db Change SQLiteNG to work with mono 2.6 and above using the Mono.Data.Sqlite.dll
Include the library so that Windows builds correctly
It appears that Windows is okay with either SQLite or SQLiteNG
Incorporate the latest fixes made by Diva to OpenSim.Data.SQLite
2010-04-23 18:56:50 +01:00
Justin Clark-Casey (justincc) a23bebdc0f Duplicate OpenSim.Data.SQLite into OpenSim.Data.SQLiteNG. SQLiteNG will shortly be changed to work under mono 2.6 and above 2010-04-23 17:17:15 +01:00
Melanie ebcc9874d4 Insert a ROLLBACK command on migration step failure. This ensures that
updating the Migrations table will not occur in a partial transaction, which
would be auto-rolled-back later.
2010-04-22 17:45:03 +01:00
Diva Canto 4e1cbd1bf3 One more bug fix in sqlite sql statements. 2010-04-16 18:04:20 -07:00
Diva Canto 2597a3406c Bug fix: UserAccounts in SQLite was missing the primary key constraint. 2010-04-16 17:43:15 -07:00
Diva Canto 930d374525 Expose Delete at IUserAccountData interface. It was there already. No changes in IUserAccountService, just the data layer. 2010-04-16 16:36:44 -07:00
Diva Canto b3e9dd4fc2 Bug fix in SQLite/SQLiteUserAccountData.cs: Missing'(' in one of the SQL statements. 2010-04-16 15:10:57 -07:00
Justin Clark-Casey (justincc) e0f8362e7a minor: add some documentation around the asset udp request path and replace some magic numbers with libomv enums 2010-04-14 22:31:11 +01:00
Diva Canto 5fc9fe70af Added NullInventoryData for unit tests and quick try-outs of the services in 64-bit machines (no SQLite). 2010-04-06 19:38:01 -07:00
Melanie ec637e2b8c Committing the LightShare code, which was developed by TomMeta of Meta7.
This allows scripts to set WindLight parameters for clients connecting
to a region. Currently, this is only supported by the Meta7 viewer.
2010-03-31 04:20:20 +01:00
John Hurliman d6a64bf732 * Catch exceptions thrown when MySQLEstateData.LinkRegion() is called. This won't fix the bug I'm seeing with regions not realizing they are already part of an estate, but it will fix the OpenSim crash if that situation ever comes up 2010-03-26 13:50:25 -07:00
Justin Clark-Casey (justincc) 87fe96ae2c replace recent IModule.GetGroup() with better GetGroupRecord(string name) 2010-03-26 00:10:29 +00:00
Melanie 3fb73e4e26 UNTESTED SQLite code to enable estate setup in interactive confguration 2010-03-23 02:18:55 +00:00
Melanie dcf18689b9 First stage of the new interactive region creation. This will allow creation
of a region and joining it to an existing estate or creating a new estate,
as well as creating an estate owner if in standalone, and assigning estate
owners. In Grid mode, existing users must be used. MySQL ONLY!!!! so far, as
I can't develop or test for either SQLite or MSSQL.
2010-03-23 02:05:56 +00:00
Melanie 07a6b37001 Somehow the starting estate number in MySQL was lost. This adds a migration
to start estates at 100. Existing databases having autcreated estates below
100 will see a gap in estate numbering. Other database implementors need to
ensure that no estates with numbers less that 100 are autocreated, unless
they are prepared to deal with the viewer's built-in notions of
Linden Mainland
2010-03-22 20:38:27 +00:00
Melanie 70b0e07d1e Remove the reading of estate_settings.xml and the associated processing of
defaults. Adding code to facilitate estate creation / managemment as part of
first time start up
2010-03-22 18:49:56 +00:00
Jeff Ames f58a0394ed Formatting cleanup. Add copyright notices. 2010-03-10 13:15:36 +09:00
unknown c135235000 MSSQL tweaks for latest ROBUST - friends handling fixed, GridUserData placeholder added.
Signed-off-by: Melanie <melanie@t-data.com>
2010-03-09 18:37:08 +00:00
Diva Canto 5171464ac1 Justin, I must have been dyslexic when I wrote UserGridService as the name for it. GridUserService makes more sense; it's the user of the grid, "grid user". I changed it everywhere. 2010-03-05 21:36:45 -08:00
Justin Clark-Casey (justincc) e906dd3d28 add initial UserGrid service classes as per diva's direction
this will initially store home location data instead of the presence service
compiles but not enough to actually test yet
2010-03-05 22:29:51 +00:00
Justin Clark-Casey (justincc) e39fc95659 Fix LocalPresenceServiceConnector test now that the hardcoded test data has been removed from Data.Null.NullPresenceData
Unfortunately, this meant publicly exposing the underlying service for the connector.
The other solution would be to create alternative initializers for services and connectors where objects could be given directly rather than loaded indirectly through config.
Unfortunately, this would require a lot of work in this case but might be the better way forward.
2010-03-05 00:54:46 +00:00
Justin Clark-Casey (justincc) 82cccdeb94 minor: comment out a forgotton debug log line 2010-03-04 22:50:02 +00:00
Justin Clark-Casey (justincc) a1643c78be remove test presence from NullPresenceData since this appears to stop existing sessions with home locations from being picked up
only tested for a single user so this may still fail for multiple users
this may well be all academic anyway since standalone need to persistently store home location in presence data in some way
2010-03-04 22:43:30 +00:00
Diva Canto 763285aaf1 Fixed SQL tests. 2010-03-02 07:29:41 -08:00
Melanie bef311dfb9 Merge branch 'master' into presence-refactor
This is the big one. master is now presence-refactor (pre 0.7). A new branch 0.6.9-post-fixes and leading tag 0.6.9 has been created. The Presence-refactor
branch remains for experimental work.
2010-03-02 04:46:13 +00:00
Diva Canto 53a8286468 Changed the query in GetFriends in SQLite to match the one in MySql. 2010-03-01 21:35:46 -08:00
Jeff Ames 780ee4f991 Fix a few compiler warnings. 2010-03-01 23:04:45 +09:00
Melanie bfcc57c071 Change friends to handle offers as it was originally designed. This may
need to be changed in SQLite & MSSQL as well
2010-03-01 00:02:14 +00:00
Diva Canto 774958bbbf Added FriendsData to both Null storage and SQLite. Untested. 2010-02-28 16:09:06 -08:00
Melanie 92029dc171 Remove some obsolete files from MSSQL. Fix a missing constructor arg that
was introdiced by the latest jhurlipatch
2010-02-24 16:00:06 +00:00
StrawberryFride 2fa5694ec9 MSSQL Additions for Presence Refactor branch. Most functionality tested and works, some outstanding issues around login location and border crossings on y axis.
Signed-off-by: Melanie <melanie@t-data.com>
2010-02-24 15:50:44 +00:00
John Hurliman df76e95aa2 Changed asset CreatorID to a string 2010-02-22 14:18:59 -08:00
John Hurliman 71c6559a91 Merge branch 'presence-refactor' of ssh://opensimulator.org/var/git/opensim into presence-refactor 2010-02-22 14:10:19 -08:00
John Hurliman 7665aad002 * Adds CreatorID to asset metadata. This is just the plumbing to support CreatorID, it doesn't modify database backends or OAR files to support storing/loading it 2010-02-22 13:27:17 -08:00
Melanie 1f45e6c649 Merge branch 'master' into presence-refactor
This brings presence-refactor up to master again
2010-02-22 03:00:59 +00:00
Diva Canto 70de6956ff Small bug fixes for making tests work. 2010-02-21 18:56:44 -08:00
Diva Canto b92645ac56 MySQL tests pass, except T016_RandomSogWithSceneParts. Total mystery as to why that test doesn't show in panda. 2010-02-21 17:59:00 -08:00
Diva Canto bb171717ce Deleted obsolete files in the Data layer. Compiles. 2010-02-21 15:38:52 -08:00
Diva Canto bd5a4dab0c Bug fixes on field names in order to make data import work from old users table to new UserAccounts table. 2010-02-21 09:39:12 -08:00
Diva Canto 552e9e8c78 * Added SQlite connector for AvatarData. Tested -- works.
* Small bug fix in debug message
* Set default standalone configs to use SQLite across the board
2010-02-21 09:09:35 -08:00
Diva Canto 8a4947f8c7 SQLite connector for UserAccounts and Auth works. Yey! 2010-02-21 08:47:24 -08:00
Diva Canto 56fb7821ad Restored mising m_Connection. 2010-02-20 21:24:18 -08:00
Melanie d761d1624b Fix SQLite locking and make it more fascist for now 2010-02-21 04:20:22 +00:00
Diva Canto 611eeb583c Reverted SQLite/SQLiteGenericTableHandler to what it was + singleton. 2010-02-20 20:59:04 -08:00
Diva Canto df59d098b3 SQLite connector better, but access to tables still doesn't work. 2010-02-20 20:13:38 -08:00
Diva Canto 0ab6aac052 Added UserAccountData and auth to the SQLite connector. Compiles, runs, but access to these tables doesn't work. 2010-02-20 17:52:38 -08:00
Justin Clark-Casey (justincc) 4355bcc417 Disable Data.BasicRegioNTest.T016_RandomSogWithSceneParts() temporarily since it's making the tests fail but the cause is not obvious (wrapped up in layers of reflection) 2010-02-16 19:31:49 +00:00
Melanie c033223c63 Merge branch 'master' into presence-refactor 2010-02-15 00:20:48 +00:00
Diva Canto d326a1df3f Extraneous debug messages removed 2010-02-14 17:01:22 -08:00
Diva Canto dc19785672 Added UserAccount, Avatar and Authentication to Data.Null, so that OpenSim can run out-of-the-box. #WaitingForSQLite 2010-02-14 16:57:02 -08:00
Teravus Ovares (Dan Olivares) 45493171b0 * SQLite match code casing with regionsettings table field casing (what's with the upper case S in Sandbox while the rest is lower case 0.o)
* It's doubtful that this will have any effect on mantis http://opensimulator.org/mantis/view.php?id=4577 .   Sqlite 3 is required, Sqlite 2 was reported.
2010-02-13 05:50:57 -05:00
Teravus Ovares (Dan Olivares) fa6da2f6c6 * This is an attempt to resolve mantis 4437 by using SqliteAdapter type statements instead of blanket SQL statements. The hope is that this makes SQLite work on Linux/Mono again. Re: http://opensimulator.org/mantis/view.php?id=4437
* Added a 'Create Update Statement' method that takes two fields for a primary key
* Added an Update and Delete command for parcels and land access list table rows.
2010-02-13 05:09:15 -05:00
Justin Clark-Casey (justincc) 802a969267 Fix http://opensimulator.org/mantis/view.php?id=4224
This resolves the problem where eyes and hair would turn white on standalone configurations
When a client receives body part information, for some insane reason or other it always ends up uploading this back to the server and then immediately re-requesting it.
This should have been okay since we stored that asset in cache.  However, the standalone asset service connector was not checking this cache properly, so every time the client made the request for the asset it has just loaded it would get a big fat null back in the face, causing it to make clothes and hair white.
This bug did not affect grids since they use a different service connector.
2010-02-12 21:32:03 +00:00
Melanie 1dfcf68330 Add the friends service skel and correct some namespace issues 2010-02-09 07:05:38 +00:00
Melanie ef8b2d2f90 Convert null presence data to a singleton as well. Standalone logins now work 2010-02-08 21:38:49 +00:00
Melanie d8bab61af4 Convert NullRegionData to a singleton pattern, since that is required
for a standalone
2010-02-08 21:24:04 +00:00
Melanie 210649f0d4 Make an exception report more clear. Fix a database access in Presence to
conform to the changes in the generic table handler.
2010-02-08 17:38:05 +00:00
Melanie baaf660511 Merge branch 'master' into presence-refactor
This was a large, heavily conflicted merge and things MAY have got broken.
Please check!
2010-02-08 15:53:38 +00:00
Melanie c6adbccc27 Finish the "Get friends" method 2010-02-07 12:06:00 +00:00
Master ScienceSim e1b5c61247 Updated MySQL connection management to use the MySQL connection pooling. This should accommodate various timeout problems that exist with the current connection pool code in a more general and standard way. 2010-02-05 18:07:59 -08:00
OpenSim Master 5f1f5c29e9 Fixing an incorrect logging message in insertUserRow 2010-02-05 18:06:01 -08:00
OpenSim Master 3e697ad57e * Fixed the Cable Beach inventory server to save the CreatorID as well as properly handling null item names and descriptions * Fixed the MySQL reader to safely handle null values in string columns that can be null 2010-02-05 18:05:57 -08:00
John Hurliman e251f42443 Merge branch 'presence-refactor' of ssh://opensimulator.org/var/git/opensim into presence-refactor 2010-02-05 17:46:37 -08:00
OpenSim Master 310e14cf03 Fixing an incorrect logging message in insertUserRow 2010-02-05 17:45:36 -08:00
OpenSim Master e982397cde * Fixed the Cable Beach inventory server to save the CreatorID as well as properly handling null item names and descriptions * Fixed the MySQL reader to safely handle null values in string columns that can be null 2010-02-05 17:45:31 -08:00
Melanie b92cb6126d Implement the friends data adaptor 2010-02-05 12:31:29 +00:00
Melanie f9a61f2825 Some interface and data structure changes, add the missing method in friends 2010-02-04 10:51:36 +00:00
Justin Clark-Casey (justincc) b9c3846e81 minor: remove some mono compiler warnings 2010-02-03 22:19:28 +00:00
Diva Canto bb736cee6b Beginning of friends. 2010-02-01 16:05:59 -08:00
Diva Canto 35a245b67a Assorted bug fixes related to hyperlinking 2010-01-31 22:35:23 -08:00
Diva Canto 22a3ad7f6c * Bug fix in XInventoryData -- groupOwned is an int in the DB
* Bug fix in InventoryServerInConnector -- m_config
2010-01-31 11:26:12 -08:00
Melanie fe5d80a285 Add a Hyperlink flag to the regions table 2010-01-19 04:17:27 +00:00
Diva Canto 5ce12c92d9 Fixed a missing field in the last regions table migration. 2010-01-16 08:32:32 -08:00
Melanie 10f8c2ea9b Merge branch 'master' into presence-refactor
This merge was very conflicted. I think I got them all, but I can't be sure.
I had to merge to master or risk divergence to the point of unmergeability.
2010-01-16 00:05:08 +00:00
Melanie 0d5f182c02 Add a handful of new region flags and a small migration 2010-01-15 21:13:57 +00:00
Melanie 78e9dc7c2c Add a "LockedOut" flag to allow locking a region out via the grid server.
This flag prevents registration of a known region
2010-01-10 04:23:23 +00:00
Melanie 9727e3d66b Add "Persistent" flag to regions table flags values 2010-01-10 02:44:57 +00:00
Melanie e189b3056f Add last_seen field to regions table 2010-01-10 02:13:55 +00:00
Melanie 28d6705358 Preliminary work on the new default region setting mechanism 2010-01-09 20:46:32 +00:00
Melanie d14589d1ab Add migrations to add fields to user and auth tables 2010-01-08 18:10:59 +00:00
Melanie 28ba16ee53 Add the port of the XInventoryService for the new Sqlite framework 2010-01-05 00:35:54 +00:00
Melanie 033a3da254 Sqlite framework and generic handler. They compile. More I cannot say. 2010-01-04 23:30:38 +00:00
Melanie 7f960cd595 Merge branch 'master' into presence-refactor 2010-01-04 21:41:33 +00:00
Melanie 1ae9bfc074 Finish conversion if XInventoryService 2010-01-04 20:53:28 +00:00
Melanie e76333555d First stage port of the XInventoryService 2010-01-04 20:53:26 +00:00
Melanie d4d55b4f4b Add the data service 2010-01-04 02:53:22 +00:00
Melanie 6e8d94685d AvatarStore. Untested, but complete 2010-01-04 02:52:43 +00:00
Melanie 791c6188fd Some work on avatar service. Retrieval and storage done 2010-01-04 02:07:31 +00:00
Melanie 3c18c0189a Avatar appearance skeleton 2010-01-04 00:56:39 +00:00
Jeff Ames 70d5b1c34c Formatting cleanup. Add copyright headers. 2010-01-04 06:17:30 +09:00
Diva Canto 4240f2dec6 New LL login service is working! -- tested in standalone only. Things still missing from response, namely Library and Friends. Appearance service is also missing. 2010-01-01 16:54:24 -08:00
Melanie 0d9591bf35 Prevent the creation of duplicate inventory folders in the case of a login
database issue. Now the login will instaead fail later.
2010-01-01 22:51:00 +00:00
Diva Canto c540c93b54 Auth data migration. 2010-01-01 08:45:41 -08:00
Melanie 61f63fdc38 Put PassCollision on the ignore list for testing, since we don't save that
yet.
2009-12-31 23:51:53 +00:00
Melanie 01f6aee020 Implement avatar picker queries 2009-12-31 02:26:00 +00:00
Melanie 99ad7aac7f Implement saving user account data 2009-12-31 01:34:03 +00:00
Melanie bda18c33fd Merge branch 'presence-refactor' of melanie@opensimulator.org:/var/git/opensim into presence-refactor 2009-12-30 22:23:58 +00:00
Melanie b6097ae9a8 Some modifications to user service. Query by name is implemented now 2009-12-30 22:23:17 +00:00
Diva Canto 1d2a332b96 Unit tests for presence. They helped fix a couple of wrongnesses. 2009-12-30 14:17:18 -08:00
Diva Canto 28516e2648 Fixed a couple of bugs that were bombing the data migration. 2009-12-29 16:51:59 -08:00
Diva Canto 6eb5754f5a Polished the IUserService interface. 2009-12-29 13:27:21 -08:00
Melanie 8631cea215 Change the interface a bit before someone depends on it's current form 2009-12-29 20:14:26 +00:00
Melanie 18ca978b81 Give the new user tables the once-over. Strip the current set of methods
from IUserAccountService, we need to define what goes in there. Change
the handler to the generic handler. Adjust migrations, add index
2009-12-29 18:31:27 +00:00