Re: DbMerger/MySQL compatibility

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu Aug 28 2008 - 15:34:17 EDT

  • Next message: Scott Anderson: "RE: DbMerger/MySQL compatibility"

    Not sure if that's helpful at all, but we have a mechanism to detect
    the default table type on a given DB. See MySQLSniffer for details
    ("SHOW VARIABLES LIKE 'table_type'"). Maybe not that helpful, as (1)
    it is not using metadata, but rather a MySQL specific command and (2)
    DB default doesn't necessarily means all tables will follow that. I
    have schemas that mix and match InnoDB and MyISAM (for no good reason
    IMO, but still).

    Andrus

    On Aug 28, 2008, at 10:19 PM, Tore Halset wrote:

    >
    > On Aug 28, 2008, at 21:03, Scott Anderson wrote:
    >
    >>> Is it possible to detect this via jdbc?
    >>
    >> A rather long-winded way to detect table type is:
    >> SHOW CREATE TABLE [table name];
    >>
    >> This will return the full CREATE TABLE instruction required to
    >> rebuild
    >> that table. If this is already how you determine what the fields look
    >> like, it should be trivial to add logic to parse the ENGINE
    >> parameter.
    >
    > Currently, I use jdbc metadata only.
    >
    > - Tore.
    >



    This archive was generated by hypermail 2.0.0 : Thu Aug 28 2008 - 15:34:50 EDT