From: Nicolas Boisselier Date: Wed, 6 Apr 2016 16:31:49 +0000 (+0200) Subject: slave status X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=53d8fa717758d9e974e11b56e3f5c73196f1943b;p=nb.git slave status --- diff --git a/lib/php/db/types/mysql.php b/lib/php/db/types/mysql.php index e5a5e71b..00a754d7 100644 --- a/lib/php/db/types/mysql.php +++ b/lib/php/db/types/mysql.php @@ -22,6 +22,12 @@ $DB_TYPES['mysql'] = array ( 'if (preg_match("/^(Table|.*[Cc]onn|Open|Com).*/",$r["Variable_name"]))' .'return array("VAR.".$r[0]=>$r[1]);' ))), + 'SHOW SLAVE STATUS' => create_function('&$r',join('',array( + 'foreach ($r as $k=>$v) {', + 'if (!preg_match("/^(Seconds_Behind_Master)$/",$k)) unset($r[$k]);', + '}', + 'return $r;', + ))), ), 'table.fields' => array (