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

MySQL LIMIT by variable is not supported in grammar

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • None
    • None
    • mysql-connector
    • None
    • False
    • False
    • Undefined

    Description

      MySQL allows for CREATE PROCEDURE calls - for example

      CREATE PROCEDURE `reproducer`()
      BEGIN
          DECLARE `i` INT;
          SET `i`=0;
          SELECT `a` FROM `b` LIMIT i, 1;
      END;
      

      However, when I create a procedure like this, it breaks MySQL connector when it's parsing binlogs. The problem is with LIMIT clause containing a variable - having the same with constants works fine.

      Note: this is the smallest viable reproducer. I know it can be written in a different manner, but it was created based on something really doing its work.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              petoju Peter Junos (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: