Skip to content

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

chore: record original statement (#13030)

h3n4lfaaf637e9fe3
diff --git a/backend/plugin/db/mysql/mysql.go b/backend/plugin/db/mysql/mysql.go
index 56f0f1a9d7..dc42ae75fc 100644
--- a/backend/plugin/db/mysql/mysql.go
+++ b/backend/plugin/db/mysql/mysql.go
@@ -503,7 +503,7 @@ func (d *Driver) querySingleSQL(ctx context.Context, conn *sql.Conn, singleSQL b
return nil, err
}
result.Latency = durationpb.New(time.Since(startTime))
- result.Statement = sqlWithBytebaseAppComment
+ result.Statement = statement
return result, nil
}
diff --git a/backend/plugin/db/tidb/tidb.go b/backend/plugin/db/tidb/tidb.go
index 2b19f8a94e..60183600d2 100644
--- a/backend/plugin/db/tidb/tidb.go
+++ b/backend/plugin/db/tidb/tidb.go
@@ -399,7 +399,7 @@ func (d *Driver) querySingleSQL(ctx context.Context, conn *sql.Conn, singleSQL b
return nil, err
}
result.Latency = durationpb.New(time.Since(startTime))
- result.Statement = sqlWithBytebaseAppComment
+ result.Statement = statement
return result, nil
}
diff --git a/backend/plugin/db/util/driverutil.go b/backend/plugin/db/util/driverutil.go
index 506a91b0b6..b56a2426cb 100644
--- a/backend/plugin/db/util/driverutil.go
+++ b/backend/plugin/db/util/driverutil.go
@@ -102,7 +102,7 @@ func RunStatement(ctx context.Context, engineType storepb.Engine, conn *sql.Conn
})
continue
}
- results = append(results, adminQuery(ctx, engineType, conn, runningStatement))
+ results = append(results, adminQuery(ctx, engineType, conn, singleSQL.Text))
}
return results, nil