diff --git a/pkg/workload/cli/run.go b/pkg/workload/cli/run.go index 9ea322e71627..aaa6fc8508ad 100644 --- a/pkg/workload/cli/run.go +++ b/pkg/workload/cli/run.go @@ -595,8 +595,8 @@ func runRun(gen workload.Generator, urls []string, dbName string) error { } continue } - // Log the error so we get the stack trace. - log.Errorf(ctx, "%v", err) + // Log the error with %+v so we get the stack trace. + log.Errorf(ctx, "workload run error: %+v", err) return err case <-ticker.C: diff --git a/pkg/workload/schemachange/operation_generator.go b/pkg/workload/schemachange/operation_generator.go index 19171f84c3c4..df8b72ad00fd 100644 --- a/pkg/workload/schemachange/operation_generator.go +++ b/pkg/workload/schemachange/operation_generator.go @@ -3141,6 +3141,10 @@ func (es *ErrorState) Unwrap() error { return es.cause } +func (es *ErrorState) Cause() error { + return es.cause +} + func (es *ErrorState) Error() string { return es.cause.Error() } diff --git a/pkg/workload/schemachange/schemachange.go b/pkg/workload/schemachange/schemachange.go index 8601f004fdbf..01068a771b08 100644 --- a/pkg/workload/schemachange/schemachange.go +++ b/pkg/workload/schemachange/schemachange.go @@ -339,8 +339,16 @@ func (s *schemaChange) Ops( // setClusterSettings configures any settings required for the workload ahead // of starting workers. func (s *schemaChange) setClusterSettings(ctx context.Context, pool *workload.MultiConnPool) error { - _, err := pool.Get().Exec(ctx, `SET CLUSTER SETTING sql.defaults.super_regions.enabled = 'on'`) - return errors.WithStack(err) + for _, stmt := range []string{ + `SET CLUSTER SETTING sql.defaults.super_regions.enabled = 'on'`, + `SET CLUSTER SETTING sql.log.all_statements.enabled = 'on'`, + } { + _, err := pool.Get().Exec(ctx, stmt) + if err != nil { + return errors.WithStack(err) + } + } + return nil } // initSeqName returns the smallest available sequence number to be