repo stringlengths 5 53 | pr_number int32 1 321k | task_type stringclasses 2
values | issue_text stringlengths 0 81.2k | pr_title stringlengths 1 319 | pr_body stringlengths 0 105k | base_sha stringlengths 40 40 | head_sha stringlengths 40 40 | gold_diff stringlengths 0 202M | changed_files listlengths 0 100 | review_threads listlengths 0 100 | test_patch stringlengths 0 23.4M | merged bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
traefik/traefik | 13,308 | issue_to_patch | Merge branch v2.11 into v3.6 | ### What does this PR do?
Merge current v2.11 into v3.6
### Motivation
Be up to date
### More
- ~[ ] Added/updated tests~
- ~[ ] Added/updated documentation~
### Additional Notes
<!-- Anything else we should know when reviewing? -->
| 6ddda321848c5267f774c32d57af41a054ab52b5 | 15c47f9cb457f2af735385dea986eed1acd3504e | diff --git a/.golangci.yml b/.golangci.yml
index 5201820dd6..59a02974e3 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -346,6 +346,9 @@ linters:
text: 'appendAssign: append result not assigned to the same slice'
linters:
- gocritic
+ - path: pkg/server/conncontext.go
+ linter... | [
".golangci.yml",
"CHANGELOG.md",
"go.mod",
"go.sum",
"pkg/server/conncontext.go",
"pkg/server/conncontext_test.go",
"pkg/server/router/tcp/manager.go",
"pkg/server/server_entrypoint_tcp.go"
] | [] | diff --git a/pkg/server/conncontext_test.go b/pkg/server/conncontext_test.go
new file mode 100644
index 0000000000..6160ea358e
--- /dev/null
+++ b/pkg/server/conncontext_test.go
@@ -0,0 +1,26 @@
+package server
+
+import (
+ "context"
+ "net"
+ "testing"
+
+ "github.com/stretchr/testify/require"
+)
+
+type keyTest stri... | true | |
traefik/traefik | 13,307 | issue_to_patch | Prepare release v2.11.49 | ### What does this PR do?
Prepare release v2.11.49.
aka `mimolette`
### Motivation
To create a new release.
### More
- [ ] Added/updated tests
- [x] Added/updated documentation | b6bb80f8ff7e564f47acebade9f78e01f689264d | 15bcd7efba432d649eabec55f6f91859aca72271 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 335030a399..b3b6e5402b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,11 @@
+## [v2.11.49](https://github.com/traefik/traefik/tree/v2.11.49) (2026-06-05)
+[All Commits](https://github.com/traefik/traefik/compare/v2.11.48...v2.11.49)
+
+**Bug fixes:**
+- **[http3]*... | [
"CHANGELOG.md",
"script/gcg/traefik-bugfix.toml"
] | [] | true | ||
traefik/traefik | 13,300 | issue_to_patch | Bump github.com/quic-go/quic-go to v0.59.1 | <!--
PLEASE READ THIS MESSAGE.
Documentation:
- for Traefik v2: use branch v2.11 (fixes only)
- for Traefik v3.6: use branch v3.6
- for Traefik v3.7: use branch v3.7
Bug:
- for Traefik v2: use branch v2.11 (security fixes only)
- for Traefik v3.6: use branch v3.6
- for Traefik v3.7: use branch v3.7
Enha... | 2c436f3c239932f9eb8afab57fc2668d86880e35 | 25140be0fa0e21ff277b50ecda2da99040cc5db0 | diff --git a/go.mod b/go.mod
index cf0276f98c..358198fe63 100644
--- a/go.mod
+++ b/go.mod
@@ -58,7 +58,7 @@ require (
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // No tag on the repo.
github.com/prometheus/client_golang v1.22.0
github.com/prometheus/client_model v0.6.1
- github.com/quic-g... | [
"go.mod",
"go.sum"
] | [] | true | ||
traefik/traefik | 13,305 | issue_to_patch | Fix snicheck with keepalive | <!--
PLEASE READ THIS MESSAGE.
Documentation:
- for Traefik v2: use branch v2.11 (fixes only)
- for Traefik v3.6: use branch v3.6
- for Traefik v3.7: use branch v3.7
Bug:
- for Traefik v2: use branch v2.11 (security fixes only)
- for Traefik v3.6: use branch v3.6
- for Traefik v3.7: use branch v3.7
Enha... | 5404f6fb25c74ee31910f70f97f0ee0bd20f1b61 | 5008468bbbe01496c0b0ea3c632c492331afa321 | diff --git a/.golangci.yml b/.golangci.yml
index 02749c267d..feefe53c34 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -327,7 +327,9 @@ linters:
text: 'SA1008: keys in http.Header are canonicalized, "x-user" is not canonical; fix the constant or use http.CanonicalHeaderKey'
- path: pkg/middlewares/au... | [
".golangci.yml",
"pkg/server/conncontext.go",
"pkg/server/conncontext_test.go",
"pkg/server/router/tcp/manager.go",
"pkg/server/server_entrypoint_tcp.go"
] | [] | diff --git a/pkg/server/conncontext_test.go b/pkg/server/conncontext_test.go
new file mode 100644
index 0000000000..6160ea358e
--- /dev/null
+++ b/pkg/server/conncontext_test.go
@@ -0,0 +1,26 @@
+package server
+
+import (
+ "context"
+ "net"
+ "testing"
+
+ "github.com/stretchr/testify/require"
+)
+
+type keyTest stri... | true | |
traefik/traefik | 13,306 | issue_to_patch | Fix BackendTLSPolicy status update | <!--
PLEASE READ THIS MESSAGE.
Documentation:
- for Traefik v2: use branch v2.11 (fixes only)
- for Traefik v3.6: use branch v3.6
- for Traefik v3.7: use branch v3.7
Bug:
- for Traefik v2: use branch v2.11 (security fixes only)
- for Traefik v3.6: use branch v3.6
- for Traefik v3.7: use branch v3.7
Enha... | 5d123f52e1205550dbbddf05db9529578e0891e3 | 663cdca71d5aef8500e93524440ab264f6faca68 | diff --git a/pkg/provider/kubernetes/gateway/client.go b/pkg/provider/kubernetes/gateway/client.go
index 37c9a85dad..7090516c9c 100644
--- a/pkg/provider/kubernetes/gateway/client.go
+++ b/pkg/provider/kubernetes/gateway/client.go
@@ -720,20 +720,27 @@ func (c *clientWrapper) UpdateBackendTLSPolicyStatus(ctx context.Co... | [
"pkg/provider/kubernetes/gateway/client.go",
"pkg/provider/kubernetes/gateway/httproute.go"
] | [] | true | ||
traefik/traefik | 13,299 | issue_to_patch | Bump axios to v1.17.0 | # What does this PR do?
Bump Axios from v1.15.1 to v1.17.0.
### Motivation
To update the dependency.
### More
~- [ ] Added/updated tests~
~- [ ] Added/updated documentation~
| f32f05f811f58d4b1fae32ba620f6fd43388aa13 | a055714aefe798462d2249bd3c37c38d3886fbd2 | diff --git a/webui/package.json b/webui/package.json
index a1e0b5ae0a..3fae976adc 100644
--- a/webui/package.json
+++ b/webui/package.json
@@ -19,7 +19,7 @@
},
"dependencies": {
"@quasar/extras": "^1.16.12",
- "axios": "1.15.1",
+ "axios": "1.17.0",
"chart.js": "^4.4.1",
"core-js": "^3.35.1",... | [
"webui/package.json",
"webui/yarn.lock"
] | [] | true | ||
traefik/traefik | 13,301 | issue_to_patch | Bump react-router and jsdom |
### What does this PR do?
Bump react-router to v6.30.4 and jsdom to v29.1.1.
This version of jsdom is chosen because it doesn't depend on ws anymore.
### Motivation
To update the dependencies.
### More
~- [ ] Added/updated tests~
~- [ ] Added/updated documentation~
| d653ee3d73a16467b9836483c685a21e17f290bb | a41ca55fdaff54e5cfc58dc60f09ebedf3b8446e | diff --git a/webui/package.json b/webui/package.json
index 946fc98b0f..11a7616e6e 100644
--- a/webui/package.json
+++ b/webui/package.json
@@ -64,7 +64,7 @@
"framer-motion": "^11.18.2",
"globals": "^16.0.0",
"jest-extended": "^4.0.2",
- "jsdom": "^24.0.0",
+ "jsdom": "29.1.1",
"lodash": "4.18.... | [
"webui/package.json",
"webui/yarn.lock"
] | [] | true | ||
traefik/traefik | 13,170 | issue_to_patch | Replace generated File routing reference page | <!--
PLEASE READ THIS MESSAGE.
Documentation:
- for Traefik v2: use branch v2.11 (fixes only)
- for Traefik v3: use branch v3.6
Bug:
- for Traefik v2: use branch v2.11 (security fixes only)
- for Traefik v3: use branch v3.6
Enhancements:
- use branch master
HOW TO WRITE A GOOD PULL REQUEST? https://do... | 6736725654f19c014b36e6e15d5cf167bd050429 | d746d3f9d827b563542f8e9e891146121de36aa7 | diff --git a/docs/content/reference/routing-configuration/other-providers/file.md b/docs/content/reference/routing-configuration/other-providers/file.md
index 58dd5b2fc1..e4b7934992 100644
--- a/docs/content/reference/routing-configuration/other-providers/file.md
+++ b/docs/content/reference/routing-configuration/other... | [
"docs/content/reference/routing-configuration/other-providers/file.md",
"docs/content/reference/routing-configuration/other-providers/file.toml",
"docs/content/reference/routing-configuration/other-providers/file.yaml",
"internal/gendoc.go"
] | [] | true | ||
traefik/traefik | 13,273 | issue_to_patch | Fix redis write timeout option configuration | ### What does this PR do?
Fixes a copy-paste bug in Redis rate limiter configuration where the
WriteTimeout condition incorrectly checks `*config.Redis.ReadTimeout`
instead of `*config.Redis.WriteTimeout`.
When `ReadTimeout` is set to `0` (disabled) and `WriteTimeout` is set to
a positive value (e.g. `5s`),... | 281ce42477540b3777afd80c8d85dc17611388b4 | 1eef5492db6bc58119cf9923425b1b890bde95d2 | diff --git a/pkg/middlewares/ratelimiter/redis_limiter.go b/pkg/middlewares/ratelimiter/redis_limiter.go
index 9c49c629a2..29a2dc1221 100644
--- a/pkg/middlewares/ratelimiter/redis_limiter.go
+++ b/pkg/middlewares/ratelimiter/redis_limiter.go
@@ -49,7 +49,7 @@ func newRedisLimiter(ctx context.Context, rate rate.Limit, ... | [
"pkg/middlewares/ratelimiter/redis_limiter.go"
] | [] | true | ||
traefik/traefik | 13,298 | issue_to_patch | Prepare release v3.7.3 | ### What does this PR do?
Prepare release v3.7.3
aka `langres`
### Motivation
To create a new release.
### More
- [ ] ~Added/updated tests~
- [x] Added/updated documentation
### Additional Notes
| 48ba249ba7ffadf28efac461d285439502553602 | fbba243cee2b11be5c4cef1c2169c873d67c99ff | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 11ab09b6a4..4b9bf937c4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,7 +1,8 @@
-## [v3.7.2](https://github.com/traefik/traefik/tree/v3.7.2) (2026-06-03)
-[All Commits](https://github.com/traefik/traefik/compare/v3.7.1...v3.7.2)
+## [v3.7.3](https://github.com/traefik/... | [
"CHANGELOG.md",
"docs/content/migrate/v3.md",
"script/gcg/traefik-bugfix.toml"
] | [] | true | ||
traefik/traefik | 13,297 | issue_to_patch | Merge branch v3.6 into v3.7 | ### What does this PR do?
Merge branch v3.6 into v3.7
### Motivation
To be up to date
### More
- ~[ ] Added/updated tests~
- ~[ ] Added/updated documentation~
### Additional Notes
<!-- Anything else we should know when reviewing? -->
| e38281d8adf6a091bd3d8e043e683864e6052c83 | 48ba249ba7ffadf28efac461d285439502553602 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5e06d7f0f2..11ab09b6a4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -31,10 +31,11 @@
- **[k8s/ingress-nginx]** Add nginx.ingress.kubernetes.io/enable-global-auth to the list of supported annotations ([#13219](https://github.com/traefik/traefik/pull/13219) @filip2mac)
... | [
"CHANGELOG.md",
"docs/content/migrate/v3.md",
"go.mod",
"go.sum",
"integration/fixtures/https/https_entrypoint_tls.toml",
"integration/https_test.go",
"pkg/server/aggregator.go",
"pkg/server/configurationwatcher.go",
"pkg/server/configurationwatcher_test.go"
] | [] | diff --git a/integration/https_test.go b/integration/https_test.go
index ab3e190615..e962337e67 100644
--- a/integration/https_test.go
+++ b/integration/https_test.go
@@ -150,7 +150,69 @@ func (s *HTTPSSuite) TestWithSNIConfigRoute() {
require.NoError(s.T(), err)
}
-// TestWithTLSOptions verifies that traefik rou... | true | |
traefik/traefik | 13,296 | issue_to_patch | Prepare release v3.6.19 | ### What does this PR do?
Prepare release v3.6.19
aka `ramequin`
### Motivation
To create a new release.
### More
- [ ] ~Added/updated tests~
- [x] Added/updated documentation
### Additional Notes
| 4c71ee3d1825a07d2f556a352bd802d6a9f49f39 | 24dc8cb03130be9e8123b60a987d791713b94a34 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index b3b98ed2a8..c56bc2c3b3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,19 +1,8 @@
-## [v2.11.48](https://github.com/traefik/traefik/tree/v2.11.48) (2026-06-04)
-[All Commits](https://github.com/traefik/traefik/compare/v2.11.46...v2.11.48)
+## [v3.6.19](https://github.co... | [
"CHANGELOG.md",
"docs/content/migrate/v3.md",
"script/gcg/traefik-bugfix.toml"
] | [] | true | ||
traefik/traefik | 13,295 | issue_to_patch | Merge branch v2.11 into v3.6 | ### What does this PR do?
Merge current v2.11 into v3.6
### Motivation
To be up to date
### More
- ~[ ] Added/updated tests~
- ~[ ] Added/updated documentation~
### Additional Notes
<!-- Anything else we should know when reviewing? -->
| 85290af77db9c1876df104a47af2e3ccecc006e3 | 4c71ee3d1825a07d2f556a352bd802d6a9f49f39 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index c60be5711c..b3b98ed2a8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,15 @@
+## [v2.11.48](https://github.com/traefik/traefik/tree/v2.11.48) (2026-06-04)
+[All Commits](https://github.com/traefik/traefik/compare/v2.11.46...v2.11.48)
+
+**Bug fixes:**
+- **[tls]** ... | [
"CHANGELOG.md",
"integration/fixtures/https/https_entrypoint_tls.toml",
"integration/https_test.go",
"pkg/server/aggregator.go",
"pkg/server/configurationwatcher.go",
"pkg/server/configurationwatcher_test.go"
] | [] | diff --git a/integration/https_test.go b/integration/https_test.go
index 8806b9b61d..d0e04c021d 100644
--- a/integration/https_test.go
+++ b/integration/https_test.go
@@ -115,8 +115,69 @@ func (s *HTTPSSuite) TestWithSNIConfigRoute() {
require.NoError(s.T(), err)
}
-// TestWithTLSOptions verifies that traefik rou... | true | |
traefik/traefik | 13,294 | issue_to_patch | Prepare release v2.11.48 | ### What does this PR do?
Prepare release v2.11.48.
aka `mimolette`
### Motivation
To create a new release.
### More
- [ ] Added/updated tests
- [x] Added/updated documentation | a664812e9c30f8c9705ce16f0d2f2d96e017bccd | 7ad3d96189c114fe54aec004795eb87a1b242507 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 60182a3ed3..335030a399 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,7 +1,8 @@
-## [v2.11.47](https://github.com/traefik/traefik/tree/v2.11.47) (2026-06-03)
-[All Commits](https://github.com/traefik/traefik/compare/v2.11.46...v2.11.47)
+## [v2.11.48](https://github.co... | [
"CHANGELOG.md",
"docs/content/migration/v2.md",
"script/gcg/traefik-bugfix.toml"
] | [] | true | ||
traefik/traefik | 13,291 | issue_to_patch | 3.7.2: error="unknown TLS options: "
### Welcome!
- [x] Yes, I've searched similar issues on [GitHub](https://github.com/traefik/traefik/issues) and didn't find any.
- [x] Yes, I've searched similar issues on the [Traefik community forum](https://community.traefik.io) and didn't find any.
### What did you do?
I upg... | Compute resolved tlsOptions after applying models | <!--
PLEASE READ THIS MESSAGE.
Documentation:
- for Traefik v2: use branch v2.11 (fixes only)
- for Traefik v3.6: use branch v3.6
- for Traefik v3.7: use branch v3.7
Bug:
- for Traefik v2: use branch v2.11 (security fixes only)
- for Traefik v3.6: use branch v3.6
- for Traefik v3.7: use branch v3.7
Enha... | 855561306fee33fa5fd59d2bbbb7961cf34aa6ef | 6e5a978135848113ca6f79051748d0c0717805b0 | diff --git a/integration/fixtures/https/https_entrypoint_tls.toml b/integration/fixtures/https/https_entrypoint_tls.toml
new file mode 100644
index 0000000000..26a85c8128
--- /dev/null
+++ b/integration/fixtures/https/https_entrypoint_tls.toml
@@ -0,0 +1,53 @@
+[global]
+ checkNewVersion = false
+ sendAnonymousUsage ... | [
"integration/fixtures/https/https_entrypoint_tls.toml",
"integration/https_test.go",
"pkg/server/aggregator.go",
"pkg/server/configurationwatcher.go",
"pkg/server/configurationwatcher_test.go"
] | [] | diff --git a/integration/https_test.go b/integration/https_test.go
index 8bdf5c1c45..2a79da18b3 100644
--- a/integration/https_test.go
+++ b/integration/https_test.go
@@ -114,8 +114,69 @@ func (s *HTTPSSuite) TestWithSNIConfigRoute() {
require.NoError(s.T(), err)
}
-// TestWithTLSOptions verifies that traefik rou... | true |
traefik/traefik | 13,284 | issue_to_patch | Bump github.com/fsnotify/fsnotify to v1.10.1 | <!--
PLEASE READ THIS MESSAGE.
Documentation:
- for Traefik v2: use branch v2.11 (fixes only)
- for Traefik v3.6: use branch v3.6
- for Traefik v3.7: use branch v3.7
Bug:
- for Traefik v2: use branch v2.11 (security fixes only)
- for Traefik v3.6: use branch v3.6
- for Traefik v3.7: use branch v3.7
Enha... | 32da599169a0bde6ef0aab66d7989998d02d5636 | 2343bd3f869a369162ebefa6b9862113a2c485e8 | diff --git a/go.mod b/go.mod
index 8a3f42136f..e49c510be1 100644
--- a/go.mod
+++ b/go.mod
@@ -22,7 +22,7 @@ require (
github.com/docker/cli v29.4.0+incompatible
github.com/docker/go-connections v0.6.0
github.com/fatih/structs v1.1.0
- github.com/fsnotify/fsnotify v1.9.0
+ github.com/fsnotify/fsnotify v1.10.1
g... | [
"go.mod",
"go.sum"
] | [] | true | ||
traefik/traefik | 13,283 | issue_to_patch | Prepare release v3.7.2 | ### What does this PR do?
Prepare release v3.7.2
aka `langres`
### Motivation
To create a new release.
### More
- [ ] ~Added/updated tests~
- [x] Added/updated documentation
### Additional Notes
| 4aa82efc7611102de6ba035ccc6cc64bce6f8428 | 28b15cd66744c1032cb1d255f9a6d05d9cc8f191 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3e8ee3aaa3..5e06d7f0f2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,36 @@
+## [v3.7.2](https://github.com/traefik/traefik/tree/v3.7.2) (2026-06-03)
+[All Commits](https://github.com/traefik/traefik/compare/v3.7.1...v3.7.2)
+
+**Bug fixes:**
+- **[webui, tcp]** F... | [
"CHANGELOG.md",
"script/gcg/traefik-bugfix.toml"
] | [] | true | ||
traefik/traefik | 13,203 | issue_to_patch | Trim quotes from proxy_set_header header name | ### What does this PR do?
Apply `trimQuote` to the header name parameter in the `proxy_set_header` directive, so that quoted header names (e.g. `proxy_set_header "X-Custom-Header" "my-value"`) are handled correctly.
### Motivation
* Previously, the quotes were stripped from the value but not from the header na... | d58fd9ac89d9c5f872b20767819f7f188e6a37d0 | 50644208877b1fde5e9968c08f8fa49c0a0131ef | diff --git a/pkg/middlewares/ingressnginx/snippet/action.go b/pkg/middlewares/ingressnginx/snippet/action.go
index 08d459aa6c..8b2a9df1e7 100644
--- a/pkg/middlewares/ingressnginx/snippet/action.go
+++ b/pkg/middlewares/ingressnginx/snippet/action.go
@@ -393,7 +393,7 @@ func createProxySetHeaderAction(d config.IDirecti... | [
"pkg/middlewares/ingressnginx/snippet/action.go",
"pkg/middlewares/ingressnginx/snippet/snippet_test.go"
] | [] | diff --git a/pkg/middlewares/ingressnginx/snippet/snippet_test.go b/pkg/middlewares/ingressnginx/snippet/snippet_test.go
index 495ed3cc10..3f5caec118 100644
--- a/pkg/middlewares/ingressnginx/snippet/snippet_test.go
+++ b/pkg/middlewares/ingressnginx/snippet/snippet_test.go
@@ -399,6 +399,15 @@ proxy_set_header Accept-... | true | |
traefik/traefik | 13,282 | issue_to_patch | Merge branch v3.6 into v3.7 | ### What does this PR do?
Merge branch v3.6 into v3.7
### Motivation
To be up to date
### More
- ~[ ] Added/updated tests~
- ~[ ] Added/updated documentation~
### Additional Notes
<!-- Anything else we should know when reviewing? -->
| a669522ecaf5b7cd5c1d6f5f82aeda0da044ff34 | 4aa82efc7611102de6ba035ccc6cc64bce6f8428 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1262ea2917..3e8ee3aaa3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,41 @@
+## [v3.6.18](https://github.com/traefik/traefik/tree/v3.6.18) (2026-06-03)
+[All Commits](https://github.com/traefik/traefik/compare/v3.6.17...v3.6.18)
+
+**Bug fixes:**
+- **[accesslogs]... | [
"CHANGELOG.md",
"docs/content/migrate/nginx-to-traefik.md",
"docs/content/migrate/v3.md",
"docs/content/reference/install-configuration/configuration-options.md",
"docs/content/reference/install-configuration/providers/kubernetes/kubernetes-gateway.md",
"go.mod",
"go.sum",
"integration/fixtures/https/... | [] | diff --git a/integration/https_test.go b/integration/https_test.go
index b9b64e8d67..ab3e190615 100644
--- a/integration/https_test.go
+++ b/integration/https_test.go
@@ -13,6 +13,7 @@ import (
"time"
"github.com/BurntSushi/toml"
+ "github.com/quic-go/quic-go/http3"
"github.com/stretchr/testify/assert"
"githu... | true | |
traefik/traefik | 13,280 | issue_to_patch | Prepare release v3.6.18 | ### What does this PR do?
Prepare release v3.6.18
aka `ramequin`
### Motivation
To create a new release.
### More
- [ ] ~Added/updated tests~
- [x] Added/updated documentation
### Additional Notes
| 468e0c8d559cb2207fb1eaf4eb0073d42730fb8d | ebffe4b258c11c842d7cc03fdcd2fac002d2bc18 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index aabe98e1ce..c60be5711c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,30 @@
+## [v3.6.18](https://github.com/traefik/traefik/tree/v3.6.18) (2026-06-03)
+[All Commits](https://github.com/traefik/traefik/compare/v3.6.17...v3.6.18)
+
+**Bug fixes:**
+- **[accesslogs]... | [
"CHANGELOG.md",
"docs/content/migrate/v3.md",
"script/gcg/traefik-bugfix.toml"
] | [] | true | ||
traefik/traefik | 13,254 | issue_to_patch | Bump github.com/bytedance/sonic to v1.15.1 | <!--
PLEASE READ THIS MESSAGE.
Documentation:
- for Traefik v2: use branch v2.11 (fixes only)
- for Traefik v3.6: use branch v3.6
- for Traefik v3.7: use branch v3.7
Bug:
- for Traefik v2: use branch v2.11 (security fixes only)
- for Traefik v3.6: use branch v3.6
- for Traefik v3.7: use branch v3.7
Enha... | 8c05c1b1a709ed306c9dec68d36c783d52b2ff62 | d2f3bcffd218ec3054ff125dd2cd2bca31a11d01 | diff --git a/go.mod b/go.mod
index b5f3a989a1..a44d65a073 100644
--- a/go.mod
+++ b/go.mod
@@ -178,7 +178,7 @@ require (
github.com/blendle/zapdriver v1.3.1 // indirect
github.com/bodgit/tsig v1.2.2 // indirect
github.com/boombuler/barcode v1.0.1 // indirect
- github.com/bytedance/sonic v1.12.0 // indirect
+ gith... | [
"go.mod",
"go.sum"
] | [] | true | ||
traefik/traefik | 13,252 | issue_to_patch | Bump github.com/moby/spdystream to v0.5.1 | <!--
PLEASE READ THIS MESSAGE.
Documentation:
- for Traefik v2: use branch v2.11 (fixes only)
- for Traefik v3.6: use branch v3.6
- for Traefik v3.7: use branch v3.7
Bug:
- for Traefik v2: use branch v2.11 (security fixes only)
- for Traefik v3.6: use branch v3.6
- for Traefik v3.7: use branch v3.7
Enha... | 2c03850b907773f996627ab7c70f75f16d78a315 | b3280369f52a81a418027bc3f72c50b1199e4097 | diff --git a/go.mod b/go.mod
index 1c78f68451..b5f3a989a1 100644
--- a/go.mod
+++ b/go.mod
@@ -297,7 +297,7 @@ require (
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/go-archive v0.2.0 // indirect
github.com/moby/patternmatcher v0.6.1 // indirect
- github.com/moby/spdystream v0.5.0 // indir... | [
"go.mod",
"go.sum"
] | [] | true | ||
traefik/traefik | 13,180 | issue_to_patch | Escape double quotes in quoted log fields | ### What does this PR do?
Escapes double quotes inside quoted access log fields (User-Agent, Referer, etc.) to produce valid log entries.
### Motivation
Closes #11722. When a header value such as User-Agent contained a double quote character, it was written unescaped into the access log, breaking the CLF forma... | 32c086193777fe8297fcc0ccda2df396a4d477e7 | 6630cd3023f1467b9d812079d246e2e3362cb5ae | diff --git a/pkg/middlewares/accesslog/logger_formatters.go b/pkg/middlewares/accesslog/logger_formatters.go
index ec1c04f053..c001ea9047 100644
--- a/pkg/middlewares/accesslog/logger_formatters.go
+++ b/pkg/middlewares/accesslog/logger_formatters.go
@@ -3,6 +3,7 @@ package accesslog
import (
"bytes"
"fmt"
+ "stri... | [
"pkg/middlewares/accesslog/logger_formatters.go",
"pkg/middlewares/accesslog/logger_formatters_test.go"
] | [] | diff --git a/pkg/middlewares/accesslog/logger_formatters_test.go b/pkg/middlewares/accesslog/logger_formatters_test.go
index c1647a2a9c..345c4d0fc9 100644
--- a/pkg/middlewares/accesslog/logger_formatters_test.go
+++ b/pkg/middlewares/accesslog/logger_formatters_test.go
@@ -79,6 +79,27 @@ func TestCommonLogFormatter_Fo... | true | |
traefik/traefik | 13,279 | issue_to_patch | Merge branch v2.11 into v3.6 | ### What does this PR do?
Merge current v2.11 into v3.6
### Motivation
To be up to date
### More
- ~[ ] Added/updated tests~
- ~[ ] Added/updated documentation~
### Additional Notes
<!-- Anything else we should know when reviewing? -->
| dcbe752df54e178b4575786476e8843c3e2cd052 | 468e0c8d559cb2207fb1eaf4eb0073d42730fb8d | diff --git a/CHANGELOG.md b/CHANGELOG.md
index ef88c08159..aabe98e1ce 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,14 @@
+## [v2.11.47](https://github.com/traefik/traefik/tree/v2.11.47) (2026-06-03)
+[All Commits](https://github.com/traefik/traefik/compare/v2.11.46...v2.11.47)
+
+**Bug fixes:**
+- **[middlew... | [
"CHANGELOG.md",
"go.mod",
"go.sum"
] | [] | true | ||
transact-rs/sqlx | 4,306 | issue_to_patch | Empty sqlx::migrate, then create two tables, then insert row, then execute empty tx returns 2 rows affected instead of 0
### I have found these related issues/pull requests
No.
### Description
Found while investigating why similar code (except that transaction had 2 `DELETE`s), actually deleted 0 rows but said it d... | fix(sqlite): return 0 for changes if statement is read-only | Fixes #4300
The issue repro is added as a test called `issue_4300`. | f8afe99dc92b903d04b4a87bd6cbfcb13b5e615c | 1bffffc5448f41cba8ebb8fedeb7153e4c23be4d | diff --git a/sqlx-sqlite/src/connection/execute.rs b/sqlx-sqlite/src/connection/execute.rs
index 733a1abbe6..f26a540510 100644
--- a/sqlx-sqlite/src/connection/execute.rs
+++ b/sqlx-sqlite/src/connection/execute.rs
@@ -108,7 +108,15 @@ impl Iterator for ExecuteIter<'_> {
Ok(false) => {
let... | [
"sqlx-sqlite/src/connection/execute.rs",
"tests/sqlite/migrations_issue_4300/000_init.sql",
"tests/sqlite/sqlite.rs"
] | [] | diff --git a/tests/sqlite/migrations_issue_4300/000_init.sql b/tests/sqlite/migrations_issue_4300/000_init.sql
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/tests/sqlite/sqlite.rs b/tests/sqlite/sqlite.rs
index 5355cf7c97..8791443b4b 100644
--- a/tests/sqlite/sqlite.rs
+++ b/tests/sqlite/sqlite.rs
@@ -... | true |
transact-rs/sqlx | 4,303 | issue_to_patch | sqlx-cli regression in 0.9.0: role "anonymous" does not exist
### I have found these related issues/pull requests
I have found no existing issues for this problem.
### Description
After upgrading sqlx-cli to 0.9.0, running any database-related task (create, drop, reset, run migrations) in my environment results in ... | fix: whoami regression to anonymous user | <!--
PR AUTHOR INSTRUCTIONS; PLEASE READ.
Give your pull request an accurate and descriptive title. It should mention what component(s) or database driver(s) it touches.
Pull requests with undescriptive or inaccurate titles *may* be closed or have their titles changed before merging.
Fill out the fields below.... | 3c56a5ad2aac3fb80e424253d5c1a3cc25f87a95 | 36381dd1b5044492a712e24b7bdad200c2650eda | diff --git a/.github/workflows/sqlx.yml b/.github/workflows/sqlx.yml
index a234c9d7a9..50ef29dd92 100644
--- a/.github/workflows/sqlx.yml
+++ b/.github/workflows/sqlx.yml
@@ -301,6 +301,22 @@ jobs:
SQLX_OFFLINE_DIR: .sqlx
RUSTFLAGS: -D warnings --cfg postgres="${{ matrix.postgres }}"
+ # Ru... | [
".github/workflows/sqlx.yml",
"sqlx-postgres/Cargo.toml",
"tests/postgres/setup.sql"
] | [
{
"comment": "@abonander @svnrb\n\nI didn't copy the Mutex bit because I didn't understand why it was needed. This test was enough to fail without the fix, so I think it could work as the regression test needed and avoid a separate CI step.\n\nWhat do you think? If the mutex was really needed, do you mind expla... | diff --git a/tests/postgres/setup.sql b/tests/postgres/setup.sql
index 49b7fcfeea..6a1b925abe 100644
--- a/tests/postgres/setup.sql
+++ b/tests/postgres/setup.sql
@@ -1,3 +1,6 @@
+-- Create extra user to be used on runner
+CREATE USER runner WITH SUPERUSER PASSWORD 'runner-password';
+
-- https://www.postgresql.org/do... | true |
transact-rs/sqlx | 4,301 | issue_to_patch | sqlx-core depends different versions of sha2 to workspace
### I have found these related issues/pull requests
sqlx-core depends different versions of sha2 to workspace
### Description
sqlx-core depends different versions of sha2 to workspace
### Reproduction steps
1. create a new rust project
2. add dependency sq... | fix(deps): align sqlx-core and sqlx-macros-core on workspace sha2 | This PR fixes #4288. | 3c56a5ad2aac3fb80e424253d5c1a3cc25f87a95 | 275e62fa9dc4ec4833162ac553d10a2c4b3c0c5c | diff --git a/sqlx-core/Cargo.toml b/sqlx-core/Cargo.toml
index 5c20bad050..90ed446b4b 100644
--- a/sqlx-core/Cargo.toml
+++ b/sqlx-core/Cargo.toml
@@ -91,7 +91,7 @@ percent-encoding = "2.3.0"
serde = { version = "1.0.219", features = ["derive", "rc"], optional = true }
serde_json = { version = "1.0.142", features = [... | [
"sqlx-core/Cargo.toml",
"sqlx-macros-core/Cargo.toml"
] | [] | true | |
transact-rs/sqlx | 3,723 | issue_to_patch | Add SqlStr | Not sure if it's appreciated to take over a PR but I thought I'd try and work #3364 out.
This PR changes the following things:
* Add the `SqlStr`, `AssertSqlStr` types and `SqlSafeStr` trait.
* Removes the lifetime of `Statement` since the underlying sql string is now owned.
* Updates the `Executor` trait to take... | 1228d243bef92c97f9314a2a10bca37fee8741d4 | 1607a1105559ec1fe1855fed01429550bed035aa | diff --git a/sqlx-core/src/any/connection/backend.rs b/sqlx-core/src/any/connection/backend.rs
index 6c84c1d8ce..e59b345ed9 100644
--- a/sqlx-core/src/any/connection/backend.rs
+++ b/sqlx-core/src/any/connection/backend.rs
@@ -1,9 +1,9 @@
use crate::any::{Any, AnyArguments, AnyQueryResult, AnyRow, AnyStatement, AnyTyp... | [
"sqlx-core/src/any/connection/backend.rs",
"sqlx-core/src/any/connection/executor.rs",
"sqlx-core/src/any/connection/mod.rs",
"sqlx-core/src/any/database.rs",
"sqlx-core/src/any/statement.rs",
"sqlx-core/src/any/transaction.rs",
"sqlx-core/src/column.rs",
"sqlx-core/src/connection.rs",
"sqlx-core/sr... | [
{
"comment": "Since we're dropping the lifetime parameter here, this doesn't really add anything over just having `Clone` as a supertrait.",
"path": "sqlx-core/src/statement.rs",
"hunk": "@@ -16,15 +17,17 @@ use either::Either;\n ///\n /// Statements can be re-used with any connection and on first-use i... | diff --git a/tests/any/any.rs b/tests/any/any.rs
index 099ff7ddff..62dc20403e 100644
--- a/tests/any/any.rs
+++ b/tests/any/any.rs
@@ -1,5 +1,6 @@
use sqlx::any::AnyRow;
use sqlx::{Any, Connection, Executor, Row};
+use sqlx_core::sql_str::AssertSqlSafe;
use sqlx_test::new;
#[sqlx_macros::test]
@@ -106,7 +107,7 @@... | true | |
transact-rs/sqlx | 3,723 | comment_to_fix | Add SqlStr | Since we're dropping the lifetime parameter here, this doesn't really add anything over just having `Clone` as a supertrait. | 1228d243bef92c97f9314a2a10bca37fee8741d4 | 1607a1105559ec1fe1855fed01429550bed035aa | diff --git a/sqlx-core/src/statement.rs b/sqlx-core/src/statement.rs
index 17dfd6428d..76d0325639 100644
--- a/sqlx-core/src/statement.rs
+++ b/sqlx-core/src/statement.rs
@@ -6,6 +6,7 @@ use crate::from_row::FromRow;
use crate::query::Query;
use crate::query_as::QueryAs;
use crate::query_scalar::QueryScalar;
+use cr... | [
"sqlx-core/src/statement.rs"
] | [
{
"comment": "Since we're dropping the lifetime parameter here, this doesn't really add anything over just having `Clone` as a supertrait.",
"path": "sqlx-core/src/statement.rs",
"hunk": "@@ -16,15 +17,17 @@ use either::Either;\n ///\n /// Statements can be re-used with any connection and on first-use i... | true | ||
transact-rs/sqlx | 3,723 | comment_to_fix | Add SqlStr | A comment I meant to write but forgot:
```suggestion
// If `.clone()` gets called once, assume it might get called again.
_ => Repr::Arced(self.as_str().into()),
``` | 1228d243bef92c97f9314a2a10bca37fee8741d4 | 1607a1105559ec1fe1855fed01429550bed035aa | diff --git a/sqlx-core/src/sql_str.rs b/sqlx-core/src/sql_str.rs
new file mode 100644
index 0000000000..100f270214
--- /dev/null
+++ b/sqlx-core/src/sql_str.rs
@@ -0,0 +1,201 @@
+use std::borrow::{Borrow, Cow};
+use std::hash::{Hash, Hasher};
+use std::sync::Arc;
+
+/// A SQL string that is safe to execute on a databas... | [
"sqlx-core/src/sql_str.rs"
] | [
{
"comment": "A comment I meant to write but forgot:\r\n```suggestion\r\n // If `.clone()` gets called once, assume it might get called again.\r\n _ => Repr::Arced(self.as_str().into()),\r\n```",
"path": "sqlx-core/src/sql_str.rs",
"hunk": "@@ -0,0 +1,196 @@\n+use std::borrow::{Bor... | true | ||
transact-rs/sqlx | 3,723 | comment_to_fix | Add SqlStr | You could if you added something like:
```rust
impl SqlStr {
pub const fn from_static(s: &'static str) -> Self { ... }
}
``` | 1228d243bef92c97f9314a2a10bca37fee8741d4 | 1607a1105559ec1fe1855fed01429550bed035aa | diff --git a/sqlx-core/src/migrate/migration.rs b/sqlx-core/src/migrate/migration.rs
index 1f1175ce58..79721d244d 100644
--- a/sqlx-core/src/migrate/migration.rs
+++ b/sqlx-core/src/migrate/migration.rs
@@ -1,6 +1,8 @@
use sha2::{Digest, Sha384};
use std::borrow::Cow;
+use crate::sql_str::SqlStr;
+
use super::Migr... | [
"sqlx-core/src/migrate/migration.rs"
] | [
{
"comment": "You could if you added something like:\r\n\r\n```rust\r\nimpl SqlStr {\r\n pub const fn from_static(s: &'static str) -> Self { ... }\r\n}\r\n```",
"path": "sqlx-core/src/migrate/migration.rs",
"hunk": "@@ -8,6 +8,7 @@ pub struct Migration {\n pub version: i64,\n pub description:... | true | ||
transact-rs/sqlx | 3,723 | comment_to_fix | Add SqlStr | I wouldn't make this clone, just return `&SqlStr`. | 1228d243bef92c97f9314a2a10bca37fee8741d4 | 1607a1105559ec1fe1855fed01429550bed035aa | diff --git a/sqlx-core/src/statement.rs b/sqlx-core/src/statement.rs
index 17dfd6428d..76d0325639 100644
--- a/sqlx-core/src/statement.rs
+++ b/sqlx-core/src/statement.rs
@@ -6,6 +6,7 @@ use crate::from_row::FromRow;
use crate::query::Query;
use crate::query_as::QueryAs;
use crate::query_scalar::QueryScalar;
+use cr... | [
"sqlx-core/src/statement.rs"
] | [
{
"comment": "I wouldn't make this clone, just return `&SqlStr`.",
"path": "sqlx-core/src/statement.rs",
"hunk": "@@ -16,15 +17,17 @@ use either::Either;\n ///\n /// Statements can be re-used with any connection and on first-use it will be re-prepared and\n /// cached within the connection.\n-pub trait ... | true | ||
transact-rs/sqlx | 3,723 | comment_to_fix | Add SqlStr | `.to_string()` shouldn't be necessary here. | 1228d243bef92c97f9314a2a10bca37fee8741d4 | 1607a1105559ec1fe1855fed01429550bed035aa | diff --git a/tests/postgres/query_builder.rs b/tests/postgres/query_builder.rs
index cdec136976..5b73bcff35 100644
--- a/tests/postgres/query_builder.rs
+++ b/tests/postgres/query_builder.rs
@@ -54,18 +54,20 @@ fn test_build() {
qb.push(" WHERE id = ").push_bind(42i32);
let query = qb.build();
- assert_e... | [
"tests/postgres/query_builder.rs"
] | [
{
"comment": "`.to_string()` shouldn't be necessary here.",
"path": "tests/postgres/query_builder.rs",
"hunk": "@@ -129,7 +134,7 @@ async fn test_max_number_of_binds() -> anyhow::Result<()> {\n let mut conn = new::<Postgres>().await?;\n \n // Indirectly ensures the macros support this many binds... | true | ||
transact-rs/sqlx | 3,723 | comment_to_fix | Add SqlStr | I would change `statement` to `Option<SqlStr>`. | 1228d243bef92c97f9314a2a10bca37fee8741d4 | 1607a1105559ec1fe1855fed01429550bed035aa | diff --git a/sqlx-postgres/src/transaction.rs b/sqlx-postgres/src/transaction.rs
index 7c8bd6bb1b..3f4122ea82 100644
--- a/sqlx-postgres/src/transaction.rs
+++ b/sqlx-postgres/src/transaction.rs
@@ -1,5 +1,5 @@
use sqlx_core::database::Database;
-use std::borrow::Cow;
+use sqlx_core::sql_str::SqlStr;
use crate::err... | [
"sqlx-postgres/src/transaction.rs"
] | [
{
"comment": "I would change `statement` to `Option<SqlStr>`.",
"path": "sqlx-postgres/src/transaction.rs",
"hunk": "@@ -23,12 +24,12 @@ impl TransactionManager for PgTransactionManager {\n // custom `BEGIN` statements are not allowed if we're already in\n // a transaction (we ne... | true | ||
transact-rs/sqlx | 3,723 | comment_to_fix | Add SqlStr | Given just how often this appears throughout even our own code, I wonder if we should introduce a short(er)hand macro for this. Something that's glaringly obvious in code review but not so ridiculously verbose that people despise using it, because I can see this getting annoying. That _is_ kind of the idea, but a safet... | 1228d243bef92c97f9314a2a10bca37fee8741d4 | 1607a1105559ec1fe1855fed01429550bed035aa | diff --git a/sqlx-core/src/transaction.rs b/sqlx-core/src/transaction.rs
index d8f350c73e..917690339e 100644
--- a/sqlx-core/src/transaction.rs
+++ b/sqlx-core/src/transaction.rs
@@ -1,4 +1,3 @@
-use std::borrow::Cow;
use std::fmt::{self, Debug, Formatter};
use std::future::{self, Future};
use std::ops::{Deref, Dere... | [
"sqlx-core/src/transaction.rs"
] | [
{
"comment": "Given just how often this appears throughout even our own code, I wonder if we should introduce a short(er)hand macro for this. Something that's glaringly obvious in code review but not so ridiculously verbose that people despise using it, because I can see this getting annoying. That _is_ kind of... | true | ||
transact-rs/sqlx | 3,723 | comment_to_fix | Add SqlStr | Maybe just use `SqlStr` here (and on `prepare_with` and `describe`) to avoid monomorphization. | 1228d243bef92c97f9314a2a10bca37fee8741d4 | 1607a1105559ec1fe1855fed01429550bed035aa | diff --git a/sqlx-core/src/executor.rs b/sqlx-core/src/executor.rs
index f1a6ff4ba8..ab9737c9cd 100644
--- a/sqlx-core/src/executor.rs
+++ b/sqlx-core/src/executor.rs
@@ -1,6 +1,7 @@
use crate::database::Database;
use crate::describe::Describe;
use crate::error::{BoxDynError, Error};
+use crate::sql_str::{SqlSafeStr... | [
"sqlx-core/src/executor.rs"
] | [
{
"comment": "Maybe just use `SqlStr` here (and on `prepare_with` and `describe`) to avoid monomorphization.",
"path": "sqlx-core/src/executor.rs",
"hunk": "@@ -148,10 +149,10 @@ pub trait Executor<'c>: Send + Debug + Sized {\n /// This explicit API is provided to allow access to the statement metad... | true | ||
transact-rs/sqlx | 3,723 | comment_to_fix | Add SqlStr | Go ahead and delete this, we already dropped `sqlformat` from the dependencies. | 1228d243bef92c97f9314a2a10bca37fee8741d4 | 1607a1105559ec1fe1855fed01429550bed035aa | diff --git a/sqlx-core/src/logger.rs b/sqlx-core/src/logger.rs
index 18d5843d38..6114854396 100644
--- a/sqlx-core/src/logger.rs
+++ b/sqlx-core/src/logger.rs
@@ -1,4 +1,4 @@
-use crate::connection::LogSettings;
+use crate::{connection::LogSettings, sql_str::SqlStr};
use std::time::Instant;
// Yes these look silly.... | [
"sqlx-core/src/logger.rs"
] | [
{
"comment": "Go ahead and delete this, we already dropped `sqlformat` from the dependencies.",
"path": "sqlx-core/src/logger.rs",
"hunk": "@@ -104,18 +104,18 @@ impl<'q> QueryLogger<'q> {\n let log_is_enabled = log::log_enabled!(target: \"sqlx::query\", log_level)\n || priva... | true | ||
transact-rs/sqlx | 3,723 | comment_to_fix | Add SqlStr | This can actually just be spelled `Default::default()`. | 1228d243bef92c97f9314a2a10bca37fee8741d4 | 1607a1105559ec1fe1855fed01429550bed035aa | diff --git a/sqlx-core/src/query_builder.rs b/sqlx-core/src/query_builder.rs
index b14d19adb2..7dff67831c 100644
--- a/sqlx-core/src/query_builder.rs
+++ b/sqlx-core/src/query_builder.rs
@@ -3,6 +3,7 @@
use std::fmt::Display;
use std::fmt::Write;
use std::marker::PhantomData;
+use std::sync::Arc;
use crate::argum... | [
"sqlx-core/src/query_builder.rs"
] | [
{
"comment": "This can actually just be spelled `Default::default()`.",
"path": "sqlx-core/src/query_builder.rs",
"hunk": "@@ -34,12 +37,14 @@ impl<DB: Database> Default for QueryBuilder<'_, DB> {\n fn default() -> Self {\n QueryBuilder {\n init_len: 0,\n- query: Strin... | true | ||
transact-rs/sqlx | 3,723 | comment_to_fix | Add SqlStr | This comment sounds like holding onto the query string is unintended behavior but it very much _is_ intended. The idea is to only copy the string if strictly necessary.
If `persistent: true` and this exactly query hasn't been executed before, the connection should end up holding a strong ref in the prepared statemen... | 1228d243bef92c97f9314a2a10bca37fee8741d4 | 1607a1105559ec1fe1855fed01429550bed035aa | diff --git a/sqlx-core/src/query_builder.rs b/sqlx-core/src/query_builder.rs
index b14d19adb2..7dff67831c 100644
--- a/sqlx-core/src/query_builder.rs
+++ b/sqlx-core/src/query_builder.rs
@@ -3,6 +3,7 @@
use std::fmt::Display;
use std::fmt::Write;
use std::marker::PhantomData;
+use std::sync::Arc;
use crate::argum... | [
"sqlx-core/src/query_builder.rs"
] | [
{
"comment": "This comment sounds like holding onto the query string is unintended behavior but it very much _is_ intended. The idea is to only copy the string if strictly necessary.\r\n\r\nIf `persistent: true` and this exactly query hasn't been executed before, the connection should end up holding a strong re... | true | ||
transact-rs/sqlx | 3,723 | comment_to_fix | Add SqlStr | This shouldn't panic if a strong-ref is held somewhere:
```suggestion
Arc::unwrap_or_clone(self.query)
``` | 1228d243bef92c97f9314a2a10bca37fee8741d4 | 1607a1105559ec1fe1855fed01429550bed035aa | diff --git a/sqlx-core/src/query_builder.rs b/sqlx-core/src/query_builder.rs
index b14d19adb2..7dff67831c 100644
--- a/sqlx-core/src/query_builder.rs
+++ b/sqlx-core/src/query_builder.rs
@@ -3,6 +3,7 @@
use std::fmt::Display;
use std::fmt::Write;
use std::marker::PhantomData;
+use std::sync::Arc;
use crate::argum... | [
"sqlx-core/src/query_builder.rs"
] | [
{
"comment": "This shouldn't panic if a strong-ref is held somewhere:\r\n\r\n```suggestion\r\n Arc::unwrap_or_clone(self.query)\r\n```",
"path": "sqlx-core/src/query_builder.rs",
"hunk": "@@ -523,7 +533,7 @@ where\n \n /// Deconstruct this `QueryBuilder`, returning the built SQL. May not be s... | true | ||
transact-rs/sqlx | 4,282 | issue_to_patch | SQLx attempts to read unrelated parent directory .env
### I have found these related issues/pull requests
None
### Description
On sqlx version `0.9.0` (not `0.8.6`); `sqlx::query_as!()` seems to attempt to read the parent directory `.env` instead of identifying the CWD `.env` (and it's properly set `DATABASE_URL` v... | fix(macros): don't look for `.env` outside workspace | ### Does your PR solve an issue?
Fixes #4276
### Is this a breaking change?
This reverts a behavior change to match previous releases, so it would be considered a bugfix and thus non-breaking.
| 75bc0487eb661da811bb7a3c5d158f1bd463fef4 | a4aeeb40153eb873a74d0ff82e2bb5f6be925f12 | diff --git a/sqlx-macros-core/src/query/metadata.rs b/sqlx-macros-core/src/query/metadata.rs
index b3b31c0eb5..5d5d3885d7 100644
--- a/sqlx-macros-core/src/query/metadata.rs
+++ b/sqlx-macros-core/src/query/metadata.rs
@@ -22,8 +22,11 @@ pub struct MacrosEnv {
impl Metadata {
pub fn env(&self) -> crate::Result<... | [
"sqlx-macros-core/src/query/metadata.rs"
] | [
{
"comment": "This means that if the project has a structure like this, for example:\r\n\r\n```\r\n/\r\n├── crates/\r\n│ ├── foo/\r\n│ │ └── .env\r\n│ ├── bar/\r\n│ │ └── .env\r\n│ └── .env\r\n└── .env\r\n```\r\n\r\nWhen compiling `foo` we'll read `/crates/foo/.env`, `/crates/.env` and `/.env` in ... | true | |
transact-rs/sqlx | 4,282 | comment_to_fix | fix(macros): don't look for `.env` outside workspace | This means that if the project has a structure like this, for example:
```
/
├── crates/
│ ├── foo/
│ │ └── .env
│ ├── bar/
│ │ └── .env
│ └── .env
└── .env
```
When compiling `foo` we'll read `/crates/foo/.env`, `/crates/.env` and `/.env` in that order.
| 75bc0487eb661da811bb7a3c5d158f1bd463fef4 | a4aeeb40153eb873a74d0ff82e2bb5f6be925f12 | diff --git a/sqlx-macros-core/src/query/metadata.rs b/sqlx-macros-core/src/query/metadata.rs
index b3b31c0eb5..5d5d3885d7 100644
--- a/sqlx-macros-core/src/query/metadata.rs
+++ b/sqlx-macros-core/src/query/metadata.rs
@@ -22,8 +22,11 @@ pub struct MacrosEnv {
impl Metadata {
pub fn env(&self) -> crate::Result<... | [
"sqlx-macros-core/src/query/metadata.rs"
] | [
{
"comment": "This means that if the project has a structure like this, for example:\r\n\r\n```\r\n/\r\n├── crates/\r\n│ ├── foo/\r\n│ │ └── .env\r\n│ ├── bar/\r\n│ │ └── .env\r\n│ └── .env\r\n└── .env\r\n```\r\n\r\nWhen compiling `foo` we'll read `/crates/foo/.env`, `/crates/.env` and `/.env` in ... | true | ||
transact-rs/sqlx | 3,867 | issue_to_patch | sqlx-postgres: Bump etcetera to 0.10.0 | This bumps the underlying version of windows-sys used by this crate.
I've only compile tested this by crosscompiling from Linux.
### Does your PR solve an issue?
No
### Is this a breaking change?
Yes, but a workaround for users is available
MSRV increases to 1.81.0, while sqlx-postgres 0.8.5 has an M... | 92c384595264eae9e57a599079d44e5ce3b9e5c1 | ec8ec38d5d73c3759edb154a4b7dfa87ce4ecd49 | diff --git a/Cargo.lock b/Cargo.lock
index 7a5db0c251..73486b8da3 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1240,13 +1240,13 @@ dependencies = [
[[package]]
name = "etcetera"
-version = "0.8.0"
+version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "136d1b5283a1ab77bd92... | [
"Cargo.lock",
"sqlx-postgres/Cargo.toml"
] | [
{
"comment": "side effect from #3830 ",
"path": "Cargo.lock",
"hunk": "@@ -3653,7 +3653,6 @@ dependencies = [\n \"sqlx-postgres\",\n \"sqlx-sqlite\",\n \"syn 2.0.96\",\n- \"tempfile\",",
"resolving_sha": "ec8ec38d5d73c3759edb154a4b7dfa87ce4ecd49",
"resolving_diff": "diff --git a/Cargo.lock b/... | true | ||
transact-rs/sqlx | 3,728 | issue_to_patch | postgres: Fix tracing span when dropping PgListener | This PR fixes `PgListener` to instrument a `Future` to `UNLISTEN *` with the tracing span when it’s dropped. | c3fd645409bd48fdd70b79734b27291aab6a3ec9 | 5524ccccec18fc0c34244570e6a6779b42b48f11 | diff --git a/sqlx-core/src/ext/async_stream.rs b/sqlx-core/src/ext/async_stream.rs
index a83aabed14..56777ca4db 100644
--- a/sqlx-core/src/ext/async_stream.rs
+++ b/sqlx-core/src/ext/async_stream.rs
@@ -121,7 +121,7 @@ impl<'a, T> Stream for TryAsyncStream<'a, T> {
#[macro_export]
macro_rules! try_stream {
($($b... | [
"sqlx-core/src/ext/async_stream.rs",
"sqlx-postgres/src/listener.rs"
] | [
{
"comment": "Capturing `Span::current()` on construction of the listener is potentially controversial, I think.\r\n\r\nWe can't assume how people are making use of `tracing`. This may end up being undesirable behavior.\r\n\r\nIf we did support something like this, I would probably expect it to be an explicit s... | true | ||
transact-rs/sqlx | 3,728 | comment_to_fix | postgres: Fix tracing span when dropping PgListener | Capturing `Span::current()` on construction of the listener is potentially controversial, I think.
We can't assume how people are making use of `tracing`. This may end up being undesirable behavior.
If we did support something like this, I would probably expect it to be an explicit setter. | c3fd645409bd48fdd70b79734b27291aab6a3ec9 | 5524ccccec18fc0c34244570e6a6779b42b48f11 | diff --git a/sqlx-postgres/src/listener.rs b/sqlx-postgres/src/listener.rs
index b96f8d829f..17a46a916f 100644
--- a/sqlx-postgres/src/listener.rs
+++ b/sqlx-postgres/src/listener.rs
@@ -9,6 +9,7 @@ use futures_util::{FutureExt, StreamExt, TryFutureExt, TryStreamExt};
use sqlx_core::acquire::Acquire;
use sqlx_core::t... | [
"sqlx-postgres/src/listener.rs"
] | [
{
"comment": "Capturing `Span::current()` on construction of the listener is potentially controversial, I think.\r\n\r\nWe can't assume how people are making use of `tracing`. This may end up being undesirable behavior.\r\n\r\nIf we did support something like this, I would probably expect it to be an explicit s... | true | ||
transact-rs/sqlx | 3,728 | comment_to_fix | postgres: Fix tracing span when dropping PgListener | Because arguably, the user could also expect this to capture `Span::current()` or create a child span specifically for this scope (that's probably the more idiomatic option). | c3fd645409bd48fdd70b79734b27291aab6a3ec9 | 5524ccccec18fc0c34244570e6a6779b42b48f11 | diff --git a/sqlx-postgres/src/listener.rs b/sqlx-postgres/src/listener.rs
index b96f8d829f..17a46a916f 100644
--- a/sqlx-postgres/src/listener.rs
+++ b/sqlx-postgres/src/listener.rs
@@ -9,6 +9,7 @@ use futures_util::{FutureExt, StreamExt, TryFutureExt, TryStreamExt};
use sqlx_core::acquire::Acquire;
use sqlx_core::t... | [
"sqlx-postgres/src/listener.rs"
] | [
{
"comment": "Because arguably, the user could also expect this to capture `Span::current()` or create a child span specifically for this scope (that's probably the more idiomatic option).",
"path": "sqlx-postgres/src/listener.rs",
"hunk": "@@ -366,7 +369,7 @@ impl Drop for PgListener {\n };... | true | ||
transact-rs/sqlx | 4,256 | issue_to_patch | Release 0.9.0 | Rendered CHANGELOG entry: https://github.com/launchbadge/sqlx/blob/release/0.9.0/CHANGELOG.md#090---2026-05-06 | 6956cef0bf3cea81bc0a543a53d550b4dd8d56db | 003b698e99e024f3621b8043a2426fde5b741171 | diff --git a/.github/workflows/sqlx.yml b/.github/workflows/sqlx.yml
index 8d69cff731..a234c9d7a9 100644
--- a/.github/workflows/sqlx.yml
+++ b/.github/workflows/sqlx.yml
@@ -77,7 +77,7 @@ jobs:
run: |
rustup show active-toolchain || rustup toolchain install
rustup toolchain install night... | [
".github/workflows/sqlx.yml",
".gitignore",
"CHANGELOG.md",
"Cargo.lock",
"Cargo.toml",
"LICENSE-APACHE",
"LICENSE-MIT",
"clippy.toml",
"examples/postgres/axum-social-with-tests/Cargo.toml",
"examples/postgres/axum-social-with-tests/src/http/user.rs",
"examples/postgres/axum-social-with-tests/sr... | [
{
"comment": "Would be nice if etcetera could be bumped to 0.11.0 to get a newer windows-sys version that doesn't depend on windows-targets.\r\n",
"path": "sqlx-postgres/Cargo.toml",
"hunk": "",
"resolving_sha": "003b698e99e024f3621b8043a2426fde5b741171",
"resolving_diff": "diff --git a/sqlx-pos... | diff --git a/tests/postgres/derives.rs b/tests/postgres/derives.rs
index 96687e3113..58d09edbc3 100644
--- a/tests/postgres/derives.rs
+++ b/tests/postgres/derives.rs
@@ -145,10 +145,19 @@ struct InventoryItem {
#[sqlx(type_name = "float_range")]
struct FloatRange(PgRange<f64>);
-// Custom domain type
-#[derive(sql... | true | |
transact-rs/sqlx | 4,256 | comment_to_fix | Release 0.9.0 | Would be nice if etcetera could be bumped to 0.11.0 to get a newer windows-sys version that doesn't depend on windows-targets.
| 6956cef0bf3cea81bc0a543a53d550b4dd8d56db | 003b698e99e024f3621b8043a2426fde5b741171 | diff --git a/sqlx-postgres/Cargo.toml b/sqlx-postgres/Cargo.toml
index df45ab33ff..d5bf41f9b1 100644
--- a/sqlx-postgres/Cargo.toml
+++ b/sqlx-postgres/Cargo.toml
@@ -12,7 +12,7 @@ rust-version.workspace = true
[features]
any = ["sqlx-core/any"]
json = ["dep:serde", "dep:serde_json", "sqlx-core/json"]
-migrate = ["s... | [
"sqlx-postgres/Cargo.toml"
] | [
{
"comment": "Would be nice if etcetera could be bumped to 0.11.0 to get a newer windows-sys version that doesn't depend on windows-targets.\r\n",
"path": "sqlx-postgres/Cargo.toml",
"hunk": "",
"resolving_sha": "003b698e99e024f3621b8043a2426fde5b741171",
"resolving_diff": "diff --git a/sqlx-pos... | true | ||
transact-rs/sqlx | 3,980 | issue_to_patch | sqlite transaction creation is not error or drop-safe.
### I have found these related issues/pull requests
None
### Description
This is sort of two bugs in one. But the causes are very related (partially the same) and the simpler error-handling bug actually helps demonstrate the problem while being much simpler and... | Correctly `ROLLBACK` transaction when dropped during `BEGIN`. | Previously if the transaction was dropped while the transaction was being set up it was possible that the transaction was successfully opened but not closed. In common usage this would result in returning an open transaction to the connection pool which would have unexpected effects ranging from errors due to trying to... | 5f8fc6b752b20bbfbc80d1d381e469d48b05b561 | af5134d128f51a36157633544b7c574078f17da9 | diff --git a/sqlx-core/src/transaction.rs b/sqlx-core/src/transaction.rs
index 917690339e..09bb68ed02 100644
--- a/sqlx-core/src/transaction.rs
+++ b/sqlx-core/src/transaction.rs
@@ -100,15 +100,19 @@ where
conn: impl Into<MaybePoolConnection<'c, DB>>,
statement: Option<SqlStr>,
) -> BoxFuture<'c... | [
"sqlx-core/src/transaction.rs"
] | [] | true | |
transact-rs/sqlx | 4,173 | issue_to_patch | ci: check direct minimal versions | Switch minimal-versions CI check to direct-minimal-versions
Avoids failures caused by incorrect lower bounds in transitive dependencies (e.g. native-tls 0.2.12 declaring openssl ^0.10.29 but requiring >= 0.10.46 for Pkcs12::parse2). direct-minimal-versions only resolves our own declared lower bounds to their minimum... | 9ecb76d8257aab14beb830004b3384e445a0fdc8 | bfe9ceef01a1e45c5af9e569d2881851a67744aa | diff --git a/.github/workflows/sqlx.yml b/.github/workflows/sqlx.yml
index 394b9efdd3..8d69cff731 100644
--- a/.github/workflows/sqlx.yml
+++ b/.github/workflows/sqlx.yml
@@ -68,7 +68,7 @@ jobs:
--target-dir target/beta/
check-minimal-versions:
- name: Check build using minimal versions
+ name: Ch... | [
".github/workflows/sqlx.yml",
"Cargo.lock",
"Cargo.toml",
"examples/mysql/todos/Cargo.toml",
"examples/postgres/axum-social-with-tests/Cargo.toml",
"examples/postgres/chat/Cargo.toml",
"examples/postgres/files/Cargo.toml",
"examples/postgres/json/Cargo.toml",
"examples/postgres/listen/Cargo.toml",
... | [] | true | ||
transact-rs/sqlx | 4,257 | issue_to_patch | Prefer to give real data to `.bind()` in `README.md` | Using undefined `user_email` and `user_name` left me confused, because:
1. I was not aware of their types
2. I didn't know where they did come from
Passing real values seem to be more correct and more readable :)
<!--
PR AUTHOR INSTRUCTIONS; PLEASE READ.
Give your pull request an accurate and descriptive t... | 45ba9907a1cded7e842e43f9b00da75d86522c69 | e0ba97802b7a0aaa295a0f7ffe60362809c6b1e4 | diff --git a/README.md b/README.md
index be976e4cd9..ff98f45350 100644
--- a/README.md
+++ b/README.md
@@ -334,7 +334,7 @@ use futures_util::TryStreamExt;
use sqlx::Row;
let mut rows = sqlx::query("SELECT * FROM users WHERE email = ?")
- .bind(email)
+ .bind("user@example.com")
.fetch(&mut conn);
whil... | [
"README.md"
] | [] | true | ||
transact-rs/sqlx | 3,846 | issue_to_patch | Skipping/Faking Migrations
### I have found these related issues/pull requests
Relates to #3706
### Description
In my use case it would be helpful to be able to skip/fake migrations, i.e. mark migrations as done but not actually execute the SQL statements of the migration.
I have a system with existing migrations ... | Add the possibility to skip migrations | ### Does your PR solve an issue?
fixes #3841
### Is this a breaking change?
Yes, it modifies the public trait `Migrate`.
| 1dd526a2ed67fa763766e670c30b1ce3b152a42e | 856519c91376f6194f627b93baa3fdadfe34908a | diff --git a/sqlx-cli/src/database.rs b/sqlx-cli/src/database.rs
index eaba46eed9..44d58eecca 100644
--- a/sqlx-cli/src/database.rs
+++ b/sqlx-cli/src/database.rs
@@ -62,7 +62,16 @@ pub async fn setup(
connect_opts: &ConnectOpts,
) -> anyhow::Result<()> {
create(connect_opts).await?;
- migrate::run(config... | [
"sqlx-cli/src/database.rs",
"sqlx-cli/src/lib.rs",
"sqlx-cli/src/migrate.rs",
"sqlx-cli/src/opt.rs",
"sqlx-cli/tests/common/mod.rs",
"sqlx-cli/tests/migrate.rs",
"sqlx-core/src/any/migrate.rs",
"sqlx-core/src/migrate/error.rs",
"sqlx-core/src/migrate/migrate.rs",
"sqlx-core/src/migrate/migrator.rs... | [
{
"comment": "I'd like to put this under an `override` subcommand. That way, it's clear that what you're doing is potentially dangerous, and we can add other useful commands there as well (such as forgetting already-run migrations or updating their hashes).",
"path": "sqlx-cli/src/lib.rs",
"hunk": "@@ -... | diff --git a/sqlx-cli/tests/common/mod.rs b/sqlx-cli/tests/common/mod.rs
index 66e7924859..e3bd9f6e83 100644
--- a/sqlx-cli/tests/common/mod.rs
+++ b/sqlx-cli/tests/common/mod.rs
@@ -13,6 +13,22 @@ pub struct TestDatabase {
pub config_path: Option<PathBuf>,
}
+pub enum MigrateCommand {
+ Run,
+ Revert,
+ ... | true |
transact-rs/sqlx | 4,136 | issue_to_patch | Ensure Deterministic Migration Order | ### What / why
When embedding migrations into the binary via `migrate!`, the *iteration order* of migration files can vary across filesystems/OSes. That makes the resulting embedded migration list (and thus the final binary) non-deterministic, which breaks reproducible builds.
This PR makes migration ordering det... | 452da1acf549e94a6358a770e7513433f15b5f0a | e590e4edf12617476baba9e2057be73110188db6 | diff --git a/sqlx-core/src/migrate/migration.rs b/sqlx-core/src/migrate/migration.rs
index 79721d244d..a434ac9684 100644
--- a/sqlx-core/src/migrate/migration.rs
+++ b/sqlx-core/src/migrate/migration.rs
@@ -1,5 +1,6 @@
use sha2::{Digest, Sha384};
use std::borrow::Cow;
+use std::cmp::Ordering;
use crate::sql_str::S... | [
"sqlx-core/src/migrate/migration.rs",
"sqlx-core/src/migrate/migration_type.rs",
"sqlx-core/src/migrate/migrator.rs",
"sqlx-core/src/migrate/source.rs"
] | [
{
"comment": "We should just implement `PartialOrd` and `Ord` for `Migration` and then this can just be `migrations.sort()`.",
"path": "sqlx-core/src/migrate/migrator.rs",
"hunk": "@@ -87,8 +87,14 @@ impl Migrator {\n /// let m = Migrator::with_migrations(migrations);\n /// ```\n pub fn wit... | true | ||
transact-rs/sqlx | 3,993 | issue_to_patch | Unescape PostgreSQL passfile password | This PR unescapes the password read from a passfile. Includes unittests and a small error handling refactor.
### Is this a breaking change?
Yes. Passfile-provided passwords containing backslashes are now different.
### Reference
https://github.com/postgres/postgres/blob/807ee417e562c355360e891f415e6e8e6e4c4... | c01f51330abc50dca6714bd73eff0313aa353b8c | 1cf689bb49fba5510363295b999c0f233ac93077 | diff --git a/sqlx-postgres/src/options/pgpass.rs b/sqlx-postgres/src/options/pgpass.rs
index bf16559548..985e9aaca4 100644
--- a/sqlx-postgres/src/options/pgpass.rs
+++ b/sqlx-postgres/src/options/pgpass.rs
@@ -4,6 +4,12 @@ use std::fs::File;
use std::io::{BufRead, BufReader};
use std::path::PathBuf;
+#[derive(Debu... | [
"sqlx-postgres/src/options/pgpass.rs"
] | [] | true | ||
transact-rs/sqlx | 4,255 | issue_to_patch | query_as AnyPool returns BLOB that can't be parsed into struct
### Bug Description
Hello, I am trying to write database agnostic application that would support Postgresql and Mysql/Mariadb and SQLite with where database would be defined before run so I've choosen AnyPool for this.
So far queries with MySqlPool and... | breaking(any+mysql): correctly convert text and blob types to `AnyTypeInfo` | ### Does your PR solve an issue?
closes #4225 (superceded PR)
closes #4132
closes #3635
related to #3387
### Is this a breaking change?
Columns previously reported as `BLOB` from the MySQL `Any` driver may now be reported and decoded as `TEXT` and vice versa. | b77ba16605eb49b481507a06bf2b3b4d1c33477b | 27b0ebe399e23a507ea909f818c9f0bc9d510b20 | diff --git a/sqlx-mysql/src/any.rs b/sqlx-mysql/src/any.rs
index b0950e0b41..57c895826f 100644
--- a/sqlx-mysql/src/any.rs
+++ b/sqlx-mysql/src/any.rs
@@ -16,6 +16,7 @@ use sqlx_core::database::Database;
use sqlx_core::executor::Executor;
use sqlx_core::sql_str::SqlStr;
use sqlx_core::transaction::TransactionManager... | [
"sqlx-mysql/src/any.rs",
"tests/mysql/mysql.rs"
] | [] | diff --git a/tests/mysql/mysql.rs b/tests/mysql/mysql.rs
index 8d89d74c70..5374e651c8 100644
--- a/tests/mysql/mysql.rs
+++ b/tests/mysql/mysql.rs
@@ -3,6 +3,7 @@ use futures_util::TryStreamExt;
use sqlx::mysql::{MySql, MySqlConnection, MySqlPool, MySqlPoolOptions, MySqlRow};
use sqlx::{Column, Connection, Executor, ... | true |
transact-rs/sqlx | 4,223 | issue_to_patch | test(sqlite): add regression test for ORDER BY + LIMIT nullability (#4147) | Adds a regression test for #4147 — `query_as!` incorrectly inferred `TEXT NOT NULL` as nullable when the query included `ORDER BY ... LIMIT`.
The root cause was that ORDER BY + LIMIT routes data through an ephemeral sorter table, and the old explain analysis lost NOT NULL constraints through the round-trip. This is al... | 4249cb49b4939f141014845c4e9611451b1873f5 | eb481d03d37a396ff9276e5245c3bbddb4a05b05 | [
"tests/sqlite/describe.rs"
] | [] | diff --git a/tests/sqlite/describe.rs b/tests/sqlite/describe.rs
index 4c0768a5e2..49bdbd35e7 100644
--- a/tests/sqlite/describe.rs
+++ b/tests/sqlite/describe.rs
@@ -591,6 +591,50 @@ async fn it_describes_table_order_by() -> anyhow::Result<()> {
Ok(())
}
+// Regression test for https://github.com/launchbadge/s... | true | ||
transact-rs/sqlx | 4,253 | issue_to_patch | chore: update example to axum 0.8 | ### Does your PR solve an issue?
No.
### Is this a breaking change?
No. | 322021f1196aa0fc6225a62b3c46778c85eaa1ea | 02688ac66f515976304a9567cf10b10839554942 | diff --git a/Cargo.lock b/Cargo.lock
index 41712a9eeb..7c01f64c6a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -419,62 +419,66 @@ dependencies = [
[[package]]
name = "axum"
-version = "0.5.17"
+version = "0.8.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "acee9fd5073ab6b045a275b3e7... | [
"Cargo.lock",
"examples/postgres/axum-social-with-tests/Cargo.toml",
"examples/postgres/axum-social-with-tests/src/http/mod.rs",
"examples/postgres/axum-social-with-tests/src/http/post/comment.rs",
"examples/postgres/axum-social-with-tests/src/http/post/mod.rs",
"examples/postgres/axum-social-with-tests/s... | [] | diff --git a/examples/postgres/axum-social-with-tests/tests/common.rs b/examples/postgres/axum-social-with-tests/tests/common.rs
index 2b7f169ae9..64da67091f 100644
--- a/examples/postgres/axum-social-with-tests/tests/common.rs
+++ b/examples/postgres/axum-social-with-tests/tests/common.rs
@@ -1,10 +1,11 @@
// This is... | true | |
transact-rs/sqlx | 4,251 | issue_to_patch | race polling a tls connection using sqlx-mysql
### I have found these related issues/pull requests
None found
### Description
In certain rare cases, I could get a transaction into a state where executing a REPLACE INTO query with bound parameters, two of which were large BLOB parameters, would hang and the connecti... | fix(tls): potential deadlock in `StdSocket::poll_ready()` | ### Does your PR solve an issue?
Changes `StdSocket::poll_ready()` to schedule wakeups for both reads and writes where applicable, and return if _either_ direction is ready, not necessarily both.
Previously, if the TLS code, e.g. `rustls::Connection::complete_io()` tried to both read _and_ write on the socket, `po... | 322021f1196aa0fc6225a62b3c46778c85eaa1ea | 587f8bc30e885758ffe2f4262a3b6e3321defe30 | diff --git a/sqlx-core/src/net/tls/util.rs b/sqlx-core/src/net/tls/util.rs
index 42e11f31be..99aa6384c6 100644
--- a/sqlx-core/src/net/tls/util.rs
+++ b/sqlx-core/src/net/tls/util.rs
@@ -2,7 +2,7 @@ use crate::net::Socket;
use std::future;
use std::io::{self, Read, Write};
-use std::task::{ready, Context, Poll};
+u... | [
"sqlx-core/src/net/tls/util.rs"
] | [] | true | |
transact-rs/sqlx | 4,100 | issue_to_patch | Windows path for pgpass is wrong
### I have found these related issues/pull requests
None of the existing issues related to pgpass mention this.
### Description
The path searched by [`sqlx`](https://github.com/launchbadge/sqlx/blob/main/sqlx-postgres/src/options/pgpass.rs#L31) for the password file does not match w... | postgres: update pgpass path on windows | ### Does your PR solve an issue?
fixes #4097
The creator of the issue added a link to the libpq source code (thanks!), which was used to create this pr (https://github.com/postgres/postgres/blob/master/src/interfaces/libpq/fe-connect.c#L8262).
### Is this a breaking change?
Behavior changes _can_ be breakin... | e8384f2a00173c2b120eea72e99d120557fced8b | e744064ee57a0d4a0b97aad4f7fd5c079f823b59 | diff --git a/sqlx-postgres/src/options/pgpass.rs b/sqlx-postgres/src/options/pgpass.rs
index 930c5f0f51..5b07885935 100644
--- a/sqlx-postgres/src/options/pgpass.rs
+++ b/sqlx-postgres/src/options/pgpass.rs
@@ -28,7 +28,7 @@ pub fn load_password(
etcetera::base_strategy::Windows::new()
.ok()
- ... | [
"sqlx-postgres/src/options/pgpass.rs"
] | [] | true | |
transact-rs/sqlx | 4,245 | issue_to_patch | caching_sha2_password fast-auth path is broken — every connection pays RSA cost it was designed to avoid
### I have found these related issues/pull requests
N/A
### Description
The caching_sha2_password plugin exists for one reason: after an initial full authentication (which requires TLS or a 2048-bit RSA decrypti... | fix(mysql): repair caching_sha2_password fast-auth path | The client-side scramble mixed the SHA-256 inputs in the wrong order, so no spec-compliant MySQL server could validate it. Every connection fell through to perform_full_authentication and the plugin's cache was never exercised.
Two changes:
1. scramble_sha256 now hashes as SHA256(SHA256(SHA256(pw)) || nonce) to m... | b180eba9012c486e1c46d6aaf156d8f79ab37cdc | bb4a20f4763ed83c147216f5c7c2f2d4abb66b36 | diff --git a/sqlx-mysql/src/connection/auth.rs b/sqlx-mysql/src/connection/auth.rs
index 0c6a4bf997..cd6d9324c3 100644
--- a/sqlx-mysql/src/connection/auth.rs
+++ b/sqlx-mysql/src/connection/auth.rs
@@ -44,10 +44,12 @@ impl AuthPlugin {
match self {
AuthPlugin::CachingSha2Password if packet[0] == ... | [
"sqlx-mysql/src/connection/auth.rs"
] | [] | true | |
transact-rs/sqlx | 4,226 | issue_to_patch | fix(postgres): use non-prepared statements for metadata queries | <!--
PR AUTHOR INSTRUCTIONS; PLEASE READ.
Give your pull request an accurate and descriptive title. It should mention what component(s) or database driver(s) it touches.
Pull requests with undescriptive or inaccurate titles *may* be closed or have their titles changed before merging.
Fill out the fields below.... | 99af6eb1bfdc0ab4fb4951b33e4e01c53582ac3f | 9a94d9b57e6801cb0edcaf3d0e1a05c5f5ca27cb | diff --git a/sqlx-postgres/src/arguments.rs b/sqlx-postgres/src/arguments.rs
index c0db982c7d..90cdd85057 100644
--- a/sqlx-postgres/src/arguments.rs
+++ b/sqlx-postgres/src/arguments.rs
@@ -4,11 +4,9 @@ use std::sync::Arc;
use crate::encode::{Encode, IsNull};
use crate::error::Error;
-use crate::ext::ustr::UStr;
... | [
"sqlx-postgres/src/arguments.rs",
"sqlx-postgres/src/bind_iter.rs",
"sqlx-postgres/src/connection/establish.rs",
"sqlx-postgres/src/connection/executor.rs",
"sqlx-postgres/src/connection/mod.rs",
"sqlx-postgres/src/connection/resolve.rs",
"sqlx-postgres/src/types/json.rs",
"sqlx-postgres/src/types/rec... | [] | diff --git a/tests/postgres/postgres.rs b/tests/postgres/postgres.rs
index 06adf0ca7f..126771565a 100644
--- a/tests/postgres/postgres.rs
+++ b/tests/postgres/postgres.rs
@@ -2086,6 +2086,7 @@ async fn test_issue_3052() {
}
#[sqlx_macros::test]
+#[cfg(feature = "chrono")]
async fn test_bind_iter() -> anyhow::Resul... | true | |
transact-rs/sqlx | 4,118 | issue_to_patch | [postgres] Display line number in error message | <!--
PR AUTHOR INSTRUCTIONS; PLEASE READ.
Give your pull request an accurate and descriptive title. It should mention what component(s) or database driver(s) it touches.
Pull requests with undescriptive or inaccurate titles *may* be closed or have their titles changed before merging.
Fill out the fields below.... | e8384f2a00173c2b120eea72e99d120557fced8b | df25449afcd6dd0015dcca057289dc0e476f213f | diff --git a/sqlx-postgres/src/error.rs b/sqlx-postgres/src/error.rs
index 7b5a03f2b3..7f787a4e5e 100644
--- a/sqlx-postgres/src/error.rs
+++ b/sqlx-postgres/src/error.rs
@@ -156,7 +156,11 @@ impl Debug for PgDatabaseError {
impl Display for PgDatabaseError {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result ... | [
"sqlx-postgres/src/error.rs"
] | [] | true | ||
transact-rs/sqlx | 4,107 | issue_to_patch | Ability to configure SQLite extension entrypoint in `sqlx.toml`
### I have found these related issues/pull requests
Related to #3928 and the original addition in #3917
### Description
I'm trying out the SQLite extension support using the `0.9.0-alpha.1` versions of `sqlx` and `sqlx-cli`.
I was previously getting ... | Add SQLite extension entrypoint config to `sqlx.toml`, update SQLite extension example | ### Does your PR solve an issue?
Closes #4093
### Is this a breaking change?
No, the change is backwards compatible with the existing `Vec<String>` format.
~~Also, I did not find any tests for parsing the `sqlx.toml`, please let me know if there are and I just missed them.~~
Same with if you think there... | e8384f2a00173c2b120eea72e99d120557fced8b | 1cc8d4aa1ca3f28e510295de62e449afac431513 | diff --git a/examples/sqlite/extension/download-extension.sh b/examples/sqlite/extension/download-extension.sh
index ce7f23a486..83829b3ae9 100755
--- a/examples/sqlite/extension/download-extension.sh
+++ b/examples/sqlite/extension/download-extension.sh
@@ -6,4 +6,8 @@
# directory on the library search path, either b... | [
"examples/sqlite/extension/download-extension.sh",
"examples/sqlite/extension/migrations/20251115215857_uuid.sql",
"examples/sqlite/extension/sqlx.toml",
"examples/sqlite/extension/src/main.rs",
"sqlx-core/src/config/drivers.rs",
"sqlx-core/src/config/reference.toml",
"sqlx-core/src/config/tests.rs",
... | [] | true | |
transact-rs/sqlx | 3,651 | issue_to_patch | Add PgBindIter for encoding and use it as the implementation encoding &[T] | Partial fix for postgres of https://github.com/launchbadge/sqlx/issues/294
I've been using this implementation in several different projects and thought that I would see if it can be accepted upstream. I don't care about the name, but it is only useful when calling `.bind(PgBindIter(iter...))`, so that's what I've b... | 90797200eef8d7aa41ce0cd582fdd8560bfc0f24 | fbcc5371569cc85185f61f2c764e7d3f13727a26 | diff --git a/sqlx-postgres/src/bind_iter.rs b/sqlx-postgres/src/bind_iter.rs
new file mode 100644
index 0000000000..0f44f19e3d
--- /dev/null
+++ b/sqlx-postgres/src/bind_iter.rs
@@ -0,0 +1,154 @@
+use crate::{type_info::PgType, PgArgumentBuffer, PgHasArrayType, PgTypeInfo, Postgres};
+use core::cell::Cell;
+use sqlx_co... | [
"sqlx-postgres/src/bind_iter.rs",
"sqlx-postgres/src/lib.rs",
"sqlx-postgres/src/types/array.rs",
"tests/postgres/postgres.rs"
] | [
{
"comment": "```suggestion\r\n ) -> Result<IsNull, BoxDynError> {\r\n```",
"path": "sqlx-postgres/src/bind_iter.rs",
"hunk": "@@ -0,0 +1,114 @@\n+use sqlx_core::{\n+ database::Database,\n+ encode::{Encode, IsNull},\n+ types::Type,\n+};\n+\n+use crate::{type_info::PgType, PgArgumentBuffer, P... | diff --git a/tests/postgres/postgres.rs b/tests/postgres/postgres.rs
index f0d453a9a3..bf30bb3069 100644
--- a/tests/postgres/postgres.rs
+++ b/tests/postgres/postgres.rs
@@ -2069,6 +2069,62 @@ async fn test_issue_3052() {
}
#[sqlx_macros::test]
+async fn test_bind_iter() -> anyhow::Result<()> {
+ use sqlx::post... | true | |
transact-rs/sqlx | 3,651 | comment_to_fix | Add PgBindIter for encoding and use it as the implementation encoding &[T] | ```suggestion
) -> Result<IsNull, BoxDynError> {
``` | 90797200eef8d7aa41ce0cd582fdd8560bfc0f24 | fbcc5371569cc85185f61f2c764e7d3f13727a26 | diff --git a/sqlx-postgres/src/bind_iter.rs b/sqlx-postgres/src/bind_iter.rs
new file mode 100644
index 0000000000..0f44f19e3d
--- /dev/null
+++ b/sqlx-postgres/src/bind_iter.rs
@@ -0,0 +1,154 @@
+use crate::{type_info::PgType, PgArgumentBuffer, PgHasArrayType, PgTypeInfo, Postgres};
+use core::cell::Cell;
+use sqlx_co... | [
"sqlx-postgres/src/bind_iter.rs"
] | [
{
"comment": "```suggestion\r\n ) -> Result<IsNull, BoxDynError> {\r\n```",
"path": "sqlx-postgres/src/bind_iter.rs",
"hunk": "@@ -0,0 +1,114 @@\n+use sqlx_core::{\n+ database::Database,\n+ encode::{Encode, IsNull},\n+ types::Type,\n+};\n+\n+use crate::{type_info::PgType, PgArgumentBuffer, P... | true | ||
transact-rs/sqlx | 3,651 | comment_to_fix | Add PgBindIter for encoding and use it as the implementation encoding &[T] | ```suggestion
) -> Result<IsNull, BoxDynError> {
``` | 90797200eef8d7aa41ce0cd582fdd8560bfc0f24 | fbcc5371569cc85185f61f2c764e7d3f13727a26 | diff --git a/sqlx-postgres/src/bind_iter.rs b/sqlx-postgres/src/bind_iter.rs
new file mode 100644
index 0000000000..0f44f19e3d
--- /dev/null
+++ b/sqlx-postgres/src/bind_iter.rs
@@ -0,0 +1,154 @@
+use crate::{type_info::PgType, PgArgumentBuffer, PgHasArrayType, PgTypeInfo, Postgres};
+use core::cell::Cell;
+use sqlx_co... | [
"sqlx-postgres/src/bind_iter.rs"
] | [
{
"comment": "```suggestion\r\n ) -> Result<IsNull, BoxDynError> {\r\n```",
"path": "sqlx-postgres/src/bind_iter.rs",
"hunk": "@@ -0,0 +1,114 @@\n+use sqlx_core::{\n+ database::Database,\n+ encode::{Encode, IsNull},\n+ types::Type,\n+};\n+\n+use crate::{type_info::PgType, PgArgumentBuffer, P... | true | ||
transact-rs/sqlx | 3,651 | comment_to_fix | Add PgBindIter for encoding and use it as the implementation encoding &[T] | ```suggestion
) -> Result<IsNull, BoxDynError>
``` | 90797200eef8d7aa41ce0cd582fdd8560bfc0f24 | fbcc5371569cc85185f61f2c764e7d3f13727a26 | diff --git a/sqlx-postgres/src/bind_iter.rs b/sqlx-postgres/src/bind_iter.rs
new file mode 100644
index 0000000000..0f44f19e3d
--- /dev/null
+++ b/sqlx-postgres/src/bind_iter.rs
@@ -0,0 +1,154 @@
+use crate::{type_info::PgType, PgArgumentBuffer, PgHasArrayType, PgTypeInfo, Postgres};
+use core::cell::Cell;
+use sqlx_co... | [
"sqlx-postgres/src/bind_iter.rs"
] | [
{
"comment": "```suggestion\r\n ) -> Result<IsNull, BoxDynError>\r\n```",
"path": "sqlx-postgres/src/bind_iter.rs",
"hunk": "@@ -0,0 +1,114 @@\n+use sqlx_core::{\n+ database::Database,\n+ encode::{Encode, IsNull},\n+ types::Type,\n+};\n+\n+use crate::{type_info::PgType, PgArgumentBuffer, PgH... | true | ||
transact-rs/sqlx | 3,651 | comment_to_fix | Add PgBindIter for encoding and use it as the implementation encoding &[T] | ```suggestion
buf[len_start..(len_start + 4)].copy_from_slice(&count.to_be_bytes());
``` | 90797200eef8d7aa41ce0cd582fdd8560bfc0f24 | fbcc5371569cc85185f61f2c764e7d3f13727a26 | diff --git a/sqlx-postgres/src/bind_iter.rs b/sqlx-postgres/src/bind_iter.rs
new file mode 100644
index 0000000000..0f44f19e3d
--- /dev/null
+++ b/sqlx-postgres/src/bind_iter.rs
@@ -0,0 +1,154 @@
+use crate::{type_info::PgType, PgArgumentBuffer, PgHasArrayType, PgTypeInfo, Postgres};
+use core::cell::Cell;
+use sqlx_co... | [
"sqlx-postgres/src/bind_iter.rs"
] | [
{
"comment": "```suggestion\r\n buf[len_start..(len_start + 4)].copy_from_slice(&count.to_be_bytes());\r\n```",
"path": "sqlx-postgres/src/bind_iter.rs",
"hunk": "@@ -0,0 +1,114 @@\n+use sqlx_core::{\n+ database::Database,\n+ encode::{Encode, IsNull},\n+ types::Type,\n+};\n+\n+use crate:... | true | ||
transact-rs/sqlx | 3,651 | comment_to_fix | Add PgBindIter for encoding and use it as the implementation encoding &[T] | This looks like an oversight. We've already written 1 item at this point.
```suggestion
const MAX: usize = i32::MAX as usize - 1;
``` | 90797200eef8d7aa41ce0cd582fdd8560bfc0f24 | fbcc5371569cc85185f61f2c764e7d3f13727a26 | diff --git a/sqlx-postgres/src/bind_iter.rs b/sqlx-postgres/src/bind_iter.rs
new file mode 100644
index 0000000000..0f44f19e3d
--- /dev/null
+++ b/sqlx-postgres/src/bind_iter.rs
@@ -0,0 +1,154 @@
+use crate::{type_info::PgType, PgArgumentBuffer, PgHasArrayType, PgTypeInfo, Postgres};
+use core::cell::Cell;
+use sqlx_co... | [
"sqlx-postgres/src/bind_iter.rs"
] | [
{
"comment": "This looks like an oversight. We've already written 1 item at this point.\r\n\r\n```suggestion\r\n const MAX: usize = i32::MAX as usize - 1;\r\n```",
"path": "sqlx-postgres/src/bind_iter.rs",
"hunk": "@@ -0,0 +1,114 @@\n+use sqlx_core::{\n+ database::Database,\n+ encode::{Enco... | true | ||
transact-rs/sqlx | 3,651 | comment_to_fix | Add PgBindIter for encoding and use it as the implementation encoding &[T] | I'm not sure if printing the `Iterator::size_hint` would be more interesting here | 90797200eef8d7aa41ce0cd582fdd8560bfc0f24 | fbcc5371569cc85185f61f2c764e7d3f13727a26 | diff --git a/sqlx-postgres/src/bind_iter.rs b/sqlx-postgres/src/bind_iter.rs
new file mode 100644
index 0000000000..0f44f19e3d
--- /dev/null
+++ b/sqlx-postgres/src/bind_iter.rs
@@ -0,0 +1,154 @@
+use crate::{type_info::PgType, PgArgumentBuffer, PgHasArrayType, PgTypeInfo, Postgres};
+use core::cell::Cell;
+use sqlx_co... | [
"sqlx-postgres/src/bind_iter.rs"
] | [
{
"comment": "I'm not sure if printing the `Iterator::size_hint` would be more interesting here",
"path": "sqlx-postgres/src/bind_iter.rs",
"hunk": "@@ -0,0 +1,114 @@\n+use sqlx_core::{\n+ database::Database,\n+ encode::{Encode, IsNull},\n+ types::Type,\n+};\n+\n+use crate::{type_info::PgType, ... | true | ||
transact-rs/sqlx | 4,235 | issue_to_patch | chore: Update to validator 0.20 | ### Does your PR solve an issue?
No.
### Is this a breaking change?
No. | 05d49743ae0f7dd30dc28f3cfb0d8478bf588bda | 8ab531a58cf3633dc0c05769d4ccf595bf129397 | diff --git a/Cargo.lock b/Cargo.lock
index ca87304b8a..41712a9eeb 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1894,16 +1894,6 @@ version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
-[[package]]
-name = "idn... | [
"Cargo.lock",
"examples/postgres/axum-social-with-tests/Cargo.toml",
"examples/postgres/axum-social-with-tests/src/http/user.rs"
] | [] | true | ||
transact-rs/sqlx | 4,234 | issue_to_patch | fix: Use correct path in error when failing to create tmp dir in prepare | I came across this because my tmp dir was owned by `root:root` (due to a Docker build) and the error message contained a path that was not. That made it confusing to fix.
### Does your PR solve an issue?
Not an issue I created a Github issue for. Just a minor inconvenience.
### Is this a breaking change?
... | 05d49743ae0f7dd30dc28f3cfb0d8478bf588bda | 7b46126e16dd1bf90ec5083f5bf824a7844b841e | diff --git a/sqlx-cli/src/prepare.rs b/sqlx-cli/src/prepare.rs
index 9f3fc67da4..f3688add2a 100644
--- a/sqlx-cli/src/prepare.rs
+++ b/sqlx-cli/src/prepare.rs
@@ -161,7 +161,7 @@ fn run_prepare_step(ctx: &PrepareCtx, cache_dir: &Path) -> anyhow::Result<()> {
let tmp_dir = ctx.metadata.target_directory().join("sqlx... | [
"sqlx-cli/src/prepare.rs"
] | [] | true | ||
transact-rs/sqlx | 4,227 | issue_to_patch | `--cfg=sqlx_macros_unstable` broken in recent rust nightly
### I have found these related issues/pull requests
https://github.com/rust-lang/rust/pull/149400
https://github.com/rust-lang/rust/issues/99515
### Description
https://github.com/rust-lang/rust/pull/149400 restructured the nightly `proc_macro_tracked_path`... | fix(macros-core): update unstable proc_macro APIs for recent nightly | ### Does your PR solve an issue?
fixes #4150
### Is this a breaking change?
No. The change only touches code gated behind `#[cfg(any(sqlx_macros_unstable, procmacro2_semver_exempt))]`, which is opt-in and only compiles on nightly.
---
The unstable proc_macro tracking APIs were restructured in [rust-lang/rust#149400]... | 4249cb49b4939f141014845c4e9611451b1873f5 | 814ffc560ff4d6a096778518be6baeba59723508 | diff --git a/sqlx-macros-core/clippy.toml b/sqlx-macros-core/clippy.toml
index f303803661..0c0f4fe996 100644
--- a/sqlx-macros-core/clippy.toml
+++ b/sqlx-macros-core/clippy.toml
@@ -1,3 +1,3 @@
[[disallowed-methods]]
path = "std::env::var"
-reason = "use `crate::env()` instead, which optionally calls `proc_macro::tr... | [
"sqlx-macros-core/clippy.toml",
"sqlx-macros-core/src/lib.rs",
"sqlx-macros-core/src/migrate.rs",
"sqlx-macros-core/src/query/cache.rs"
] | [] | true | |
transact-rs/sqlx | 4,230 | issue_to_patch | chore: Update to cargo_metadata 0.23 | ### Does your PR solve an issue?
No.
### Is this a breaking change?
No. | b27b49de3bbaaf8101f47ad8ee5da0a20ff506aa | c7da6b444c1c91ac538cdeb2a7a9b5a30ff53f2c | diff --git a/Cargo.lock b/Cargo.lock
index d8ee57652b..ca87304b8a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -709,25 +709,25 @@ dependencies = [
[[package]]
name = "cargo-platform"
-version = "0.1.9"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e35af189006b9c0f0... | [
"Cargo.lock",
"sqlx-cli/Cargo.toml",
"sqlx-cli/src/metadata.rs"
] | [] | true | ||
transact-rs/sqlx | 4,233 | issue_to_patch | Change reference to dotenvy | I believe dotenv-rs is no longer maintained, so let's replace reference to the maintained version - dotenv.
<!--
PR AUTHOR INSTRUCTIONS; PLEASE READ.
Give your pull request an accurate and descriptive title. It should mention what component(s) or database driver(s) it touches.
Pull requests with undescriptive ... | b27b49de3bbaaf8101f47ad8ee5da0a20ff506aa | 6c9ae458b6c1d078c0275033b881f092434a2921 | diff --git a/README.md b/README.md
index e711e4f254..be976e4cd9 100644
--- a/README.md
+++ b/README.md
@@ -403,13 +403,13 @@ Differences from `query()`:
queries against; the database does not have to contain any data but must be the same
kind (MySQL, Postgres, etc.) and have the same schema as the database yo... | [
"README.md"
] | [] | true | ||
transact-rs/sqlx | 4,228 | issue_to_patch | sqlx-postgres: Make `PgNotification` struct clone | I have a rest endpoint that does SSE (Server Sent Events) where I listen on a Postgres channel on a notification to look for new rows in a table. I multiplex the [`PgListener`](https://docs.rs/sqlx/0.8.6/sqlx/postgres/struct.PgListener.html) through a tokio broadcast channel to reuse the same connection for multiple re... | 4249cb49b4939f141014845c4e9611451b1873f5 | 5dad9a134b1796c1f1feadcacdaad439701c6e7f | diff --git a/sqlx-postgres/src/listener.rs b/sqlx-postgres/src/listener.rs
index 9c439db854..1a84bd3d63 100644
--- a/sqlx-postgres/src/listener.rs
+++ b/sqlx-postgres/src/listener.rs
@@ -36,6 +36,7 @@ pub struct PgListener {
}
/// An asynchronous notification from Postgres.
+#[derive(Clone)]
pub struct PgNotificat... | [
"sqlx-postgres/src/listener.rs",
"sqlx-postgres/src/message/notification.rs"
] | [] | true | ||
transact-rs/sqlx | 4,221 | issue_to_patch | sqlite: invalid UTF-8 column names can reach safe `Column::name()` via `from_utf8_unchecked`
### I have found these related issues/pull requests
N/A
### Description
`sqlx-sqlite` currently assumes that SQLite column metadata strings are always valid UTF-8:
- `StatementHandle::column_name()` calls `sqlite3_column_n... | fix: replace `from_utf8_unchecked` with `from_utf8` in SQLite column name handling | ## Summary
Fixes #4192
The SQLite driver uses `from_utf8_unchecked()` to convert C strings returned by SQLite's C API (column names, table names, etc.) into Rust `&str` values. This is a **soundness violation**: SQLite does not guarantee that these strings are valid UTF-8, and `from_utf8_unchecked` on non-UTF-8 input... | b6cb1e3e0847dcd3f3a70c7f515f7733e9090c9a | 9bf46ade8d90d7b54882bd0d190a5be59c19fec6 | diff --git a/sqlx-sqlite/src/statement/handle.rs b/sqlx-sqlite/src/statement/handle.rs
index 1ceb00d2d4..c78ce98414 100644
--- a/sqlx-sqlite/src/statement/handle.rs
+++ b/sqlx-sqlite/src/statement/handle.rs
@@ -21,7 +21,7 @@ use std::os::raw::{c_char, c_int};
use std::ptr;
use std::ptr::NonNull;
use std::slice::from... | [
"sqlx-sqlite/src/statement/handle.rs"
] | [
{
"comment": "Turning these into panics is a step up from undefined behavior but long-term we might want to make this a recoverable error.\n\nThis is fine to merge as-is, I just wanted to get that on record.",
"path": "sqlx-sqlite/src/statement/handle.rs",
"hunk": "@@ -77,7 +77,8 @@ impl StatementHandle... | true | |
transact-rs/sqlx | 4,142 | issue_to_patch | Features to opt-in/opt-out of mysql_native_password
### I have found these related issues/pull requests
Relates to https://github.com/launchbadge/sqlx/issues/1
### Description
When building Rust applications in FIPS mode, it's important to be cognizant of which cryptographic algorithms are being included in the app... | feat(mysql): add mysql-rsa feature for non-TLS RSA auth | ### Does your PR solve an issue?
fixes https://github.com/launchbadge/sqlx/issues/4081
~~https://github.com/launchbadge/sqlx/issues/4082~~
### Is this a breaking change?
Editor note: yes. Some configurations may fail to connect without enabling the `mysql-rsa` feature.
Potentially. Public APIs are unchanged, b... | 05c8dc14a82c25fbe13c97886991940837119fca | 4e1539d20dde02a22f62c72af3fcea1d2158e627 | diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml
index 5e90588619..970afa7b37 100644
--- a/.github/workflows/examples.yml
+++ b/.github/workflows/examples.yml
@@ -28,7 +28,7 @@ jobs:
-p sqlx-cli
--release
--no-default-features
- --features mysql,post... | [
".github/workflows/examples.yml",
".github/workflows/sqlx-cli.yml",
".github/workflows/sqlx.yml",
"Cargo.lock",
"Cargo.toml",
"README.md",
"examples/mysql/todos/Cargo.toml",
"sqlx-cli/Cargo.toml",
"sqlx-cli/README.md",
"sqlx-macros-core/Cargo.toml",
"sqlx-macros/Cargo.toml",
"sqlx-mysql/Cargo.... | [
{
"comment": "I don't want to do this in all the examples because it's not idiomatic. For now, you could just edit the entry for `time` in the `Cargo.lock` to fix it to `0.3.45`. Later, I want to change to resolver v3 which is aware of `rust-version` and delete the `Cargo.lock` entirely because it doesn't matte... | diff --git a/tests/README.md b/tests/README.md
index bc2dc2327c..019f4c5d4d 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -5,14 +5,55 @@ SQLx uses docker to run many compatible database systems for integration testing
$ docker run hello-world
-Start the databases with `docker-compose` before runnin... | true |
transact-rs/sqlx | 4,142 | comment_to_fix | feat(mysql): add mysql-rsa feature for non-TLS RSA auth | Same here, I don't think fixing the version is the right approach. | 05c8dc14a82c25fbe13c97886991940837119fca | 4e1539d20dde02a22f62c72af3fcea1d2158e627 | diff --git a/Cargo.toml b/Cargo.toml
index c88ab231e2..9aef69d47e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -120,6 +120,7 @@ _sqlite = []
any = ["sqlx-core/any", "sqlx-mysql?/any", "sqlx-postgres?/any", "sqlx-sqlite?/any"]
postgres = ["sqlx-postgres", "sqlx-macros?/postgres"]
mysql = ["sqlx-mysql", "sqlx-macros?/m... | [
"Cargo.toml"
] | [
{
"comment": "Same here, I don't think fixing the version is the right approach.",
"path": "Cargo.toml",
"hunk": "@@ -184,7 +185,7 @@ ipnet = \"2.3.0\"\n ipnetwork = \"0.21.1\"\n mac_address = \"1.1.5\"\n rust_decimal = { version = \"1.26.1\", default-features = false, features = [\"std\"] }\n-time = { ... | true | ||
transact-rs/sqlx | 4,086 | issue_to_patch | ColumnNotFound error when querying with MySQL
### Bug Description
I have this function in my code:
```rs
pub async fn fetch_post(&self, id: Option<usize>) -> Option<Post> {
let query = match id {
Some(id) => sqlx::query("SELECT id, title, date, text FROM posts WHERE id = ?")
.bind(id as u... | fix(mysql): Work around for Issue #2206 (ColumnNotFound error when querying) | This fixes the test case in <https://github.com/launchbadge/sqlx/issues/2206#issuecomment-3482364427>.
I realize that this may not be the best fix for the issue, so consider this a conversation starter PR. The comments in the mysql `connection/executor.rs` suggest that column information may be delayed until first r... | 7248f6424426a9035ed28ef7fec7bf03aa767b9b | 2b21cfac95f76120141f85b01c7fab07e22e6100 | diff --git a/sqlx-core/src/column.rs b/sqlx-core/src/column.rs
index 132e7b0346..e9b6aec813 100644
--- a/sqlx-core/src/column.rs
+++ b/sqlx-core/src/column.rs
@@ -84,6 +84,11 @@ impl ColumnOrigin {
/// This trait is implemented for strings which are used to look up a column by name, and for
/// `usize` which is used ... | [
"sqlx-core/src/column.rs",
"sqlx-mysql/src/connection/executor.rs",
"tests/mysql/mysql.rs"
] | [
{
"comment": "You can actually just add `#[cfg(mariadb)]` to the test to only run it on MariaDB.",
"path": "tests/mysql/mysql.rs",
"hunk": "@@ -636,3 +636,36 @@ async fn issue_3200() -> anyhow::Result<()> {\n \n Ok(())\n }\n+\n+#[sqlx_macros::test]\n+async fn it_can_name_columns_issue_2206() -> anyh... | diff --git a/tests/mysql/mysql.rs b/tests/mysql/mysql.rs
index 5d6a5ef233..8d89d74c70 100644
--- a/tests/mysql/mysql.rs
+++ b/tests/mysql/mysql.rs
@@ -636,3 +636,33 @@ async fn issue_3200() -> anyhow::Result<()> {
Ok(())
}
+
+#[cfg(mariadb)]
+#[sqlx_macros::test]
+async fn it_can_name_columns_issue_2206() -> an... | true |
transact-rs/sqlx | 4,086 | comment_to_fix | fix(mysql): Work around for Issue #2206 (ColumnNotFound error when querying) | You can actually just add `#[cfg(mariadb)]` to the test to only run it on MariaDB. | 7248f6424426a9035ed28ef7fec7bf03aa767b9b | 2b21cfac95f76120141f85b01c7fab07e22e6100 | diff --git a/tests/mysql/mysql.rs b/tests/mysql/mysql.rs
index 5d6a5ef233..8d89d74c70 100644
--- a/tests/mysql/mysql.rs
+++ b/tests/mysql/mysql.rs
@@ -636,3 +636,33 @@ async fn issue_3200() -> anyhow::Result<()> {
Ok(())
}
+
+#[cfg(mariadb)]
+#[sqlx_macros::test]
+async fn it_can_name_columns_issue_2206() -> an... | [
"tests/mysql/mysql.rs"
] | [
{
"comment": "You can actually just add `#[cfg(mariadb)]` to the test to only run it on MariaDB.",
"path": "tests/mysql/mysql.rs",
"hunk": "@@ -636,3 +636,36 @@ async fn issue_3200() -> anyhow::Result<()> {\n \n Ok(())\n }\n+\n+#[sqlx_macros::test]\n+async fn it_can_name_columns_issue_2206() -> anyh... | true | ||
transact-rs/sqlx | 4,201 | issue_to_patch | Postgres: SCRAM authentication does not `SASLprep` passwords before computing `SaltedPassword`
### I have found these related issues/pull requests
N/A
### Description
`sqlx-postgres/src/connection/sasl.rs` comments the SCRAM step as:
```rust
// SaltedPassword := Hi(Normalize(password), salt, i)
```
but the implem... | Fix SCRAM password `SASLprep` | ### Does your PR solve an issue?
fixes [#4196](https://github.com/launchbadge/sqlx/issues/4196)
### Is this a breaking change?
No.
| 9d6bf6629f172d32fe1e6cafe8071439d213fc75 | f8870d3595ef2e20e0a4648291c5ead066d49a09 | diff --git a/sqlx-postgres/src/connection/sasl.rs b/sqlx-postgres/src/connection/sasl.rs
index 94fdfc689f..7245e8ee49 100644
--- a/sqlx-postgres/src/connection/sasl.rs
+++ b/sqlx-postgres/src/connection/sasl.rs
@@ -56,8 +56,11 @@ pub(crate) async fn authenticate(
let username = format!("{}={}", USERNAME_ATTR, opti... | [
"sqlx-postgres/src/connection/sasl.rs"
] | [
{
"comment": "This is copying a panic from earlier in this file which is really, really old code. Can we avoid adding a new one? This could just return [`Error::Configuration`](https://docs.rs/sqlx/latest/sqlx/enum.Error.html#variant.Configuration).\n\nIn fact, if you'd like to go ahead and replace the other `p... | true | |
transact-rs/sqlx | 4,167 | issue_to_patch | add sqlite serialize/deserialize example | ### Does your PR solve an issue?
No, it's just an example to show how the `serialize` and `deserialize` APIs can be used.
### Is this a breaking change?
No. | 05c8dc14a82c25fbe13c97886991940837119fca | c2ef783e00868fb3f056de535c6fb0124f2e5f43 | diff --git a/Cargo.lock b/Cargo.lock
index fe01e11720..efebf50629 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3842,6 +3842,15 @@ dependencies = [
"tokio",
]
+[[package]]
+name = "sqlx-example-sqlite-serialize"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "sqlx",
+ "tokio",
+]
+
[[package]]
name = "sqlx-ex... | [
"Cargo.lock",
"Cargo.toml",
"examples/sqlite/serialize/Cargo.toml",
"examples/sqlite/serialize/src/main.rs"
] | [
{
"comment": "I don't feel that this really makes sense to carry as an example, because this is a really niche use-case. These examples are targeted more at beginners and common use-cases to use as a basis. This is more like a demo/proof-of-concept.",
"path": "examples/sqlite/serialize/src/main.rs",
"hu... | true | ||
transact-rs/sqlx | 4,167 | comment_to_fix | add sqlite serialize/deserialize example | I don't feel that this really makes sense to carry as an example, because this is a really niche use-case. These examples are targeted more at beginners and common use-cases to use as a basis. This is more like a demo/proof-of-concept. | 05c8dc14a82c25fbe13c97886991940837119fca | c2ef783e00868fb3f056de535c6fb0124f2e5f43 | diff --git a/examples/sqlite/serialize/src/main.rs b/examples/sqlite/serialize/src/main.rs
new file mode 100644
index 0000000000..f3c0b709b5
--- /dev/null
+++ b/examples/sqlite/serialize/src/main.rs
@@ -0,0 +1,31 @@
+use sqlx::sqlite::SqliteOwnedBuf;
+use sqlx::{Connection, SqliteConnection};
+
+#[tokio::main(flavor = ... | [
"examples/sqlite/serialize/src/main.rs"
] | [
{
"comment": "I don't feel that this really makes sense to carry as an example, because this is a really niche use-case. These examples are targeted more at beginners and common use-cases to use as a basis. This is more like a demo/proof-of-concept.",
"path": "examples/sqlite/serialize/src/main.rs",
"hu... | true | ||
transact-rs/sqlx | 4,219 | issue_to_patch | sqlite: safe custom collation APIs can pass invalid UTF-8 as `&str`
### I have found these related issues/pull requests
#4192, #4193 are both UTF-8 related bug, but not the same one.
### Description
`SqliteConnectOptions::collation()` and `LockedSqliteHandle::create_collation()` expose a safe callback signature `Fn... | sqlite: lossily coerce invalid UTF-8 in custom collation callback | The safe `Fn(&str, &str) -> Ordering` signature exposed by `SqliteConnectOptions::collation()` and `LockedSqliteHandle::create_collation()` was backed by `from_utf8_unchecked`, so a database containing invalid UTF-8 text could reach the user callback and materialize `&str` values that violate Rust's UTF-8 invariant ins... | 69ee0dfcb4305bb36dc0fe510a421829b428e554 | 7b5f917c41cdb283017d7a4c9d488f32d0128ea2 | diff --git a/sqlx-sqlite/src/connection/collation.rs b/sqlx-sqlite/src/connection/collation.rs
index e7422138bc..229e780adf 100644
--- a/sqlx-sqlite/src/connection/collation.rs
+++ b/sqlx-sqlite/src/connection/collation.rs
@@ -3,7 +3,6 @@ use std::ffi::CString;
use std::fmt::{self, Debug, Formatter};
use std::os::raw... | [
"sqlx-sqlite/src/connection/collation.rs"
] | [] | true | |
transact-rs/sqlx | 4,088 | issue_to_patch | query! macro infers type as Option for primary key
### I have found these related issues/pull requests
related to https://github.com/launchbadge/sqlx/issues/1923
### Description
Expected behavior: infer that primary keys can't be optional
### Reproduction steps
using sqite driver given a sample table:
```
CREATE ... | (Fix) Handle nullability of SQLite rowid alias columns | ### Does your PR solve an issue?
fixes #3967
### Is this a breaking change?
This is a breaking change.
Previously an `INTEGER PRIMARY KEY` column was wrongly inferred to be nullable, so code using `query!` will break, as the result will now be an `i64` instead of an `Option<i64>`.
`query_as!` should be fine tho... | e8384f2a00173c2b120eea72e99d120557fced8b | 98baaa642b73a726797b0d86c9e04204287b3209 | diff --git a/sqlx-sqlite/src/connection/explain.rs b/sqlx-sqlite/src/connection/explain.rs
index edd65ece49..550f21557e 100644
--- a/sqlx-sqlite/src/connection/explain.rs
+++ b/sqlx-sqlite/src/connection/explain.rs
@@ -43,6 +43,7 @@ const OP_IDX_GE: &str = "IdxGE";
const OP_IDX_GT: &str = "IdxGT";
const OP_IDX_LE: &s... | [
"sqlx-sqlite/src/connection/explain.rs",
"sqlx-sqlite/src/statement/handle.rs"
] | [
{
"comment": "nit: It might be worth an additional assertion for selecting rowid directly from each of the tables, since rowid behavior is unchanged between the 2 tables.",
"path": "sqlx-sqlite/src/connection/explain.rs",
"hunk": "@@ -1782,3 +1782,51 @@ fn test_root_block_columns_has_types() {\n ... | true | |
transact-rs/sqlx | 4,088 | comment_to_fix | (Fix) Handle nullability of SQLite rowid alias columns | nit: It might be worth an additional assertion for selecting rowid directly from each of the tables, since rowid behavior is unchanged between the 2 tables. | e8384f2a00173c2b120eea72e99d120557fced8b | 98baaa642b73a726797b0d86c9e04204287b3209 | diff --git a/sqlx-sqlite/src/connection/explain.rs b/sqlx-sqlite/src/connection/explain.rs
index edd65ece49..550f21557e 100644
--- a/sqlx-sqlite/src/connection/explain.rs
+++ b/sqlx-sqlite/src/connection/explain.rs
@@ -43,6 +43,7 @@ const OP_IDX_GE: &str = "IdxGE";
const OP_IDX_GT: &str = "IdxGT";
const OP_IDX_LE: &s... | [
"sqlx-sqlite/src/connection/explain.rs"
] | [
{
"comment": "nit: It might be worth an additional assertion for selecting rowid directly from each of the tables, since rowid behavior is unchanged between the 2 tables.",
"path": "sqlx-sqlite/src/connection/explain.rs",
"hunk": "@@ -1782,3 +1782,51 @@ fn test_root_block_columns_has_types() {\n ... | true | ||
transact-rs/sqlx | 4,202 | issue_to_patch | sqlite: `SqliteError::try_new()` unsafely assumes `sqlite3_errmsg()` is UTF-8
### I have found these related issues/pull requests
N/A
### Description
`sqlx-sqlite` currently builds `SqliteError.message` from `sqlite3_errmsg()` using `str::from_utf8_unchecked()`:
```rust
let message = unsafe {
let msg = sqlite3... | fix: replace from_utf8_unchecked with from_utf8_lossy in SqliteError | Replace `from_utf8_unchecked` with `from_utf8_lossy` in `SqliteError::try_new()`.
`sqlite3_errmsg()` can return non-UTF-8 bytes when schema element names contain invalid UTF (e.g. from a malicious or corrupted database file). The current `from_utf8_unchecked` call is unsound in that case since it constructs an invalid... | 9d6bf6629f172d32fe1e6cafe8071439d213fc75 | d2339036efa72a06fe23021a5c642405c9b04a5e | diff --git a/sqlx-sqlite/src/error.rs b/sqlx-sqlite/src/error.rs
index b4373d7a07..5510e25d97 100644
--- a/sqlx-sqlite/src/error.rs
+++ b/sqlx-sqlite/src/error.rs
@@ -39,7 +39,7 @@ impl SqliteError {
let msg = sqlite3_errmsg(handle);
debug_assert!(!msg.is_null());
- str::from_utf8... | [
"sqlx-sqlite/src/error.rs"
] | [] | true | |
transact-rs/sqlx | 4,203 | issue_to_patch | sqlite: `REGEXP` rejects non-`TEXT` values instead of using SQLite text coercion
### I have found these related issues/pull requests
The original REGEXP PR (#2189) already noted that the implementation was "very strict" and "only accepts UTF-8 columns in both the field and the REGEXP", but I could not find a dedicate... | fix: use sqlite3_value_text for REGEXP to match SQLite coercion | The `REGEXP` implementation rejects non-TEXT values by checking `sqlite3_value_type()` before calling `sqlite3_value_text()`. This means `123 REGEXP '23'` returns NULL instead of matching.
Per the [SQLite docs](https://www.sqlite.org/c3ref/value_blob.html), calling `sqlite3_value_text()` on INTEGER/REAL/BLOB values co... | 9d6bf6629f172d32fe1e6cafe8071439d213fc75 | 49359c1673b0fd6b2cf139c8fa36847a33905ebc | diff --git a/sqlx-sqlite/src/regexp.rs b/sqlx-sqlite/src/regexp.rs
index eb14fffc77..b525992d9d 100644
--- a/sqlx-sqlite/src/regexp.rs
+++ b/sqlx-sqlite/src/regexp.rs
@@ -136,8 +136,11 @@ unsafe fn get_regex_from_arg(
Some(regex)
}
-/// Get a text reference of the value of `arg`. If this value is not a string v... | [
"sqlx-sqlite/src/regexp.rs"
] | [] | true | |
transact-rs/sqlx | 4,165 | issue_to_patch | sqlx-postgres: fix correct operator precedence in byte length check | <!--
PR AUTHOR INSTRUCTIONS; PLEASE READ.
Give your pull request an accurate and descriptive title. It should mention what component(s) or database driver(s) it touches.
Pull requests with undescriptive or inaccurate titles *may* be closed or have their titles changed before merging.
Fill out the fields below.... | f5cdf3316d12ba0530486b4722a4114608fa1c84 | 02f5aff79c57759cf8f392d63e147f81ba4263b5 | diff --git a/sqlx-postgres/src/types/geometry/path.rs b/sqlx-postgres/src/types/geometry/path.rs
index 4f99e7e983..858e8ddcb1 100644
--- a/sqlx-postgres/src/types/geometry/path.rs
+++ b/sqlx-postgres/src/types/geometry/path.rs
@@ -131,7 +131,7 @@ impl PgPath {
.into());
}
- if bytes.len()... | [
"sqlx-postgres/src/types/geometry/path.rs",
"sqlx-postgres/src/types/geometry/polygon.rs"
] | [] | true | ||
transact-rs/sqlx | 4,158 | issue_to_patch | Panic in JSONB decoder on invalid version byte
## Summary
The Postgres JSONB decoder panics on untrusted database input instead of returning an error, violating the `Decode` trait contract.
## Location
`sqlx-postgres/src/types/json.rs` lines 88-92
## Bug Description
The JSONB decoder uses `assert_eq!` to validate... | Fix panic in JSONB decoder on invalid version byte | Fixes #4157
## Summary
Replaces `assert_eq!` with proper error handling in the JSONB decoder to prevent panics on untrusted database input.
## Changes
- **File**: `sqlx-postgres/src/types/json.rs`
- **Change**: Replace assertion with conditional check + error return
- **Lines changed**: 8 insertions, 5 deletions
#... | 7248f6424426a9035ed28ef7fec7bf03aa767b9b | b7ab16bd0d35afb3488c1b53365a4600d415df10 | diff --git a/sqlx-postgres/src/types/json.rs b/sqlx-postgres/src/types/json.rs
index 32f886c781..88e4b8468a 100644
--- a/sqlx-postgres/src/types/json.rs
+++ b/sqlx-postgres/src/types/json.rs
@@ -85,11 +85,12 @@ where
let mut buf = value.as_bytes()?;
if value.format() == PgValueFormat::Binary && valu... | [
"sqlx-postgres/src/types/json.rs"
] | [
{
"comment": "```suggestion\n format!(\"unsupported JSONB format version {} (expected 1) or incorrect type/corrupt data\", buf[0]).into(),\n```\n\nAs long as we're touching this, might as well cover the other possible cases.",
"path": "sqlx-postgres/src/types/json.rs",
"hunk": "@@ -85... | true | |
transact-rs/sqlx | 4,158 | comment_to_fix | Fix panic in JSONB decoder on invalid version byte | ```suggestion
format!("unsupported JSONB format version {} (expected 1) or incorrect type/corrupt data", buf[0]).into(),
```
As long as we're touching this, might as well cover the other possible cases. | 7248f6424426a9035ed28ef7fec7bf03aa767b9b | b7ab16bd0d35afb3488c1b53365a4600d415df10 | diff --git a/sqlx-postgres/src/types/json.rs b/sqlx-postgres/src/types/json.rs
index 32f886c781..88e4b8468a 100644
--- a/sqlx-postgres/src/types/json.rs
+++ b/sqlx-postgres/src/types/json.rs
@@ -85,11 +85,12 @@ where
let mut buf = value.as_bytes()?;
if value.format() == PgValueFormat::Binary && valu... | [
"sqlx-postgres/src/types/json.rs"
] | [
{
"comment": "```suggestion\n format!(\"unsupported JSONB format version {} (expected 1) or incorrect type/corrupt data\", buf[0]).into(),\n```\n\nAs long as we're touching this, might as well cover the other possible cases.",
"path": "sqlx-postgres/src/types/json.rs",
"hunk": "@@ -85... | true | ||
transact-rs/sqlx | 4,199 | issue_to_patch | `PgAdvisoryLock::acquire` is not cancel safe (undocumented footgun)
### I have found these related issues/pull requests
I only saw a few issues related to `PgAdvisoryLock` and none of them mentioned cancellation safety.
But there is this other cancel safety issue: https://github.com/launchbadge/sqlx/issues/2054
###... | fix(postgres): make advisory lock cancel safe | This pr makes the `PgAdvisoryLock::acquire` cancel safe by wrapping the connection in a `PgAdvisoryLock` before actually acquiring the lock. If the `acquire` future is dropped the drop impl will release the lock.
### Does your PR solve an issue?
fixes #4198
### Is this a breaking change?
Nope
| 05c8dc14a82c25fbe13c97886991940837119fca | afaa3e8a8002e07257a1562c874d4a9c6a0a40f6 | diff --git a/sqlx-postgres/src/advisory_lock.rs b/sqlx-postgres/src/advisory_lock.rs
index 84cad2bfdd..979aca06ce 100644
--- a/sqlx-postgres/src/advisory_lock.rs
+++ b/sqlx-postgres/src/advisory_lock.rs
@@ -3,6 +3,8 @@ use crate::Either;
use crate::PgConnection;
use hkdf::Hkdf;
use sha2::Sha256;
+use sqlx_core::exec... | [
"sqlx-postgres/src/advisory_lock.rs"
] | [
{
"comment": "Won't this also cause us to release the lock on drop before it's even been acquired? Is that OK?",
"path": "sqlx-postgres/src/advisory_lock.rs",
"hunk": "@@ -199,10 +199,12 @@ impl PgAdvisoryLock {\n /// See [Postgres' documentation for the Advisory Lock Functions][advisory-funcs] for ... | true | |
transact-rs/sqlx | 4,199 | comment_to_fix | fix(postgres): make advisory lock cancel safe | Won't this also cause us to release the lock on drop before it's even been acquired? Is that OK? | 05c8dc14a82c25fbe13c97886991940837119fca | afaa3e8a8002e07257a1562c874d4a9c6a0a40f6 | diff --git a/sqlx-postgres/src/advisory_lock.rs b/sqlx-postgres/src/advisory_lock.rs
index 84cad2bfdd..979aca06ce 100644
--- a/sqlx-postgres/src/advisory_lock.rs
+++ b/sqlx-postgres/src/advisory_lock.rs
@@ -3,6 +3,8 @@ use crate::Either;
use crate::PgConnection;
use hkdf::Hkdf;
use sha2::Sha256;
+use sqlx_core::exec... | [
"sqlx-postgres/src/advisory_lock.rs"
] | [
{
"comment": "Won't this also cause us to release the lock on drop before it's even been acquired? Is that OK?",
"path": "sqlx-postgres/src/advisory_lock.rs",
"hunk": "@@ -199,10 +199,12 @@ impl PgAdvisoryLock {\n /// See [Postgres' documentation for the Advisory Lock Functions][advisory-funcs] for ... | true | ||
transact-rs/sqlx | 4,189 | issue_to_patch | Bump flume to 0.12.0 | ### Is this a breaking change?
No | 05c8dc14a82c25fbe13c97886991940837119fca | 7fe8832fc4487895f33b366853b446993b9c72c3 | diff --git a/sqlx-sqlite/Cargo.toml b/sqlx-sqlite/Cargo.toml
index e1b4c7edc4..69a79baca7 100644
--- a/sqlx-sqlite/Cargo.toml
+++ b/sqlx-sqlite/Cargo.toml
@@ -79,7 +79,7 @@ url = { version = "2.2.2" }
percent-encoding = "2.1.0"
form_urlencoded = "1.2.2"
-flume = { version = "0.11.0", default-features = false, featu... | [
"sqlx-sqlite/Cargo.toml"
] | [] | true | ||
transact-rs/sqlx | 3,383 | issue_to_patch | Question: best way to use sqlx with connections to two different databases?
I have a program with two databases. One MySQL and one Postgres where I am syncing data from one to the other. Is that possible with sqlx? What is the best way to do that since the query macro has a hardcoded DATABASE_URL env var to determine ... | feat: create `sqlx.toml` format | Reference `sqlx.toml`: https://github.com/launchbadge/sqlx/blob/sqlx-toml/sqlx-core/src/config/reference.toml
Once this is implemented, I'm planning on starting an alpha release cycle for 0.9.0 so that we can test this. It's not expected to be a breaking change but it's a large enough feature that it should probably... | 764ae2f702b15748c56a46a67dc80d719a2977ec | 243d810f45b7e6e3ecf78691289dc07b81200dea | diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml
index 0dfbcbdf26..d1b8ff4634 100644
--- a/.github/workflows/examples.yml
+++ b/.github/workflows/examples.yml
@@ -27,7 +27,7 @@ jobs:
--bin sqlx
--release
--no-default-features
- --features mysql,postg... | [
".github/workflows/examples.yml",
"CHANGELOG.md",
"Cargo.lock",
"Cargo.toml",
"examples/postgres/multi-database/Cargo.toml",
"examples/postgres/multi-database/README.md",
"examples/postgres/multi-database/accounts/Cargo.toml",
"examples/postgres/multi-database/accounts/migrations/01_setup.sql",
"exa... | [
{
"comment": "This is the same confusing wording that already existed. I need to fix this.",
"path": "sqlx-macros-core/src/query/args.rs",
"hunk": "@@ -115,6 +106,73 @@ pub fn quote_args<DB: DatabaseExt>(\n })\n }\n \n+fn get_param_type<DB: DatabaseExt>(\n+ param_ty: &DB::TypeInfo,\n+ config: ... | diff --git a/sqlx-cli/tests/add.rs b/sqlx-cli/tests/add.rs
index 1d5ed7c7dd..cebbb51d53 100644
--- a/sqlx-cli/tests/add.rs
+++ b/sqlx-cli/tests/add.rs
@@ -1,20 +1,11 @@
+use anyhow::Context;
use assert_cmd::Command;
use std::cmp::Ordering;
use std::fs::read_dir;
+use std::ops::Index;
use std::path::{Path, PathBuf};... | true |
transact-rs/sqlx | 3,383 | comment_to_fix | feat: create `sqlx.toml` format | This is the same confusing wording that already existed. I need to fix this. | 764ae2f702b15748c56a46a67dc80d719a2977ec | 243d810f45b7e6e3ecf78691289dc07b81200dea | diff --git a/sqlx-macros-core/src/query/args.rs b/sqlx-macros-core/src/query/args.rs
index 788a9aadc5..1b338efa3e 100644
--- a/sqlx-macros-core/src/query/args.rs
+++ b/sqlx-macros-core/src/query/args.rs
@@ -1,9 +1,12 @@
use crate::database::DatabaseExt;
-use crate::query::QueryMacroInput;
+use crate::query::{QueryMacr... | [
"sqlx-macros-core/src/query/args.rs"
] | [
{
"comment": "This is the same confusing wording that already existed. I need to fix this.",
"path": "sqlx-macros-core/src/query/args.rs",
"hunk": "@@ -115,6 +106,73 @@ pub fn quote_args<DB: DatabaseExt>(\n })\n }\n \n+fn get_param_type<DB: DatabaseExt>(\n+ param_ty: &DB::TypeInfo,\n+ config: ... | true | ||
transact-rs/sqlx | 3,952 | issue_to_patch | `Pool::close` does not always wait for all connections to close
### Bug Description
Despite what the documentation says, calling `Pool::close` does not actually always wait for all the connections to close before returning. This is because of a bug / race condition in `PoolInner::close`.
This issue is hard to... | `Pool.close`: close all connections before returning | Fixes https://github.com/launchbadge/sqlx/issues/3217.
Supersedes https://github.com/launchbadge/sqlx/pull/3299.
I'm taking into consideration the discussion that already happened in https://github.com/launchbadge/sqlx/pull/3299, and then I just rebase it on the latest `main` and add one commit on top of that to ad... | 24317d5eab40fbc33caf1142946e2f39caad73ea | 0c32efe3ed1194369cb7ffa52847079c2180e348 | diff --git a/examples/postgres/listen/src/main.rs b/examples/postgres/listen/src/main.rs
index 587dab2a8f..fe39db73dc 100644
--- a/examples/postgres/listen/src/main.rs
+++ b/examples/postgres/listen/src/main.rs
@@ -68,6 +68,10 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
}
}
+ // Th... | [
"examples/postgres/listen/src/main.rs",
"sqlx-core/src/pool/inner.rs"
] | [] | true | |
transact-rs/sqlx | 4,176 | issue_to_patch | Rare panic in parsing of MySQL packet
### I have found these related issues/pull requests
I haven't found anything similar
### Description
I'm seeing a rare panic in my logs with this backtrace:
```
thread 'tokio-runtime-worker' panicked at 'advance out of bounds: the len is 1 but advancing by 2': bytes-1.11.0/src... | fix(mysql): return error instead of panic on truncated OK packet | ### Does your PR solve an issue?
fixes #4139
### Is this a breaking change?
No. This changes a panic into a returned `Err(Protocol(...))`, which callers already handle. The connection pool will gracefully discard the bad connection instead of crashing the tokio worker thread.
| 0a9eac18769cece9bec8483ff5b02be0484a0b9f | af6fb80f97f2f183aa9307631acf3e8acd7588f8 | diff --git a/sqlx-mysql/src/connection/executor.rs b/sqlx-mysql/src/connection/executor.rs
index 95eb2623bd..e331acf013 100644
--- a/sqlx-mysql/src/connection/executor.rs
+++ b/sqlx-mysql/src/connection/executor.rs
@@ -212,7 +212,7 @@ impl MySqlConnection {
// otherwise, this first packet is the start ... | [
"sqlx-mysql/src/connection/executor.rs",
"sqlx-mysql/src/connection/stream.rs",
"sqlx-mysql/src/io/buf.rs",
"sqlx-mysql/src/protocol/response/ok.rs",
"sqlx-mysql/src/protocol/statement/row.rs",
"sqlx-mysql/src/protocol/text/column.rs",
"sqlx-mysql/src/protocol/text/row.rs"
] | [
{
"comment": "I don't want to move the goalposts _too_ much, but it seems like these fields should at least be covered by the length check too.\n\nIn the long run we should probably ban use of `bytes::Buf` methods and instead write our own that return `Result`.",
"path": "sqlx-mysql/src/protocol/response/ok... | true | |
transact-rs/sqlx | 4,171 | issue_to_patch | fix(postgres): remove home crate in favor of std::env::home_dir | `home_dir()` was fixed in Rust 1.85 (rust-lang/rust#132515) and
un-deprecated in 1.87 (rust-lang/rust#137327). Since our MSRV is 1.86, the function is correct but still carries a deprecation warning until MSRV is bumped to 1.87.
This will allow other targets to compile including WebAssembly, see https://github.com/... | d9b3340d2f53efd9ad509b3413da6864a986f454 | f12549cf23ef79510c1b0cb16b0b617f2af6df59 | diff --git a/Cargo.lock b/Cargo.lock
index fe01e11720..236039f0ff 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3954,7 +3954,6 @@ dependencies = [
"hex",
"hkdf",
"hmac",
- "home",
"ipnet",
"ipnetwork",
"itoa",
diff --git a/sqlx-postgres/Cargo.toml b/sqlx-postgres/Cargo.toml
index 1ab7c713ad..2943049f0b 10064... | [
"Cargo.lock",
"sqlx-postgres/Cargo.toml",
"sqlx-postgres/src/options/pgpass.rs"
] | [] | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.