Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-32587

The results returned from the CDC sql query are null or the value was changed unexpectly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Reopened
    • Critical
    • Resolution: Unresolved
    • 1.17.0, 1.17.1
    • None
    • Table SQL / Client
    • None

    Description

      I created a CDC table(the sqlserver source table has more than 100 columns) as below and then run the query 'select * from so_cdc' through sql-client, it gives me the unexpected results.

      CREATE TABLE so_cdc (
         REC_ID STRING,
         Create_Date TIMESTAMP(3),
         PRIMARY KEY (REC_ID) NOT ENFORCED
       ) WITH (
          'connector' = 'sqlserver-cdc',
          'hostname' = 'xxxx',
          'port' = 'xxxx',
          'username' = 'xxx',
          'password' = 'xxxx',
          'database-name' = 'xxxx',
          'schema-name' = 'xxxx',
          'table-name' = 'xxx',
          'scan.startup.mode' = 'latest-offset'
       ); 

      Run the query for the first time, the data look normal.

       

      But after i run the same query multiple times, it gives me the unexpected data, and i'm sure that these two columns of my sqlserver source table don't contain these data.

      And i found that the values of 'REC_ID' were actually the values of another column in the sqlserver source table, it seems the query returned the wrong columns.

      Above sqlserver source table is in the production database and i can't reproduce the same issue in dev db.

      Attachments

        1. image-2023-07-13-17-35-32-235.png
          20 kB
          jasonliangyc
        2. image-2023-07-13-17-37-56-908.png
          36 kB
          jasonliangyc
        3. image-2023-07-21-14-48-31-572.png
          25 kB
          jasonliangyc
        4. image-2023-08-02-16-40-32-476.png
          96 kB
          jasonliangyc
        5. image-2023-08-02-16-43-25-458.png
          77 kB
          jasonliangyc
        6. image-2023-08-02-17-03-05-932.png
          57 kB
          jasonliangyc
        7. image-2023-08-02-17-07-19-295.png
          32 kB
          jasonliangyc
        8. image-2023-08-02-17-09-14-671.png
          45 kB
          jasonliangyc
        9. image-2023-08-02-17-10-03-889.png
          39 kB
          jasonliangyc
        10. image-2023-08-02-17-18-06-375.png
          38 kB
          jasonliangyc
        11. image-2023-08-02-17-25-36-207.png
          11 kB
          jasonliangyc
        12. image-2023-08-02-17-26-08-692.png
          15 kB
          jasonliangyc

        Activity

          People

            Unassigned Unassigned
            jasonliangyc jasonliangyc
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: