Wrong field metadata cause assertion in protocol_classic.cc::store_string()

Description

Using reproduction steps from https://perconadev.atlassian.net/browse/PXC-4397 on debug build it is easy to hit the following assertion:

mysqld: /home/kamil/repo/pxc/8.0/percona-xtradb-cluster/sql/protocol_classic.cc:3423: virtual bool Protocol_classic::store_string(const char*, size_t, const CHARSET_INFO*): Assertion `send_metadata || field_types == nullptr || field_types[field_pos] == MYSQL_TYPE_DECIMAL || field_types[field_pos] == MYSQL_TYPE_BIT || field_types[field_pos] == MYSQL_TYPE_NEWDECIMAL || field_types[field_pos] == MYSQL_TYPE_NEWDATE || field_types[field_pos] == MYSQL_TYPE_JSON || (field_types[field_pos] >= MYSQL_TYPE_ENUM && field_types[field_pos] <= MYSQL_TYPE_GEOMETRY)' failed.

Environment

None

blocks

Activity

Show:
Done

Details

Assignee

Reporter

Needs Review

Yes

Needs QA

No

Affects versions

Priority

Smart Checklist

Created March 29, 2024 at 10:20 AM
Updated September 20, 2024 at 11:13 AM
Resolved April 4, 2024 at 7:51 AM