From cf1a90dfc157b3277eac734684d945451bcd8012 Mon Sep 17 00:00:00 2001 From: sunhao Date: Fri, 1 Sep 2023 14:40:33 +0800 Subject: [PATCH] * zin: fix error when db driver is dm (DaMeng). --- lib/trace/trace.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/trace/trace.class.php b/lib/trace/trace.class.php index c142def963..a1ef44dd53 100644 --- a/lib/trace/trace.class.php +++ b/lib/trace/trace.class.php @@ -80,6 +80,10 @@ class trace */ public function getSQLProfiles() { + global $config; + /* 达梦数据库不支持下面的语法,直接跳过。The */ + if($config->db->driver === 'dm') return; + $profiling = $this->dao->dbh->query('SHOW PROFILES')->fetchAll(PDO::FETCH_ASSOC); $this->trace['profiles'] = $profiling;