* common/Database.cpp: Fix referrential integrity now that inherited
tables are not being used. Removes FIXMEs relating to that and
the database maintenance code which have now been fixed.
* common/Database.cpp: Re-enable referential integrity on relational
tables. Clean up the query generation code.
* server/Persistance.cpp: Correct the table names used for the
relation used to store character ownership.
* common/const.h: Add a constant for the name length limit of
rule IDs and property names.
* common/Database.cpp: Use the name length constant for database
fields that will store the name.
* server/EntityFactory.cpp: Check class names do not violate a
32 character limit before installing them, so they never get
as far as the database limit.
* common/Database.cpp: Modify the rules table so it limits
the ID to the right size.
* common/Database.cpp: Handle things correctly if scheduling an update
or insert query while the database is offline. Just ignore it and
keep the query queued.
* common/Database.cpp: Fix a problem where existing database tables
weren't added to the set for maintenance cycles. This should fix a
lot of major performance issues.
* common/Database.cpp: Add the new storage tables to those that
are vacuumed regularly. Add an index to the name of properties
to make them massively more efficient to update.
* common/Database.cpp: Add queries which purge the world state on
startup to prevent the tables from getting clogged up. Fix the
syntax of the query which removes deleted entity rows.
* common/Database.cpp, common/Database.h: Add method to remove
entities from the database store. Remove the foreign key index
constraint from the LOC column.
* common/Database.cpp: Add the location data to the database
insert query.
* server/Persistance.cpp: Modify the entity database table so it
has the right columns.
* server/StorageManager.cpp: Correctly check the orientation
valid flag before using it.
* common/Database.cpp, common/Database.h: Modify the Entity database
functions to include a chunk of text for location data.
* server/StorageManager.cpp: Implement naive storage of location
data to the database.
* common/Database.cpp: Implement updating modified properties.
* server/StorageManager.cpp: Tweak test properties values
so we can tell if one has been updated.
* common/Property.h: Add helper functions to make it easy and clear
to manipulate flags.
* common/Database.cpp, common/Database.h: Expand the entity database
table to include LOC and update sequence number. Implement new
functions that insert test entity data into entity and property
tables.
* rulesets/LocatedEntity.h: Add an accessor providing direct access to
the properties dictionary for persistence.
* server/Persistance.cpp: Remove the bounding box chunk from the
entity table schema.
* server/StorageManager.cpp: Implement inserting and updating rows
into the Entity and Propertiy tables.
* common/Database.cpp, server/Persistance.cpp: Adject code to take
into account changed return value. Add call to create Entity
table, and fix the query string in the implementation.
* common/Database.cpp, common/Database.h: Change the return type
of a method to fit the preferred convention. Add an experimental
API for new Entity persistence.
* common/Database.cpp, common/globals.cpp, common/id.cpp,
common/log.cpp, modules/DateTime.cpp, rulesets/Container.h,
rulesets/Statistics.h, server/CommListener.cpp,
server/CommServer.cpp, tools/cyconfig.cpp, tools/cyconvertrules.cpp:
Add includes required for recent compilers which include less
stuff implicitly in standard headers.
* common/terrain_utils.h, common/Makefile.am: Remove the persistence
code used to save terrain data.
* common/Database.cpp, common/Database.h: Remove the object
relational API for persisting entity data, and put the code
beyond use.
* common/Database.h, common/Database.cpp: Add a new decoder for atlas
objects, and use it when getting the full contents of a table
full of Atlas data.
* server/Persistance.cpp, server/Persistance.h: Modify the API
for getting the rules table to use atlas objects rather than
messages.
* server/EntityFactory.cpp: Re-enable loading rules from the
Database, now that the data is available from the peristence
API in the right format.
* common/Database.cpp, common/Database.h: Add a new API for
attempting to bootstrap an instance database from the master.
* server/Persistance.h, server/Persistance.cpp: Make some of the
functions in the persistence API non-static, so they work
more cleanly and consistently. Use the new return codes
specified in the config header. If an instance can't get a database
connection, use the master database to try and create one.
* server/server.cpp: Use the persistence code the way it is
intended to be used.
* common/Database.cpp, common/Database.h: Remove the flag specifying
that the database should be created at connection time, as we
basically can't do this. Make the default database name depend on
instance name currently in use.
* common/accountbase.cpp, tools/cydumprules.cpp, tools/cyloadrules.cpp:
Fix code for the change to the database API.
* common/log.cpp, common/log.h, common/BaseEntity.cpp,
common/BaseEntity.h: Switch to taking a C++ string reference rather
than a char *, for the rest of the logging and error related
calls.
* common/Database.cpp, common/log.cpp, common/log.h,
rulesets/PythonMindScript.cpp, server/Account.cpp,
server/Admin.cpp, server/Connection.cpp, server/Player.cpp,
tools/cyisoload.cpp: Convert over to using the new API correctly.
* common/log.cpp, common/log.h: Switch to taking a C++ string reference
rather than a char *, as it is not really an optimisation, and it
makes the code simpler to read and write.
* client/BaseClient.cpp, client/ClientConnection.cpp,
common/AtlasFileLoader.cpp, common/BaseEntity.cpp,
common/Database.cpp, common/globals.cpp, common/id.cpp,
common/inheritance.cpp, common/log.cpp, common/log.h,
rulesets/Character.cpp, rulesets/Creator.cpp, rulesets/Entity.cpp,
rulesets/MemMap.cpp, rulesets/Motion.cpp, rulesets/Pedestrian.cpp,
rulesets/Py_Object.cpp, rulesets/Py_RootEntity.cpp,
rulesets/PythonMindScript.cpp, rulesets/PythonThingScript.cpp,
rulesets/Python_API.cpp, rulesets/Thing.cpp, server/Account.cpp,
server/Admin.cpp, server/ArithmeticFactory.cpp,
server/CommClient.cpp, server/CommListener.cpp,
server/CommMDNSPublisher.cpp, server/CommServer.cpp,
server/Connection.cpp, server/EntityFactory.cpp,
server/Persistance.cpp, server/Restoration.cpp,
server/ScriptFactory.cpp, server/TaskFactory.cpp,
server/WorldRouter.cpp, server/server.cpp: Convert over to using
new API correctly.
* data/mason.xml: Add biomass and transient to fircone, making its
script obsolete:
* common/Database.cpp: Improve the presentation of Database error
messages.
* server/server.cpp: If connecting to the database fails, just
disable it, and report plenty of error information.
* common/Database.cpp: Replace asserts with critical error messages,
so tests can run without a Database connection.
* tests/EntityPropertytest.cpp: Re-write test cases to deal with
modified behavoir if the Entity reference is null.
* tests/Databasetest.cpp: Add a unit test for the features of
Database that can be checked without an RDBMS to connect to.
* common/Database.h, common/Database.cpp: Provide a function to
cleanup the Database singleton, for easier testing.
* common/Database.cpp: Assert that the connection to the database
has been created before calling any functions in the database
client lib using that connection.
* common/Database.cpp, common/newid.cpp, server/server.cpp:
Modify new ID checks so that code still runs when database is
unavailable, and events requiring new IDs fail cleanly.
* server/Connection.cpp: Report a failure to create a player
account if no ID available.
* rulesets/BaseMind.cpp: When processing appearance ops, handle
stamp more efficiently, report an error if ID is missing
from argument.
* server/IdlePSQLConnector.cpp, server/IdlePSQLConnector.h:
Implement re-connecting to the Database if connection is lost.
* rulesets/Character.cpp, rulesets/Entity.cpp, rulesets/Thing.cpp:
Ensure STAMP is present on appearance op args.
* server/CommListener.cpp, server/CommListener.h,
server/CommPeerListener.cpp, server/CommPeerListener.h,
server/CommSlaveListener.cpp, server/CommSlaveListener.h,
server/CommUnixListener.cpp, server/CommUnixListener.h:
Add a return value to method for creating new client socket
objects, and use it to return failure if no ID is available
from the database for a new object.
* rulesets/Py_Point3D.cpp, rulesets/Py_Vector3D.cpp,
rulesets/Python_API.cpp: Add "new" method for class wrappers, and
call the in place constructor from new rather than init. Re-write
internal function for creating new instances so it uses the "new"
method.
* rulesets/Py_Statistics.cpp: Remove some obsolete code inadvertedly
copied from another file. Comment out some unused code to get rid
of a warning.
* server/CommPSQLSocket.cpp: Clear the database connection from
destructor.
* tests/python_class.cpp: A new test for experimenting with new
Python wrappers.