• unknown's avatar
    Bug #33061: ORDER BY DESC becomes ASC in NDB partition pruning to one partition · b72255e8
    unknown authored
    When partition pruning resulted in an ordered index scan spanning only
    one partition, any descending flag for the scan was wrongly discarded,
    turning ORDER BY DESC into ORDER BY ASC, and similar problems.
    
    Fixed by correctly passing descending flag in SCAN_TABREQ signal sent
    to data nodes.
    
    
    mysql-test/suite/ndb/r/ndb_partition_key.result:
      Test case.
    mysql-test/suite/ndb/r/ndb_partition_range.result:
      Test case.
    mysql-test/suite/ndb/t/ndb_partition_key.test:
      Test case.
    mysql-test/suite/ndb/t/ndb_partition_range.test:
      Test case.
    storage/ndb/src/ndbapi/NdbScanOperation.cpp:
      Even if ordered scan not requested (no need to merge-sorts scans of
      each partition), we still need to honor the descending flag.
    b72255e8
ndb_partition_range.test 6.28 KB