alibaba / druid

阿里云计算平台DataWorks(https://help.aliyun.com/document_detail/137663.html) 团队出品,为监控而生的数据库连接池
https://github.com/alibaba/druid/wiki
Apache License 2.0
27.98k stars 8.58k forks source link

alter table tab_s UNION=(tab_s_201601,tab_s_201602,tab_s_201603) 报错。请问怎么配置可以解决? #1046

Open yuqi141421 opened 8 years ago

yuqi141421 commented 8 years ago

alter table tab_s UNION=(tab_s_201601,tab_s_201602,tab_s_201603) 报错。请问怎么配置可以解决?

Error updating database. Cause: java.sql.SQLException: sql injection violation, syntax error: syntax error, error in :'tics UNION=(tab_s_201601',expect UNION, actual UNION UNION : alter table tab_s UNION=(tab_s_201601,tab_s_201602,tab_s_201603)

SQL: alter table tab_s UNION=(tab_s_201601,tab_s_201602,tab_s_201603)

Cause: java.sql.SQLException: sql injection violation, syntax error: syntax error, error in :'tics UNION=(tab_s_201601',expect UNION, actual UNION UNION : alter table tab_s UNION=(tab_s_201601,tab_s_201602,tab_s_201603)

; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; sql injection violation, syntax error: syntax error, error in :'tics UNION=(tab_s_201601',expect UNION, actual UNION UNION : alter table tab_s UNION=(tab_s_201601,tab_s_201602,tab_s_201603); nested exception is java.sql.SQLException: sql injection violation, syntax error: syntax error, error in :'tics UNION=(tab_s_201601',expect UNION, actual UNION UNION : alter table tab_s UNION=(tab_s_201601,tab_s_201602,tab_s_201603)

wenshao commented 8 years ago

这是什么语法?

yuqi141421 commented 8 years ago

mysql merge表修改子表

pop-lee commented 8 years ago

同样的问题,不知道现在哪个版本解决了这个问题,我看了下SQLStatement的parseStatementList方法里貌似还不支持alert table 中使用union(1.0.18版)