Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-6590

MySQL parser cannot parse CAST AS dec

XMLWordPrintable

      Caused by: io.debezium.text.ParsingException: DDL statement couldn't be parsed. Please open a Jira issue with the statement 'CREATE DEFINER=debezium@% PROCEDURE dbz_test()
      BEGIN
      SELECT
      CAST(id AS dec) as id
      FROM test;
      END'
      

      While CAST AS DEC is not explicitly mentioned in the documentation (only CAST AS DECIMAL which works), it works with MySQL, so we should support it:

      MySQL [(none)]> SELECT CAST('1' AS DEC);
      +------------------+
      | CAST('1' AS DEC) |
      +------------------+
      |                1 |
      +------------------+
      

      This causes issues when using Debezium with Percona, see https://debezium.zulipchat.com/#narrow/stream/348104-community-mysql/topic/Skip.20parsing.20Mysql.20procedures

              vjuranek@redhat.com Vojtech Juranek
              vjuranek@redhat.com Vojtech Juranek
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: