summaryrefslogtreecommitdiff
path: root/storage/myisam
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2022-01-03 17:45:54 +0100
committerSergei Golubchik <serg@mariadb.org>2022-01-26 18:43:06 +0100
commitd7e7f48eb4c4913311e4d4de4d28e01dd422c3fd (patch)
tree5b8492c58099f9f90136f8ce49b074b292739dc2 /storage/myisam
parent58195449eebd98a0e1697d90469c4b0a1538d0b2 (diff)
downloadmariadb-git-d7e7f48eb4c4913311e4d4de4d28e01dd422c3fd.tar.gz
MDEV-27407 Different ASC/DESC index attributes on MERGE and underlying table can cause wrong results
detect if merge children are "differently defined" regarding ASC/DESC
Diffstat (limited to 'storage/myisam')
-rw-r--r--storage/myisam/ha_myisam.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc
index 2a49971f6db..7fc42ac8aa4 100644
--- a/storage/myisam/ha_myisam.cc
+++ b/storage/myisam/ha_myisam.cc
@@ -554,7 +554,8 @@ int check_definition(MI_KEYDEF *t1_keyinfo, MI_COLUMNDEF *t1_recinfo,
t1_keysegs_j__type != t2_keysegs[j].type ||
t1_keysegs[j].null_bit != t2_keysegs[j].null_bit ||
t1_keysegs[j].length != t2_keysegs[j].length ||
- t1_keysegs[j].start != t2_keysegs[j].start)
+ t1_keysegs[j].start != t2_keysegs[j].start ||
+ (t1_keysegs[j].flag ^ t2_keysegs[j].flag) & HA_REVERSE_SORT)
{
DBUG_PRINT("error", ("Key segment %d (key %d) has different "
"definition", j, i));