Skip to content

Commit f60b059

Browse files
database_observability: remove unused XwbSqlParser (#3590)
The tidb parser was already the default one, and now is the only option available.
1 parent 47b9056 commit f60b059

File tree

12 files changed

+64
-441
lines changed

12 files changed

+64
-441
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Main (unreleased)
5151
- `query_sample`: base log entries on calculated timestamp from rows, not now() (@fridgepoet)
5252
- `query_sample`: check digest is not null (@cristiangreco)
5353
- `query_sample`: add additional logs for wait events (@fridgepoet)
54+
- make tidb the default and only sql parser
5455

5556
- Mixin dashboards improvements: added minimum cluster size to Cluster Overview dashboard, fixed units in OpenTelemetry dashboard, fixed slow components evaluation time units in Controller dashboard and updated Prometheus dashboard to correctly aggregate across instances. (@thampiotr)
5657

@@ -64,7 +65,7 @@ Main (unreleased)
6465
to all queries discovered via `PrometheusRule` CRDs. (@QuentinBisson)
6566

6667
- Add optional `id` field to `foreach` block to generate more meaningful component paths in metrics by using a specific field from collection items. (@harshrai654)
67-
68+
6869
- The `mimir.rules.kubernetes` component now supports adding extra label matchers
6970
to all queries discovered via `PrometheusRule` CRDs by extracting label values defined on the `PrometheusRule`. (@QuentinBisson)
7071

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ require (
166166
github.com/oschwald/maxminddb-golang v1.13.0
167167
github.com/percona/mongodb_exporter v0.43.1
168168
github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5
169-
github.com/pingcap/tidb/pkg/parser v0.0.0-20250220113329-fdf33cffaea7
169+
github.com/pingcap/tidb/pkg/parser v0.0.0-20250501143621-a50a2323f4ba
170170
github.com/pkg/errors v0.9.1
171171
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2
172172
github.com/prometheus-community/elasticsearch_exporter v1.5.0
@@ -210,7 +210,7 @@ require (
210210
github.com/webdevops/go-common v0.0.0-20231022162947-a6adfb05a7e9
211211
github.com/wk8/go-ordered-map v0.2.0
212212
github.com/xdg-go/scram v1.1.2
213-
github.com/xwb1989/sqlparser v0.0.0-20180606152119-120387863bf2
213+
github.com/xwb1989/sqlparser v0.0.0-20180606152119-120387863bf2 // indirect
214214
github.com/zeebo/xxh3 v1.0.2
215215
go.opentelemetry.io/collector/client v1.28.1
216216
go.opentelemetry.io/collector/component v1.28.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2408,8 +2408,8 @@ github.com/pingcap/failpoint v0.0.0-20240528011301-b51a646c7c86 h1:tdMsjOqUR7YXH
24082408
github.com/pingcap/failpoint v0.0.0-20240528011301-b51a646c7c86/go.mod h1:exzhVYca3WRtd6gclGNErRWb1qEgff3LYta0LvRmON4=
24092409
github.com/pingcap/log v1.1.0 h1:ELiPxACz7vdo1qAvvaWJg1NrYFoY6gqAh/+Uo6aXdD8=
24102410
github.com/pingcap/log v1.1.0/go.mod h1:DWQW5jICDR7UJh4HtxXSM20Churx4CQL0fwL/SoOSA4=
2411-
github.com/pingcap/tidb/pkg/parser v0.0.0-20250220113329-fdf33cffaea7 h1:nLmoYd9OR1GitgJWDM/3ujpVywzAMC9mqj29GBjPCJ8=
2412-
github.com/pingcap/tidb/pkg/parser v0.0.0-20250220113329-fdf33cffaea7/go.mod h1:Hju1TEWZvrctQKbztTRwXH7rd41Yq0Pgmq4PrEKcq7o=
2411+
github.com/pingcap/tidb/pkg/parser v0.0.0-20250501143621-a50a2323f4ba h1:5QO1U6l1LDG/9PlofvaL3ejtml6b/dZ4ExZX5u4Qx1c=
2412+
github.com/pingcap/tidb/pkg/parser v0.0.0-20250501143621-a50a2323f4ba/go.mod h1:+8feuexTKcXHZF/dkDfvCwEyBAmgb4paFc3/WeYV2eE=
24132413
github.com/pires/go-proxyproto v0.7.0 h1:IukmRewDQFWC7kfnb66CSomk2q/seBuilHBYFwyq0Hs=
24142414
github.com/pires/go-proxyproto v0.7.0/go.mod h1:Vz/1JPY/OACxWGQNIRY2BeyDmpoaWmEP40O9LbuiFR4=
24152415
github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4=

internal/component/database_observability/mysql/collector/parser/parser.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,5 @@ var (
1919
StatementTypeUpdate StatementType = "update"
2020
StatementTypeDelete StatementType = "delete"
2121

22-
_ Parser = (*XwbSqlParser)(nil)
2322
_ Parser = (*TiDBSqlParser)(nil)
2423
)

internal/component/database_observability/mysql/collector/parser/parser_tidb_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ func TestParserTiDB_ExtractTableNames(t *testing.T) {
124124
sql: "DROP TABLE IF EXISTS some_table",
125125
tables: []string{"some_table"},
126126
},
127-
// the following tests pass only with tidb parser
128127
{
129128
name: "show create table",
130129
sql: "SHOW CREATE TABLE some_table",

internal/component/database_observability/mysql/collector/parser/parser_xwb.go

Lines changed: 0 additions & 162 deletions
This file was deleted.

0 commit comments

Comments
 (0)