Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] [AUTO_INCREMENT未同步] Bug AUTO_INCREMENT未同步 #8363

Open
1 of 3 tasks
Laughingtt opened this issue Dec 23, 2024 · 0 comments
Open
1 of 3 tasks

[Bug] [AUTO_INCREMENT未同步] Bug AUTO_INCREMENT未同步 #8363

Laughingtt opened this issue Dec 23, 2024 · 0 comments
Labels

Comments

@Laughingtt
Copy link

Laughingtt commented Dec 23, 2024

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

同步mysql 表时,字段ID为自增状态时,自增状态 AUTO_INCREMENT 不会同步

mysql> show create table test.A;
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table
|
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| A | CREATE TABLE A (
id int NOT NULL AUTO_INCREMENT,
data varchar(50) DEFAULT NULL,
age int NOT NULL DEFAULT '18',
PRIMARY KEY (id)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb3 |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> show create table test_sink.A;
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table
|
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
| A | CREATE TABLE A (
id int NOT NULL,
data varchar(50) DEFAULT NULL,
age int NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 |
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

SeaTunnel Version

3.8.-

SeaTunnel Config

{
  "env": {
    "parallelism": 1,
    "job.mode": "batch"
  },
  "source": [
    {
      "plugin_name": "Jdbc",
      "url": "",
      "driver": "com.mysql.cj.jdbc.Driver",
      "connection_check_timeout_sec": 100,
      "user": "",
      "password": "",
      "table_list": [
        {
          "table_path": "test.A"
        },
        {
          "table_path": "test.B"
        }
      ]
    }
  ],
  "sink": [
    {
      "plugin_name": "jdbc",
      "url": "",
      "driver": "com.mysql.cj.jdbc.Driver",
      "user": "",
      "password": "",
      "generate_sink_sql": true,
      "database": "test_sink",
      "schema_save_mode": "RECREATE_SCHEMA",
      "data_save_mode": "DROP_DATA"
    }
  ]
}

Running Command

post api

Error Exception

null

Zeta or Flink or Spark Version

No response

Java or Scala Version

No response

Screenshots

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@Laughingtt Laughingtt added the bug label Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant