Repository navigation
A quality patch: SQL Server length checks and values a session's TEXTSIZE may cut, one-or-all edits checked on the session that applies them, and copies that restore exactly what they read.
Fixed
- Following an Apply refusal's advice no longer drops the pending changes: running
SET ANSI_WARNINGS ON(SQL Server) orSET SESSION sql_notes = 1(MySQL, MariaDB) in the
tab asked to drop them first, so the changes the Apply was for were lost. Exactly those
settings now run without the question and the changes stay; any other statement still asks. Ctrl+Wtyped in the explorer's/filter, theLIMITfield of a table tab, the Monitor
tab's/filter or the cell editor closed the tab instead of editing the field, and what was
typed was lost (with no pending changes, the tab closed without a question). In every field of
one line, dialogs included,Ctrl+Wnow deletes the word before the cursor, as it does in the
editor's Insert mode; in a masked field, such as a password, it deletes everything before the
cursor. Outside text input it still closes the tab.- One or all of several identical rows (in a table without a key) is applied only where the table
the tab's session changes has exactly the columns the rows were found the same in. A temporary
table of the same name with one more column (MySQL and MariaDB), or another server behind a
proxy, could make rows that look the same differ there, and the Apply changed them anyway. The
Apply now reads the table's columns on that session after its row checks and, when they
differ, applies nothing and names the difference. - SQL Server: Copy as SQL and the SQL export wrote a
dateasN'2026-01-02', which a
datetimeorsmalldatetimecolumn reads by the session's date format: run into such a column
of another table underSET LANGUAGE Britishit stored 1 February, and failed for a day after
the 12th. A date is now written asCAST(N'2026-01-02' AS date), the same day under every
language and date format, and the same text in a text column; edits write it so too. - SQL Server: Copy as SQL and the SQL export wrote a
datetimeorsmalldatetimeas
N'2026-01-02 10:00:00.000', which the server reads by the session's language: run back under
SET LANGUAGE Britishit stored 1 February, and failed for a day after the 12th. Every date and
time is now written with aT(N'2026-01-02T10:00:00.000'), which every language reads the
same, as edits already wrote it. Asql_variantvalue was written as text (N'5'of anint
5), so running the copy back storednvarcharvalues; such a value is now refused and its
column named, and the SQL export keeps the rows before it. The CSV and JSON exports still write
it as shown. - SQL Server: an edit of an
nchar(n),nvarchar(n),binary(n)orvarbinary(n)column, or
of a type of your own over one of these or overchar(n)orvarchar(n), had no length
check, so the server refused a value too long only when it was applied. Such a value is now
refused at the cell, as forcharandvarchar;ncharandnvarcharcount UTF-16 code
units, so an emoji takes two. - SQL Server: with
SET ANSI_WARNINGS OFFrun in the tab, an Apply of a value too long for its
column reported success while the server stored it cut. An Apply under that setting now sends
nothing and says how to turn the setting back on. - SQL Server: after
SET TEXTSIZE nin a tab,varchar(max),nvarchar(max),
varbinary(max),text,ntextandimagevalues came cut atnbytes and were copied,
exported and used to find a row as if whole: deleting or updating a row of a table without a
key (found by its values) could delete or change a different row. Such a column is now marked:
still shown, but every copy, export, filter by value and edit that must find its row refuses
it and says why. - SQL Server: a
sql_variantholdingcharorvarchartext of code page 936 or 950 was decoded
with tables that give other characters than the server's for some bytes (936's0xA2E3
showed as€), with no mark. A result holding such text outside ASCII now fails, as one
holding text of code page 437 or 850 already did. - SQL Server: a result that fails because a
sql_variantholds text that can't be read exactly
now says so and names the code page, where it said the server could not be reached. ASCII
text in asql_variantreads under every code page, 437 and 850 included. - MySQL and MariaDB: in a session whose results are binary (
SET NAMES binary), the server
sends every text, and MariaDB'sINET6,UUIDandINET4, as the bytes of their text, and
Copy as SQL, the SQL export,yforg pand a filter by value wrote them asX'…': an
INET6value of 16 characters restored as another address, and other such values failed. A
value of a string type read with binary results, or while the session's values were not known,
is now refused and its column named. Results read with the session's usualutf8mb4copy as
before. - MySQL and MariaDB:
# count exactlyin the filter dialog no longer crashes the app, or takes
all its memory, when the answer states a length over 4 KiB beside a number it sent, as a proxy
or an odd server may. The number was padded with zeros to that length; it is now listed as
value not shownand cannot be ticked. - SQLite: Copy as SQL and the SQL export no longer write a value as another kind of value. In a
table that is notSTRICT, the text'0xABCD'of aBLOBcolumn was written as the blob
X'ABCD', the integer1of a column without a type (or ofBLOBorANY, or of an
expression) as the text'1', and the text'true'of abooleancolumn astrue(the
integer 1), so running the copy back changed the data. A value SQLite shows the same as a value
of another kind is now refused and its column named, as a float's infinity already was; for
now this refuses every blob too, which the CSV and JSON exports still write as shown. Text no
other kind is shown as is written as text, in aBLOBcolumn too, where it was refused. A
filter by a0x…value of aBLOBcolumn, which matched the blob only, is refused as well.
The archives are for macOS and Linux (arm64 and x86_64) and Windows (x86_64); SHA256SUMS lists their checksums. The Windows build is untested: CI builds it and runs its tests, but nobody has used datarig on Windows yet.
What's Changed
- docs: name SQLite and SQL Server where the docs list engines by @DokaDev in #728
- test(mysql): live tests for read-only sessions that a function tries to make writable by @DokaDev in #778
- fix(sqlite): copy and export a value as SQL only as what it holds by @DokaDev in #777
- fix(mssql): refuse values too long for their column before sending by @DokaDev in #782
- fix(mssql): fail sql_variant text of 936 and 950 outside ASCII by @DokaDev in #788
- fix(mysql): apply the preview limit before padding a group value by @DokaDev in #792
- fix(mssql): copy sql_variant and datetime values only as values that restore unchanged by @DokaDev in #783
- fix(tui): Ctrl+W deletes a word in one-line fields instead of closing the tab by @DokaDev in #794
- fix(mysql): never copy text read with binary results as bytes by @DokaDev in #796
- fix(mssql): never use values TEXTSIZE may have cut as whole by @DokaDev in #795
- fix(edit): keep pending changes when running an advised setting by @DokaDev in #799
- fix(mssql): copy a date as a typed literal every date format reads the same by @DokaDev in #805
- test(mssql): run the TUI tests that change the schema alone by @DokaDev in #810
- fix(edit): check one or all of identical rows on the applying session by @DokaDev in #807
- test(postgres): survive the second signal of one cancel request by @DokaDev in #811
- chore(release): 0.47.3 by @DokaDev in #816
Full Changelog: v0.47.2...v0.47.3