Skip to content

Commit

Permalink
renaming files for improved readability.
Browse files Browse the repository at this point in the history
  • Loading branch information
bo-er committed Jan 11, 2024
1 parent ffdcbde commit 83e5994
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions backend/bigtransaction.go → backend/big_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ INSERT INTO t() values(),(),(),();

// calling this 10 times we get a transaction of size 10KB
const quadraticGrowthSQL = `
USE corrupt_mysql_bigtransaction_test;
insert into t(x) select x+(select count(1) from t) from t;
`

Expand Down Expand Up @@ -67,8 +66,13 @@ func CreatesBigTransactions(c pkg.Connect, maxSize string) error {
if err != nil {
return err
}
// maybe there is a better way to do this.
_, err = db.Exec(`USE corrupt_mysql_bigtransaction_test;`)
if err != nil {
return fmt.Errorf("use corrupt_mysql_bigtransaction_test: %s", err.Error())
}
for i := 1; i <= 10+power; i++ {
err = pkg.BatchExec(db, quadraticGrowthSQL)
_, err = db.Exec(quadraticGrowthSQL)
if err != nil {
return fmt.Errorf("calling(%s) for the %dth time: %s", quadraticGrowthSQL, i, err.Error())
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 83e5994

Please sign in to comment.