forums › forums › SQLyog › Using SQLyog › [Offtopic] Select A Single Field From Slave Status
- This topic is empty.
-
AuthorPosts
-
-
January 28, 2011 at 11:01 am #12242larsenParticipant
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
-
January 28, 2011 at 12:08 pm #31892peterlaursenParticipant
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 STATUSCompare 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.
-
January 28, 2011 at 12:24 pm #31893vishal.prMember
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)
-
January 28, 2011 at 12:59 pm #31894larsenParticipant'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.
-
-
AuthorPosts
- You must be logged in to reply to this topic.