[ 
https://issues.apache.org/jira/browse/FLINK-32587?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

jasonliangyc updated FLINK-32587:
---------------------------------
    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.
{code:java}
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'
 ); {code}
Run the query for the first time, the data look normal.

!image-2023-07-13-17-35-32-235.png|width=535,height=141!

 

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 retruned the wrong 
columns.

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

!image-2023-07-21-14-48-31-572.png|width=533,height=159!

  was:
I created a CDC table as below and then run the query 'select * from so_cdc' 
through sql-client, it gives me the unexpected results.
{code:java}
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'
 ); {code}
Run the query for the first time, the data look normal.

!image-2023-07-13-17-35-32-235.png|width=535,height=141!

 

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 cdc source table don't contain these 
data

!image-2023-07-13-17-37-56-908.png|width=469,height=175!


> The results returned from the CDC sql query are null or the value was changed 
> unexpectly
> ----------------------------------------------------------------------------------------
>
>                 Key: FLINK-32587
>                 URL: https://issues.apache.org/jira/browse/FLINK-32587
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Client
>    Affects Versions: 1.17.0, 1.17.1
>            Reporter: jasonliangyc
>            Priority: Critical
>         Attachments: image-2023-07-13-17-35-32-235.png, 
> image-2023-07-13-17-37-56-908.png, image-2023-07-21-14-48-31-572.png
>
>
> 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.
> {code:java}
> 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'
>  ); {code}
> Run the query for the first time, the data look normal.
> !image-2023-07-13-17-35-32-235.png|width=535,height=141!
>  
> 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 retruned the wrong 
> columns.
> Above sqlserver source table is in the production database and i can't 
> reproduce the same issue in dev db.
> !image-2023-07-21-14-48-31-572.png|width=533,height=159!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to