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

The entire database is synchronized with CDC, and the table is created after execution. Tip: Execute statement types are not included: INSERT, SELECT, WITH, SHOW, DESCRIBE, DESC, CTAS #3764

Closed
2 of 3 tasks
zong-xin opened this issue Aug 30, 2024 · 4 comments · Fixed by #3774
Assignees
Labels
Bug Something isn't working

Comments

@zong-xin
Copy link

Search before asking

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

What happened

提示 不包含可执行的语句类型: INSERT,SELECT,WITH,SHOW,DESCRIBE,DESC,CTAS

What you expected to happen

异常提示:
org.dinky.data.exception.BusException: 不包含可执行的语句类型: INSERT,SELECT,WITH,SHOW,DESCRIBE,DESC,CTAS
at org.dinky.job.builder.JobTransBuilder.run(JobTransBuilder.java:73) ~[classes/:?]
at org.dinky.job.JobManager.executeSql(JobManager.java:299) ~[classes/:?]
at org.dinky.service.task.FlinkSqlTask.execute(FlinkSqlTask.java:68) ~[classes/:?]
at org.dinky.service.impl.TaskServiceImpl.executeJob(TaskServiceImpl.java:202) ~[classes/:?]
at org.dinky.service.impl.TaskServiceImpl$$FastClassBySpringCGLIB$$22087f7c.invoke() ~[classes/:?]

How to reproduce

配置如下:
EXECUTE CDCSOURCE cdc_mysql WITH (
'connector' = 'mysql-cdc',
'hostname' = '127.0.0.1',
'port' = '3306',
'username' = 'dinky',
'password' = 'dinky',
'checkpoint' = '3000',
'scan.startup.mode' = 'initial',
'parallelism' = '1',
'table-name' = 'dinky.dinky_sys_operate_log,dinky.dinky_sys_config',
'sink.connector' = 'jdbc',
'sink.url' = 'jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf-8&useSSL=false',
'sink.username' = 'test',
'sink.password' = 'test123',
'sink.sink.db' = 'test',
'sink.table.prefix' = 'test_',
'sink.table.lower' = 'true',
'sink.table-name' = '#{tableName}',
'sink.driver' = 'com.mysql.jdbc.Driver',
'sink.sink.buffer-flush.interval' = '2s',
'sink.sink.buffer-flush.max-rows' = '100',
'sink.sink.max-retries' = '5',
'sink.auto.create' = 'true'
)

Anything else

No response

Version

dev

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@zong-xin zong-xin added Bug Something isn't working Waiting for reply Waiting for reply labels Aug 30, 2024
Copy link

Hello @zong-xin, this issue is about CDC/CDCSOURCE, so I assign it to @aiwenmo. If you have any questions, you can comment and reply.

你好 @zong-xin, 这个 issue 是关于 CDC/CDCSOURCE 的,所以我把它分配给了 @aiwenmo。如有任何问题,可以评论回复。

@github-actions github-actions bot changed the title 整库同步CDC,执行后创建完表 提示 不包含可执行的语句类型: INSERT,SELECT,WITH,SHOW,DESCRIBE,DESC,CTAS The entire database is synchronized with CDC, and the table is created after execution. Tip: Execute statement types are not included: INSERT, SELECT, WITH, SHOW, DESCRIBE, DESC, CTAS Aug 30, 2024
@Zzm0809
Copy link
Contributor

Zzm0809 commented Aug 31, 2024

@suxinshuo hi, 请协助验证是否存在该问题!!!

@aiwenmo aiwenmo removed the Waiting for reply Waiting for reply label Aug 31, 2024
@suxinshuo
Copy link
Contributor

@suxinshuo hi, 请协助验证是否存在该问题!!!

确实存在这个问题,之前在 #3704 中把 return 改成了抛出异常,导致第四步没办法执行了。之前是认为 jobParam 的 trans 是空,就是没有可执行的语句,现在看来好像不对,我恢复成直接 return 吧,辛苦大佬帮忙确认一下 @Zzm0809
image
image

@Zzm0809
Copy link
Contributor

Zzm0809 commented Sep 2, 2024

@suxinshuo hi, 请协助验证是否存在该问题!!!

确实存在这个问题,之前在 #3704 中把 return 改成了抛出异常,导致第四步没办法执行了。之前是认为 jobParam 的 trans 是空,就是没有可执行的语句,现在看来好像不对,我恢复成直接 return 吧,辛苦大佬帮忙确认一下 @Zzm0809
image
image

可以在增加这个参数值场景下本地调试一下进行验证,然后修复即可

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants