summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2023-02-16 13:34:45 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2023-02-16 13:34:45 +0200
commit2e431ff7e69d9c887777cc597ccf5cfb446e13d8 (patch)
tree98be0df7531bbe1f26e1f339cf18430556bca933 /sql/table.cc
parent80b4fa54e1d38c8f90f6b94240c583aa9d4627b7 (diff)
parent1fd00998390a7487e42f5e29472e99354159c8bc (diff)
downloadmariadb-git-2e431ff7e69d9c887777cc597ccf5cfb446e13d8.tar.gz
Merge 10.11 into 11.0
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc17
1 files changed, 16 insertions, 1 deletions
diff --git a/sql/table.cc b/sql/table.cc
index 3fffb974f0c..e0189401906 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -1101,6 +1101,18 @@ static void mysql57_calculate_null_position(TABLE_SHARE *share,
}
}
+
+Item_func_hash *TABLE_SHARE::make_long_hash_func(THD *thd,
+ MEM_ROOT *mem_root,
+ List<Item> *field_list)
+ const
+{
+ if (old_long_hash_function())
+ return new (mem_root) Item_func_hash_mariadb_100403(thd, *field_list);
+ return new (mem_root) Item_func_hash(thd, *field_list);
+}
+
+
/** Parse TABLE_SHARE::vcol_defs
unpack_vcol_info_from_frm
@@ -1306,7 +1318,10 @@ bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table,
list_item= new (mem_root) Item_field(thd, keypart->field);
field_list->push_back(list_item, mem_root);
}
- Item_func_hash *hash_item= new(mem_root)Item_func_hash(thd, *field_list);
+
+ Item_func_hash *hash_item= table->s->make_long_hash_func(thd, mem_root,
+ field_list);
+
Virtual_column_info *v= new (mem_root) Virtual_column_info();
field->vcol_info= v;
field->vcol_info->expr= hash_item;