...
 
Commits (3)
    https://gitcode.net/xiaomi/soar/-/commit/1972d89e9347b03fef3e8de379f859781d405fcb fix bug of time parse by CleanupTestDatabase (#294) 2022-04-06T15:14:35+00:00 halleyshx shxdoitgo@gmail.com Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:shihuixing@jd.com" title="shihuixing@jd.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg3" style="text-decoration: none">N</a><a href="mailto:shihuixing@jd.com" title="shihuixing@jd.com">shihuixing</a> &lt;<a href="mailto:shihuixing@jd.com" title="shihuixing@jd.com">shihuixing@jd.com</a>&gt;</span> https://gitcode.net/xiaomi/soar/-/commit/e33c23bd076dd724b4807059cd4db6d459f5446a alter table 修改字符集用convert to (#295) 2022-04-06T15:21:39+00:00 tmysql 531907001@qq.com convert to匹配模式优化,允许两个单词中间有多个空格 https://gitcode.net/xiaomi/soar/-/commit/d431b19529f205c8dada1fca83e2d9bbf56cf1ed fix typo of DSN config in config.go (#290) 2022-04-06T15:39:57+00:00 Aurora 57168564+15265052@users.noreply.github.com
......@@ -2793,7 +2793,7 @@ func (q *Query4Audit) RuleAlterCharset() Rule {
if option.Tp == tidb.TableOptionCharset ||
option.Tp == tidb.TableOptionCollate {
//增加CONVERT TO的判断
convertReg, _ := regexp.Compile("convert to")
convertReg, _ := regexp.Compile("convert\\b\\s+to")
if convertReg.Match([]byte(strings.ToLower(q.Query))) {
break
} else {
......
......@@ -236,7 +236,7 @@ type Dsn struct {
Loc string `yaml:"loc"` // Location for time.Time values
TLS string `yaml:"tls"` // TLS configuration name
ServerPubKey string `yaml:"server-public-key"` // Server public key name
MaxAllowedPacket int `ymal:"max-allowed-packet"` // Max packet size allowed
MaxAllowedPacket int `yaml:"max-allowed-packet"` // Max packet size allowed
Params map[string]string `yaml:"params"` // Other Connection parameters, `SET param=val`, `SET NAMES charset`
Timeout string `yaml:"timeout"` // Dial timeout
ReadTimeout string `yaml:"read-timeout"` // I/O read timeout
......
......@@ -172,7 +172,7 @@ func (vEnv *VirtualEnv) CleanupTestDatabase() {
continue
}
s := strings.Split(testDatabase, "_")
pastTime, err := time.Parse("060102150405", s[1])
pastTime, err := time.ParseInLocation("060102150405", s[1], time.Local)
if err != nil {
common.Log.Error("CleanupTestDatabase compute pastTime Error: %s", err.Error())
continue
......