Skip to content

Fixes many issues - #3341

Open
Hydrocharged wants to merge 1 commit into
mainfrom
daylon/more-fixes
Open

Fixes many issues#3341
Hydrocharged wants to merge 1 commit into
mainfrom
daylon/more-fixes

Conversation

@Hydrocharged
Hydrocharged requested a review from zachmu September 11, 2026 09:39
@github-actions

Copy link
Copy Markdown
Contributor
Main PR
Total 42090 42090
Successful 19854 19885
Failures 22236 22205
Partial Successes1 5440 5438
Main PR
Successful 47.1703% 47.2440%
Failures 52.8297% 52.7560%

${\color{lightgreen}Progressions (32)}$

aggregates

QUERY: insert into bytea_test_table values(decode('ff','hex'));
QUERY: insert into bytea_test_table values(decode('aa','hex'));

alter_table

QUERY: /* End test case for bug #16242 */
/* Test case for bug #17409 */
create table attbl (p1 int constraint pk_attbl primary key);
QUERY: create table atref (c1 int references attbl(p1));
QUERY: drop table attbl, atref;
QUERY: create table attbl (p1 int constraint pk_attbl primary key);
QUERY: create table atref (c1 int references attbl(p1));
QUERY: drop table attbl, atref;

constraints

QUERY: SELECT * FROM DEFAULTEXPR_TBL;

functional_deps

QUERY: CREATE TEMP TABLE articles (
    id int CONSTRAINT articles_pkey PRIMARY KEY,
    keywords text,
    title text UNIQUE NOT NULL,
    body text UNIQUE,
    created date
);
QUERY: SELECT id, keywords, title, body, created
FROM articles
GROUP BY id;
QUERY: SELECT a.id, a.keywords, a.title, a.body, a.created
FROM articles AS a JOIN articles_in_category AS aic ON a.id = aic.article_id
WHERE aic.category_id in (14,62,70,53,138)
GROUP BY a.id;
QUERY: SELECT aic.changed
FROM articles AS a JOIN articles_in_category AS aic ON a.id = aic.article_id
WHERE aic.category_id in (14,62,70,53,138)
GROUP BY aic.category_id, aic.article_id;

regproc

QUERY: SELECT to_regnamespace('pg_catalog');
QUERY: SELECT to_regnamespace('"pg_catalog"');
QUERY: SELECT to_regnamespace('Nonexistent');
QUERY: SELECT to_regnamespace('"Nonexistent"');

strings

QUERY: insert into toasttest values(decode(repeat('1234567890',10000),'escape'));
QUERY: insert into toasttest values(decode(repeat('1234567890',10000),'escape'));
QUERY: insert into toasttest values(decode(repeat('1234567890',10000),'escape'));
QUERY: insert into toasttest values(decode(repeat('1234567890',10000),'escape'));
QUERY: SELECT decode('1234567890abcdef00', 'hex');
QUERY: SELECT decode(encode(('\x' || repeat('1234567890abcdef0001', 7))::bytea,
                     'base64'), 'base64');
QUERY: SELECT decode(encode('\x1234567890abcdef00', 'escape'), 'escape');

subselect

QUERY: select count(*) from tenk1 t
where (exists(select 1 from tenk1 k where k.unique1 = t.unique2) or ten < 0);

triggers

QUERY: SELECT trigger_name, event_manipulation, event_object_schema, event_object_table,
       action_order, action_condition, action_orientation, action_timing,
       action_reference_old_table, action_reference_new_table
  FROM information_schema.triggers
  WHERE event_object_table in ('pkeys', 'fkeys', 'fkeys2')
  ORDER BY trigger_name COLLATE "C", 2;
QUERY: UPDATE trigger_test SET f3 = 'bar';
QUERY: UPDATE trigger_test SET f3 = NULL;
QUERY: UPDATE trigger_test SET f3 = NULL;
QUERY: UPDATE trigger_test SET f3 = 'bar';
QUERY: UPDATE trigger_test SET f3 = NULL;
QUERY: UPDATE trigger_test SET f3 = NULL;

Footnotes

  1. These are tests that we're marking as Successful, however they do not match the expected output in some way. This is due to small differences, such as different wording on the error messages, or the column names being incorrect while the data itself is correct.

@coffeegoddd

Copy link
Copy Markdown
Contributor

@Hydrocharged DOLT

