Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Column definitions are processed twice: mthd_my_read_rows() copies each packet into an intermediate row set, then unpack_fields() copies it again into MYSQL_FIELD with six allocations per column.
New ma_read_fields() decodes the packets directly into MYSQL_FIELD with one allocation per column. unpack_fields() is removed.
Effect: "SELECT *" on 100 int columns, text protocol: client CPU per query 12.0 -> 7.5 µs, about +10% queries per second.
Also fixes mysql_list_processes() returning type 0 / length 0 for all columns when the server sends extended metadata.
Malformed column definitions now always set CR_MALFORMED_PACKET (some returned an error without error code before).