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

LogMinerDmlParser mishandles double single quotes in WHERE clauses

XMLWordPrintable

      The LogMinerDmlParser doesn't handle a double single quote in the value of a WHERE clause correctly. The first single quote is interpreted as the end of the column value and the value parsing is terminated early. This also can cause subsequent column values to be parsed incorrectly. The double single quote is used to escape a single quote.

       

      As an example, if the update statement is:

      update "DEBEZIUM"."TEST" set "COL2" = '1' where "COL1" = 'Bob''s dog' and "COL2" = '0';
      

      , then the first column value is parsed as "Bob" instead of "Bob''s dog".

       

      This only seems to apply to the WHERE clause parsing for update and delete and looks okay in insert statements.

       

      I plan to create a PR for this issue.

            Unassigned Unassigned
            infinitesnowboy Patrick Chu (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: