From 790f1202edf508f87cdfd9ceec2773a12af5d713 Mon Sep 17 00:00:00 2001
From: Kevin Cristiano <kcristiano@kcristiano.com>
Date: Tue, 24 Aug 2021 09:06:00 -0400
Subject: [PATCH]  dev/core#2784 Export PRIMARY fields Fails on CiviCRM 5.40.2
 and MariaDB 10.3 with row size issue

PR 21239
---
 civicrm/CRM/Export/BAO/ExportProcessor.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/civicrm/CRM/Export/BAO/ExportProcessor.php b/civicrm/CRM/Export/BAO/ExportProcessor.php
index f134e0eaff..06909bff33 100644
--- a/civicrm/CRM/Export/BAO/ExportProcessor.php
+++ b/civicrm/CRM/Export/BAO/ExportProcessor.php
@@ -1469,7 +1469,7 @@ class CRM_Export_BAO_ExportProcessor {
             // @see https://lab.civicrm.org/dev/core/-/issues/2645
             switch ($fieldName) {
               case 'preferred_mail_format':
-                return "`$fieldName` varchar(16)";
+                return "`$fieldName` text(16)";
 
               default:
                 return "`$fieldName` varchar({$fieldSpec['maxlength']})";
-- 
GitLab