goInception icon indicating copy to clipboard operation
goInception copied to clipboard

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

Open sona-yuan opened this issue 1 year ago • 2 comments

描述 设置了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

sona-yuan avatar Aug 16 '23 10:08 sona-yuan

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

hanchuanchuan avatar Aug 20 '23 11:08 hanchuanchuan

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

sona-yuan avatar Aug 22 '23 01:08 sona-yuan