Skip to content

Fix decoding of binary text from MariaDB

Neil Shah-Quinn (WMF) requested to merge mariadb_bytes into master

Created by: nshahquinn

My previous approach resulted in all fields (including numeric ones) being returned as strings, because MySQL Connector Python internally handles all fields as bytearrays. This patch instead looks up the actual data type of the field and calls the decode function only if it's actually a string field. This code doesn't convert blob fields, but it barely matters because I believe MediaWiki doesn't use them at all.

Merge request reports