Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Switching between sidebar tables no longer leaves extra blank space above the list. (#1675)
- SSH tunnels no longer pin a CPU core after the connection drops. A dropped tunnel is now detected and torn down instead of spinning in its relay loop. (#1769)
- Restored table tabs now load with the current page size instead of the page size from the previous session.
- MSSQL: large `nvarchar(max)` and `text` values no longer truncate to 2048 bytes when copied or viewed. TEXTSIZE is raised at connect time. (#1783)

## [0.53.0] - 2026-06-25

Expand Down
15 changes: 15 additions & 0 deletions Plugins/MSSQLDriverPlugin/FreeTDSConnection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,21 @@
lock.lock()
_isConnected = true
lock.unlock()

applyMaxTextSize(proc)
}

private func applyMaxTextSize(_ proc: UnsafeMutablePointer<DBPROCESS>) {
guard dbcmd(proc, "SET TEXTSIZE \(Int32.max)") != FAIL, dbsqlexec(proc) != FAIL else {
freetdsLogger.error("Failed to raise TEXTSIZE; large text columns may be truncated to the 2048-byte default")
return
}
while true {
let resCode = dbresults(proc)
if resCode == FAIL || resCode == Int32(NO_MORE_RESULTS) {
break
}
}
}

func switchDatabase(_ database: String) async throws {
Expand All @@ -203,7 +218,7 @@
if let handle {
freetdsUnregister(handle)
queue.async {
_ = dbclose(handle)

Check warning on line 221 in Plugins/MSSQLDriverPlugin/FreeTDSConnection.swift

View workflow job for this annotation

GitHub Actions / macOS App Tests

capture of 'handle' with non-Sendable type 'UnsafeMutablePointer<DBPROCESS>' (aka 'UnsafeMutablePointer<dbprocess>') in a '@sendable' closure

Check warning on line 221 in Plugins/MSSQLDriverPlugin/FreeTDSConnection.swift

View workflow job for this annotation

GitHub Actions / macOS App Tests

capture of 'handle' with non-Sendable type 'UnsafeMutablePointer<DBPROCESS>' (aka 'UnsafeMutablePointer<dbprocess>') in a '@sendable' closure

Check warning on line 221 in Plugins/MSSQLDriverPlugin/FreeTDSConnection.swift

View workflow job for this annotation

GitHub Actions / macOS App Tests

capture of 'handle' with non-Sendable type 'UnsafeMutablePointer<DBPROCESS>' (aka 'UnsafeMutablePointer<dbprocess>') in a '@sendable' closure
}
}
}
Expand Down
Loading