Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Bug fix: ApplyMultiStatements should apply the remaining content.

spinningbotc2403f90223b
diff --git a/plugin/db/util/driverutil.go b/plugin/db/util/driverutil.go
index 101d77ff76..4edb866468 100644
--- a/plugin/db/util/driverutil.go
+++ b/plugin/db/util/driverutil.go
@@ -57,6 +57,13 @@ func ApplyMultiStatements(sc *bufio.Scanner, f func(string) error) error {
s = ""
}
}
+ // Apply the remaining content.
+ if s != "" {
+ if err := f(s); err != nil {
+ return fmt.Errorf("execute query %q failed: %v", s, err)
+ }
+ }
+
if err := sc.Err(); err != nil {
return err
}