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

审核规则以及审核级别返回与配置不一致 #599

Open
sona-yuan opened this issue Aug 16, 2023 · 2 comments
Open

审核规则以及审核级别返回与配置不一致 #599

sona-yuan opened this issue Aug 16, 2023 · 2 comments

Comments

@sona-yuan
Copy link

描述
设置了enable_set_collation=false
er_cant_set_collation=2
但是建表语句有字符集时,审核报错级别只有1

重现
import pymysql
import prettytable as pt
tb = pt.PrettyTable()

sql = '''/--user=admin;--password=admin;--host=127.0.0.1;--check=1;--port=3306;/
inception_magic_start;
use archery;
create table t1(id int comment 'id',primary key (id))ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin comment='t1';
inception_magic_commit;'''

conn = pymysql.connect(host='127.0.0.1', user='', passwd='',
db='', port=4000, charset="utf8mb4")
cur = conn.cursor()
ret = cur.execute(sql)
result = cur.fetchall()
cur.close()
conn.close()

tb.field_names = [i[0] for i in cur.description]
for row in result:
tb.add_row(row)
print(tb)

image
image

环境

  • 数据库: [mysql/mariadb]
  • 版本: [例如 5.7.21]

参数
可能与问题相关的设置参数
enable_set_collation=false
er_cant_set_collation=2

@hanchuanchuan
Copy link
Owner

请使用参数er_table_collation_not_support.
inc set level er_table_collation_not_support=2.

@sona-yuan
Copy link
Author

image
请问这两个参数是什么版本引入的呀,我在用的是1.2.5版本,没有这个参数呢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants