summaryrefslogtreecommitdiff
path: root/sql/sql_statistics.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-09-23 10:25:34 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-09-23 10:25:34 +0300
commitc016ea660ede8b7ff75f8ca65f73e2958262263a (patch)
treec8bc8579c738792f0769ea70f49348dc1baf51b3 /sql/sql_statistics.cc
parent1bbe8c5e0f6823acd4780d7563e8c02f8b4c5a01 (diff)
parent2931fd2917cc130e34e5f3d9d6c571a2b013e49c (diff)
downloadmariadb-git-c016ea660ede8b7ff75f8ca65f73e2958262263a.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'sql/sql_statistics.cc')
-rw-r--r--sql/sql_statistics.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc
index 5e0275fa65d..59ae111f716 100644
--- a/sql/sql_statistics.cc
+++ b/sql/sql_statistics.cc
@@ -1,4 +1,5 @@
/* Copyright (C) 2009 MySQL AB
+ Copyright (c) 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -1154,12 +1155,18 @@ public:
case COLUMN_STAT_MIN_VALUE:
table_field->read_stats->min_value->set_notnull();
stat_field->val_str(&val);
+#if 0 /* MDEV-20589 FIXME: This fails! */
+ DBUG_ASSERT(table_field->read_stats->min_value->is_stat_field);
+#endif
table_field->read_stats->min_value->store(val.ptr(), val.length(),
&my_charset_bin);
break;
case COLUMN_STAT_MAX_VALUE:
table_field->read_stats->max_value->set_notnull();
stat_field->val_str(&val);
+#if 0 /* MDEV-20589 FIXME: This fails! */
+ DBUG_ASSERT(table_field->read_stats->min_value->is_stat_field);
+#endif
table_field->read_stats->max_value->store(val.ptr(), val.length(),
&my_charset_bin);
break;
@@ -2043,7 +2050,7 @@ void create_min_max_statistical_fields_for_table_share(THD *thd,
Field *fld;
Field *table_field= *field_ptr;
my_ptrdiff_t diff= record - table_share->default_values;
- if (!(fld= table_field->clone(&stats_cb->mem_root, diff)))
+ if (!(fld= table_field->clone(&stats_cb->mem_root, NULL, diff)))
continue;
if (i == 0)
table_field->read_stats->min_value= fld;