config root man

Current Path : /home/usr.opt/mysql57/mysql-test/suite/x/t/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //home/usr.opt/mysql57/mysql-test/suite/x/t/status_bytes_received.test

--echo Preamble

--source ../include/xplugin_preamble.inc
--disable_query_log
--disable_result_log

--write_file $MYSQL_TMP_DIR/mysqlx-capabilities-set-all-message.tmp
-->binparse %MESSAGE_DUMP% Mysqlx.Connection.CapabilitiesSet {
  capabilities {
    capabilities {
      name: "plugin.version"
      value {
        type: SCALAR
        scalar {
          type: V_STRING
          v_string {
            value: "1.0.0"
          }
        }
      }
    }
  }
}

-->varsub %MESSAGE_DUMP%
-->binsend %MESSAGE_DUMP%
-->recv
EOF

--write_file $MYSQL_TMP_DIR/mysqlx-capabilities-set-parts-message.tmp
-->binparse %MESSAGE_DUMP% Mysqlx.Connection.CapabilitiesSet {
  capabilities {
    capabilities {
      name: "plugin.version"
      value {
        type: SCALAR
        scalar {
          type: V_STRING
          v_string {
            value: "1.0.0"
          }
        }
      }
    }
  }
}

-->varsub %MESSAGE_DUMP%
-->binsendoffset %MESSAGE_DUMP% 0% 50%
-->sleep 0.2
-->varsub %MESSAGE_DUMP%
-->binsendoffset %MESSAGE_DUMP% 50% 100%

-->recv
EOF

--echo Test
--exec $MYSQLXTEST -u root --file=$MYSQL_TMP_DIR/mysqlx-capabilities-set-all-message.tmp -n 2>&1
--let $send_in_single_call= query_get_value(SHOW STATUS LIKE 'Mysqlx_bytes_received', Value, 1)
UNINSTALL PLUGIN mysqlx;
--source ../include/xplugin_install_and_wait.inc
--exec $MYSQLXTEST -u root --file=$MYSQL_TMP_DIR/mysqlx-capabilities-set-parts-message.tmp -n 2>&1
--let $send_in_two_calls= query_get_value(SHOW STATUS LIKE 'Mysqlx_bytes_received', Value, 1)

SHOW STATUS LIKE 'Mysqlx_bytes_received';

if ( $send_in_two_calls == 0) {
--die Reported size shouldn't be zero
}

if ( $send_in_two_calls != $send_in_single_call) {
--echo Message send in single call xplugin-reported data: $send_in_single_call
--echo Message send in two calls xplugin-reported data: $send_in_two_calls
--die Wrong size reported
} 
--echo Message sizes match
--echo Postamble
UNINSTALL PLUGIN mysqlx;

--remove_file $MYSQL_TMP_DIR/mysqlx-capabilities-set-all-message.tmp
--remove_file $MYSQL_TMP_DIR/mysqlx-capabilities-set-parts-message.tmp

Man Man