Eric Day

Thoughts, code, and other oddments.
Dark | Light

< || >

Debug Console in drizzled, Part 2

October 5th, 2009

About a month ago I blogged about the debug console I was adding to drizzled. I finished this work up and it’s now in the trunk and latest release. This is implemented using the Client and Listen plugin points (which are heavily modified versions of MySQL’s Protocol class), and can be enabled using the ‘–console-enable’. For example:

hades> drizzled --datadir=/Users/eday/drizzle.data --console-enable
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins.
090928 15:22:07  InnoDB: highest supported file format is Barracuda.
090928 15:22:07 InnoDB Plugin 1.0.3 started; log sequence number 46409
Listening on :::4427
Listening on 0.0.0.0:4427
./drizzled/drizzled: Forcing close of thread 0  user: '(null)'
./drizzled/drizzled: ready for connections.
Version: '2009.09.1144' Source distribution (trunk)
drizzled> show tables in information_schema;
Tables_in_information_schema
INNODB_TRX
INNODB_LOCKS
...
STATISTICS
TABLE_CONSTRAINTS
TABLES
drizzled> ./drizzled/drizzled: Forcing close of thread 1  user: '(null)'
./drizzled/drizzled: Normal shutdown
090928 15:22:31  InnoDB: Starting shutdown...
090928 15:22:32  InnoDB: Shutdown completed; log sequence number 46419
./drizzled/drizzled: Shutdown complete
hades>

You can type ‘quit’, ‘exit’, or just send EOF (CTRL-D) to shutdown drizzled. There is another patch along the way with some fixes to make it more efficient for mas imports (ie, drizzled –console-enable < data_dump.sql). It’s pretty bare bones now, but patches welcome for new features to make this look more like the normal command line tool (like changing prompt).

Posted in Drizzle, Main, MySQL

3 Responses to "Debug Console in drizzled, Part 2"

  1. Brian Aker says:

    Hi!

    You realize that if the server was a library… you just re-invented “libmysqld” but without all of the IFDEF :)

    Cheers,
    -Brian

  2. Eric Day says:

    Yeah. :) The next step is to create a Client/Listen plugin pair that listens on a thread queue for new requests, and maps this to “clients” (which are external threads in the same process). This would be the next step for embedded, and hopefully we can wrap it up in a library and bring back embedded in a sane way.

  3. Thank you Eric.
    Added a section : Starting drizzle with server/debug console in wiki
    see : http://drizzle.org/wiki/Starting_drizzled
    will be helpful for new comers like me.

Leave a Reply


< || >
Blog
Wiki
About
Resume
RSS
Comments

E-Mail
Launchpad
LinkedIn
Twitter
identi.ca
Facebook

OpenStack
Scale Stack
Gearman
NW Veg
Veg Food & Fit

Linux On Laptops