Documentation Home
MySQL Enterprise Monitor 3.0 Manual
Related Documentation Download this Manual
PDF (US Ltr) - 5.2Mb
PDF (A4) - 5.2Mb
EPUB - 3.7Mb
HTML Download (TGZ) - 3.6Mb
HTML Download (Zip) - 3.6Mb


22.3.3.2 Returning Multiple Rows

It is possible to return more than one row, using the result type CLASS_TYPE_1STCOL_ATTRIBUTES. This result type enables the return of a two-column result set as key-value pair. Unlike the default attributes, which are taken from the column name, the key is the attribute name and the value is the attribute value.

Important

The key value must be unique across the result set.

The following example shows how a 2-column result set is returned and formatted by the resulttype element:

   
  <class>
        <namespace>mysql</namespace>
        <classname>rpl_semi_sync_vars</classname>
        <query><![CDATA[
SHOW GLOBAL VARIABLES WHERE
Variable_name='rpl_semi_sync_master_timeout' OR
Variable_name='rpl_semi_sync_master_trace_level' OR
Variable_name='rpl_semi_sync_master_wait_no_slave' OR
Variable_name='rpl_semi_sync_master_enabled' OR
Variable_name='rpl_semi_sync_slave_enabled'
]]></query>
    <resulttype>CLASS_TYPE_1STCOL_ATTRIBUTES</resulttype>
     <attributes>
      <attribute name="rpl_semi_sync_master_timeout" counter="false" type="INTEGER"/>
      <attribute name="rpl_semi_sync_master_trace_level" counter="false" type="INTEGER"/>
      <attribute name="rpl_semi_sync_master_wait_no_slave" counter="false" type="STRING"/>
      <attribute name="rpl_semi_sync_master_enabled" counter="false" type="STRING"/>
      <attribute name="rpl_semi_sync_slave_enabled" counter="false" type="STRING"/>
     </attributes>
    </class>

User Comments
Sign Up Login You must be logged in to post a comment.