Unified Storage: Wrapping the mysql driver with hooks causes issues (#92099)

dont wrap the mysql driver with hooks. Its causing the error 'begin tx: sql: driver does not support non-default isolation level'.
This commit is contained in:
owensmallwood
2024-08-19 15:09:25 -06:00
committed by GitHub
parent b97fb3bb78
commit 1cb3470e3e

View File

@@ -51,8 +51,9 @@ func getEngineMySQL(getter *sectionGetter, tracer tracing.Tracer) (*xorm.Engine,
}
// FIXME: get rid of xorm
driverName := sqlstore.WrapDatabaseDriverWithHooks(db.DriverMySQL, tracer)
engine, err := xorm.NewEngine(driverName, config.FormatDSN())
// TODO figure out why wrapping the db driver with hooks causes mysql errors when writing
//driverName := sqlstore.WrapDatabaseDriverWithHooks(db.DriverMySQL, tracer)
engine, err := xorm.NewEngine(db.DriverMySQL, config.FormatDSN())
if err != nil {
return nil, fmt.Errorf("open database: %w", err)
}