hanchuanchuan / goInception

一个集审核、执行、备份及生成回滚语句于一身的MySQL运维工具
https://hanchuanchuan.github.io/goInception/
GNU General Public License v3.0
1.6k stars 545 forks source link

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

Open sona-yuan opened 11 months ago

sona-yuan commented 11 months ago

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

环境

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

hanchuanchuan commented 11 months ago

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

sona-yuan commented 11 months ago

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