|
@ -82,7 +82,7 @@ func (store *MysqlStore2) initialize(createTable, upsertQuery string, enableUpse |
|
|
store.DB.SetConnMaxLifetime(time.Duration(maxLifetimeSeconds) * time.Second) |
|
|
store.DB.SetConnMaxLifetime(time.Duration(maxLifetimeSeconds) * time.Second) |
|
|
|
|
|
|
|
|
if err = store.DB.Ping(); err != nil { |
|
|
if err = store.DB.Ping(); err != nil { |
|
|
return fmt.Errorf("connect to %s error:%v", sqlUrl, err) |
|
|
|
|
|
|
|
|
return fmt.Errorf("connect to %s error:%v", adaptedSqlUrl, err) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if err = store.CreateTable(context.Background(), abstract_sql.DEFAULT_TABLE); err != nil && !strings.Contains(err.Error(), "table already exist") { |
|
|
if err = store.CreateTable(context.Background(), abstract_sql.DEFAULT_TABLE); err != nil && !strings.Contains(err.Error(), "table already exist") { |
|
|