charles-001 / dolphie

Your single pane of glass for real-time analytics into MySQL/MariaDB & ProxySQL
https://pypi.org/project/dolphie/
GNU General Public License v3.0
589 stars 36 forks source link

FUNCTION GTID_SUBTRACT does not exist #24

Closed gregorg closed 1 year ago

gregorg commented 1 year ago

Can't run it on MariaDB 11.1.2, got this error :

  Dolphie🐬

  Error
 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  Failed to execute query

  /* dolphie */
          SELECT MAX(`lag`) AS Seconds_Behind_Master
              FROM (
                  SELECT MAX(TIMESTAMPDIFF(SECOND, APPLYING_TRANSACTION_IMMEDIATE_COMMIT_TIMESTAMP, NOW())) AS `lag`
                  FROM performance_schema.replication_applier_status_by_worker

                  UNION

                  SELECT MIN(
                      IF(
                          GTID_SUBTRACT(LAST_QUEUED_TRANSACTION, LAST_APPLIED_TRANSACTION) = '',
                          0,
                          TIMESTAMPDIFF(SECOND, LAST_APPLIED_TRANSACTION_IMMEDIATE_COMMIT_TIMESTAMP, NOW())
                      )
                  ) AS `lag`
                  FROM performance_schema.replication_applier_status_by_worker w
                  JOIN performance_schema.replication_connection_status s ON s.channel_name = w.channel_name
              ) required

  FUNCTION GTID_SUBTRACT does not exist
charles-001 commented 1 year ago

Hi @gregorg - unfortunately, MariaDB isn't supported atm. I welcome anyone that would like to contribute for it. Personally, I don't use MariaDB and am not up-to-speed with its features.

gregorg commented 1 year ago

I did it : https://github.com/charles-001/dolphie/pull/25

charles-001 commented 1 year ago

Thank you! I'm sure others will be glad as well :)