Hi!
For those hacking on Drizzle I thought I would write up my notes from IRC and
push them out to the mailing list (probably my blog as well).
First off, terminology. A Catalog is a container of schemas, tables, users,
threads, etc. It is a virtual container by which we control access,
authorization, and security.
When I use the term "Instance" I am referring to an object, and that object is
the sum total of stateful and message definition.
We have in Drizzle table, schema, and catalog instances. The master instance
is the running process.
A catalog instance encapsulates the locks, schemas, tables, etc. Each Catalog
has only one instance at a time, and there is one instance that represents it.
A session is attached to a catalog based on either protocol or IP address. A
session can be disconnected and another login can be made to attach to a new
catalog with a new session. A user resides in a catalog. Two usernames of the
same name cannot exist in the same catalog. Each catalog has one owner.
No query can be made cross catalog. The default catalog is called "LOCAL".
An example for locks. If today you create a new schema the catalog DDL lock is
called (ie, there is no global lock).
If you are hacking on Drizzle you can get access to the current catalog
instance via catalog() via the session object. The object is const, and any
additions require explicit mutable tags and appropriate locks.
A SHOW PROCESSLIST will object give you access to others who are within your
same CATALOG.
The tools for working with sessions are currently not in the parser, and can
only be accessed by functions (ie, we don't export these just yet, and in
Drizzle7 they will not be available, the update in the summer will allow for
full access).
Cheers,
-Brian
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp