summaryrefslogtreecommitdiff
path: root/sql/sql_statistics.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-04-25 16:05:20 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-04-25 16:05:20 +0300
commite6bdf77e4be48750c4808a09af197ed91fd69a61 (patch)
tree2ca921747b9ae7b01835efe9609799b27efb1387 /sql/sql_statistics.cc
parent1599825ffc2c942f8b63274a9556b425229375c7 (diff)
parentacf6f92aa936fbfe7524617ae57d011ab8f1f96d (diff)
downloadmariadb-git-e6bdf77e4be48750c4808a09af197ed91fd69a61.tar.gz
Merge 10.3 into 10.4
In is_eits_usable(), we disable an assertion that fails due to MDEV-19334.
Diffstat (limited to 'sql/sql_statistics.cc')
-rw-r--r--sql/sql_statistics.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc
index 944fa5dc176..e4cc00f45ba 100644
--- a/sql/sql_statistics.cc
+++ b/sql/sql_statistics.cc
@@ -2215,7 +2215,10 @@ inline bool statistics_for_command_is_needed(THD *thd)
{
if (thd->bootstrap || thd->variables.use_stat_tables == NEVER)
return FALSE;
-
+
+ if (thd->force_read_stats)
+ return TRUE;
+
switch(thd->lex->sql_command) {
case SQLCOM_SELECT:
case SQLCOM_INSERT:
@@ -4148,6 +4151,9 @@ bool is_eits_usable(Field *field)
partition list of a table. We assume the selecticivity for
such columns would be handled during partition pruning.
*/
+#if 0 /* Work around MDEV-19334 */
+ DBUG_ASSERT(field->table->stats_is_read);
+#endif
Column_statistics* col_stats= field->read_stats;
return col_stats && !col_stats->no_stat_values_provided() && //(1)
field->type() != MYSQL_TYPE_GEOMETRY && //(2)