diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2021-03-17 16:51:56 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2021-03-17 18:05:19 +0300 |
commit | 2470fe984c9d9eca5e65be1617ab27ce9fb29340 (patch) | |
tree | 23e6b7f69f8292bfbfcee89155618495a756280d /mysql-test | |
parent | f6cb9e6e2dd0fb2e29a09030e74de7946139e1f4 (diff) | |
download | mariadb-git-bb-10.5-mdev25069.tar.gz |
MDEV-25069: Assertion `root->weight >= ...' failed in SEL_ARG::tree_delete #2bb-10.5-mdev25069
Note they key_or() may call tree_delete(), which will cause the weight
asserts to be checked. In order to avoid them from firing, update key1
tree's weight after we've changed key1->some_local_child->next_key_part.
Having done that, do we still need this at the function end:
/* Re-compute the result tree's weight. */
key1->update_weight_locally();
?
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/main/range_notembedded.result | 9 | ||||
-rw-r--r-- | mysql-test/main/range_notembedded.test | 10 |
2 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/main/range_notembedded.result b/mysql-test/main/range_notembedded.result index 0ecf47c892e..eeab230e72f 100644 --- a/mysql-test/main/range_notembedded.result +++ b/mysql-test/main/range_notembedded.result @@ -239,3 +239,12 @@ insert into t1 values (1,1,1,1), (2,2,2,2), (3,3,3,3); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range PRIMARY PRIMARY 2 NULL 3 Using where drop table t1; +# +# MDEV-25069: Assertion `root->weight >= ...' failed in SEL_ARG::tree_delete #2 +# +SELECT * +FROM mysql.help_relation +WHERE +(help_topic_id < '2' OR help_topic_id != 8 OR help_topic_id < 1) AND +help_keyword_id = help_topic_id; +help_topic_id help_keyword_id diff --git a/mysql-test/main/range_notembedded.test b/mysql-test/main/range_notembedded.test index 5f6a05e8d91..4e77d6a4810 100644 --- a/mysql-test/main/range_notembedded.test +++ b/mysql-test/main/range_notembedded.test @@ -140,3 +140,13 @@ WHERE --enable_query_log drop table t1; + +--echo # +--echo # MDEV-25069: Assertion `root->weight >= ...' failed in SEL_ARG::tree_delete #2 +--echo # + +SELECT * +FROM mysql.help_relation +WHERE + (help_topic_id < '2' OR help_topic_id != 8 OR help_topic_id < 1) AND + help_keyword_id = help_topic_id; |