Stewart Smith wrote:
On Mon, Nov 09, 2009 at 08:59:38AM -0500, Jay Pipes wrote:
CREATE TABLE INFORMATION_SCHEMA.TRANSACTION_LOG_ENTRIES (
 ENTRY_OFFSET BIGINT NOT NULL
, ENTRY_TYPE VARCHAR NOT NULL
, ENTRY_LENGTH BIGINT NOT NULL
);
ENTRY BLOB

then can write more tests as plain sql :)
Eh, kinda.  There is an ENTRY_TYPE of "BLOB" coming shortly.  I
didn't think that there didn't to be a separate view for the BLOBs
themselves since pretty much all the information one needs *about*
the BLOB is in the view above...

was thinking the blob of the serialised proto. could use this to write
SQL that always checks we're generating the same stream.

:) That's what the UDF below does :)

Here is example output from it (I got a bunch of it done yesterday):

SELECT PRINT_TRANSACTION_MESSAGE("transaction.log", 0) as msg_text;
msg_text
transaction_context {
  server_id: 1
  transaction_id: 1
  start_timestamp: 1257865022093478
  end_timestamp: 1257865022093488
}
statement {
  type: RAW_SQL
  start_timestamp: 1257865022093483
  end_timestamp: 1257865022093487
  sql: "DROP TABLE IF EXISTS `t1`"
}


CREATE TABLE INFORMATION_SCHEMA.TRANSACTION_LOG_TRANSACTIONS (
 ENTRY_OFFSET BIGINT NOT NULL
, TRANSACTION_ID BIGINT NOT NULL
, SERVER_ID INT NOT NULL
, START_TIMESTAMP BIGINT NOT NULL
, END_TIMESTAMP BIGINT NOT NULL
, NUM_STATEMENTS INT NOT NULL
);
possible to get at all the entries for a txn?
Yes, but via a UDF called PRINT_TRANSACTION_MESSAGE().  More on this
today...

Cheers!
jay




_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to