Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov committed Mar 24, 2024
1 parent 5d7b4e6 commit f7e0a7c
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions mdbx/txn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,29 @@ func TestTxn_OpenDBI_emptyName(t *testing.T) {
}

func TestTxn_OpenDBI_zero(t *testing.T) {
env, _ := setup(t)
env, err := NewEnv()
if err != nil {
t.Fatalf("env: %s", err)
}
path := t.TempDir()
err = env.SetOption(OptMaxDB, 1024)
if err != nil {
t.Fatalf("setmaxdbs: %v", err)
}
const pageSize = 4096
err = env.SetGeometry(-1, -1, 64*1024*pageSize, -1, -1, pageSize)
if err != nil {
t.Fatalf("setmaxdbs: %v", err)
}
err = env.Open(path, 0, 0664)
if err != nil {
t.Fatalf("open: %s", err)
}
t.Cleanup(func() {
env.Close()
})

err := env.View(func(txn *Txn) (err error) {
err = env.View(func(txn *Txn) (err error) {
_, err = txn.OpenRoot(0)
if err != nil {
return err
Expand Down

0 comments on commit f7e0a7c

Please sign in to comment.