From e03e72234aa59016c71c51b7adc5a59ae7b126b2 Mon Sep 17 00:00:00 2001
From: Michael Widenius <monty@mariadb.org>
Date: Sun, 15 May 2022 17:59:43 +0300
Subject: [PATCH] Fixed warning from UBSAN

The warning comes from copying POSITION objects where 'type' is not
initialized.  This does not affect any production code as when 'type'
was compared/used, it was always initialized.

Removed by initializing the type variable in the constructor
---
 sql/sql_select.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 5f4881b2f54..673ce8b1573 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -391,6 +391,7 @@ POSITION::POSITION()
   range_rowid_filter_info= 0;
   ref_depend_map= dups_producing_tables= 0;
   inner_tables_handled_with_other_sjs= 0;
+  type= JT_UNKNOWN;
   dups_weedout_picker.set_empty();
   firstmatch_picker.set_empty();
   loosescan_picker.set_empty();
-- 
2.30.9