Unsupported Screen Size: The viewport size is too small for the theme to render properly.

[Offtopic] Select A Single Field From Slave Status

forums forums SQLyog Using SQLyog [Offtopic] Select A Single Field From Slave Status

  • This topic is empty.
Viewing 3 reply threads
  • Author
    Posts
    • #12242
      larsen
      Participant

      Hi,

      the output of “SHOW SLAVE STATUS” is quite wide and therefore needs extensive scrolling to get to the part that´s interesting for me.

      How can I select only a single field from that output (something like “SHOW Last_Error FROM SLAVE STATUS”)?

      Lars

    • #31892
      peterlaursen
      Participant

      The way to do it with most SHOW statements would be “SHOW SLAVE STATUS LIKE 'Last_Error';” — but MySQL “SHOW SLAVE STATUS” does not support the LIKE clause.

      See here: http://dev.mysql.com…ve-status.html. The syntax is just listed as

      Code:
      SHOW SLAVE STATUS

      Compare http://dev.mysql.com…ow-status.html. Here the syntax is listed as

      Code:
      SHOW [GLOBAL | SESSION] STATUS
      [LIKE 'pattern' | WHERE expr]

      This is a request for MySQL and not for us.

      EDIT: to do this it should rather be a WHERE (and not LIKE) option. LIKE will filter rows in the output, WHERE will filter columns. But as per Vishal's comment below I don't think that MySQL will improve SHOW anymore. They will likely put their effort into improving Information_Schema and Performance_Schema databases instead.

    • #31893
      vishal.pr
      Member

      Also I think there is a work already in progress to have a table for master/slave status under performance schema, so that user can select directly from performance_schema (like SELECT * from performance_schema.slave_status)

    • #31894
      larsen
      Participant
      'peterlaursen' wrote:

      This is a request for MySQL and not for us.

      That´s why I posted it as [offtopic] and also I wouldn´t know a better place than this forum =)

      Thanks for the answers. Seems like I have to live with that.

Viewing 3 reply threads
  • You must be logged in to reply to this topic.