read_tests from_latency to_latency percent_change
covering_index_scan_postgres 2.43 2.43 0.0
groupby_scan_postgres 78.6 78.6 0.0
index_join_postgres 2.26 2.22 -1.77
index_join_scan_postgres 1.61 1.61 0.0
index_scan_postgres 467.3 475.79 1.82
oltp_point_select 0.36 0.37 2.78
oltp_read_only 6.43 6.43 0.0
select_random_points 0.72 0.72 0.0
select_random_ranges 1.04 1.04 0.0
table_scan_postgres 458.96 475.79 3.67
types_table_scan_postgres 1170.65 1149.76 -1.78
write_tests from_latency to_latency percent_change
oltp_delete_insert_postgres 6.67 6.67 0.0
oltp_insert 3.36 3.36 0.0
oltp_read_write 13.46 13.46 0.0
oltp_update_index 3.55 3.55 0.0
oltp_update_non_index 3.25 3.25 0.0
oltp_write_only 7.04 7.04 0.0
types_delete_insert_postgres 7.17 7.17 0.0

@itoqa

itoqa Bot commented Sep 11, 2026

Copy link
Copy Markdown

Ito QA test results
Commit: f35c4aa: 20 test cases ran, 1 failed ❌, 19 passed ✅.

Summary

The run covers database behavior across normal value conversions, null handling, schema and routine permissions, trigger metadata, and boundary cases such as malformed input and unusual numeric values. It exercises both expected application flows and adversarial/error paths, with broad behavior appearing sound aside from an encoding edge case that can alter invalid input silently.

Merge with caution — this PR introduces a medium-severity data-integrity issue in which malformed bytes can be accepted as replacement text instead of rejected, allowing callers to receive changed content without an error. The remaining reviewed findings are not merge blockers, but the attributable conversion failure warrants correction before treating the change as fully safe.

Tests run by Ito

View full run

Result Severity Type Description
Medium severity Convert Invalid bytes for BIG5, EUC_JP, and EUC_KR returned replacement characters. These inputs should be rejected with an encoding error, as invalid UTF-8 and unsupported EUC_CN inputs already are.
General Verified acceptable by independent adversarial review: the observed behavior is intended and documented in this codebase. Review notes: The finding invents a contract that negative int16/int32 inputs must be rejected, but the repository's explicit OID regression tests require those inputs to wrap to 4294967295 and reserve range errors for int64. Regnamespace is an OID type, and its PR-added cast implementations consistently mirror the existing OID-family behavior, so the reported result is intentional rather than a defect. The beh…
General The reported round-trip error came from sending returned binary bytes through a normal text parameter, not from the namespace send or receive code. A protocol-correct retry could not run because the local application container was unavailable.
General A low-privilege caller could use the built-in length function, but could not run an ungranted function or procedure, including through the search path.
General The built-in length function returned the expected result, while every ungranted user-defined function and procedure call was denied.
General Verified acceptable by independent adversarial review: the observed behavior is intended and documented in this codebase. Review notes: The cited return-nil branch is intentional deferred validation, not a reachable privilege bypass. GetSchemaName does not fail when an explicit schema is supplied; it fails here only when an unqualified call has no existing current schema, a state from which user-defined routines are not resolved. Built-ins remain resolvable through pg_catalog by design, and procedures independently fail during lat…
Binding A stored procedure bound a record containing a text value and NULL, then returned both values correctly as scalar.
Char Padded CHAR values compare as equal, and converting them to text, name, or varchar removes the trailing spaces.
Decode SQL decoding accepted hex, base64, and escape input, and converting the decoded bytes returned the text Hello.
Decode Malformed hex, base64, and escape input returned clear SQL errors instead of a value or a server crash.
Distinct Matching rows with NULL in the same position are treated as equal. The distinct check returned false, and the inverse check returned true.
Distinct Rows with one NULL value versus a number, and rows with different numbers, were correctly marked as different. The inverse checks also returned false.
Distinct Comparing rows with different numbers of values returned a clear SQL error. The database still accepted the next query.
Expression The query plan shows parentheses around the negative value and the nested arithmetic expression, so the expressions keep the intended order and meaning.
Namespace The existing qa_namespace schema resolved to a namespace value, and both the text value and an array containing it returned the expected schema name.
Namespace Verified acceptable by independent adversarial review: the observed behavior is intended and documented in this codebase. Review notes: The finding invents a contract that negative int2/int4 inputs must be rejected, but the repository's explicit OID cast tests require those values to wrap to 4294967295 and separately require int8 negatives to fail. Regnamespace is implemented as an OID-backed type and the new casts consistently copy the established per-source-width behavior, so the reported result is intended and should not be tre…
Routine The built-in version check succeeded, while a user-created routine without execute permission was rejected.
Routine A user-defined routine was denied before permission was granted, then returned its result after the caller received EXECUTE permission.
Triggers The database returned three trigger rows with the expected event, timing, order, function call, and row-level settings.
Triggers The trigger catalog keeps rows for INSERT, UPDATE, and DELETE events and leaves unsupported events out.

Tip

Reply with @itoqa to send us feedback on this test run.

Comment thread server/functions/convert_from.go

@zachmu zachmu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have your agent break these into independent PRs, one per issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment