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

Add support of parentheses to MySQL enum values

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 0.3.5, 0.4
    • 0.3.4
    • mysql-connector
    • None

      It was noticed that all declared enum values which go after one with included parentheses are not capturing (inclusively) by debezium.

      Create table script :

      create table TestEnum (
          Id int primary key, 
          EnumColumn ENUM('one', 'one two', 'one two three', 'one () five', 'six')
      );
      

      Working insert :

      insert into TestEnum values (1, 'one two three');
      

      DBZ message :

      {
          "before": null,
          "after": {
              "Id": 1,
              "EnumColumn": "one two three"
          },
          "source": {
              "name": "anton_staging",
              "server_id": 223344,
              "ts_sec": 1479129738,
              "gtid": null,
              "file": "mysql-bin.000010",
              "pos": 20908,
              "row": 0,
              "snapshot": null
          },
          "op": "c",
          "ts_ms": 1479129737253
      }
      

      Not-working insert :

      insert into TestEnum values (2, 'six');
      

      DBZ message :

      {
          "before": null,
          "after": {
              "Id": 2,
              "EnumColumn": null
          },
          "source": {
              "name": "anton_staging",
              "server_id": 223344,
              "ts_sec": 1479129803,
              "gtid": null,
              "file": "mysql-bin.000010",
              "pos": 21126,
              "row": 0,
              "snapshot": null
          },
          "op": "c",
          "ts_ms": 1479129801478
      }
      

      Notice, that second message has "EnumColumn": null

              rhauch Randall Hauch (Inactive)
              anton_nazaruk Anton Nazaruk (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: