Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-7722

Multiple-Column Index using Column Prefix Key Parts fails with Index Condition Pushdown in MyRocks

Details

    • Bug
    • Status: Done
    • Medium
    • Resolution: Fixed
    • Not 5.7.x, 8.0.23-14 (Q1 2021)
    • 8.0.25-15 (Q2 2021)
    • MyRocks
    • None

    Description

      How to Repeat

      1. Load attached dump

      2. Run queries:

      mysql> select f1,  f8, f2, f3 from t1 where f2 >='0001-01-01T00:00:00' and f3 in ('scheduled') and f2 <'2021-05-19T15:04:43.270583849' and f1 = '63bab075-1f5c-4899-b5c8-a1bbf7833aea';
      +--------------------------------------+------------------+----------------------------+-----------+
      | f1                                   | f8               | f2                         | f3        |
      +--------------------------------------+------------------+----------------------------+-----------+
      | 63bab075-1f5c-4899-b5c8-a1bbf7833aea | 4�Ϯ^�C�����e��           | 2021-05-19 20:00:00.000000 | scheduled |
      +--------------------------------------+------------------+----------------------------+-----------+
      1 row in set (0.00 sec)
      
      mysql> select * from t1 where f2 >='0001-01-01T00:00:00' and f3 in ('scheduled') and f2 <'2021-05-19T15:04:43.270583849' and f1 = '63bab075-1f5c-4899-b5c8-a1bbf7833aea';              
      Empty set (0.00 sec)
      

      3. Notice that exact same WHERE condition produces different results depending if you requested just a few columns or everything.

      Suggested fix

      Return rows no matter if a user asks for everything or just for a few columns.

      Attachments

        Activity

          People

            przemyslaw.skibinski Przemyslaw Skibinski
            sveta.smirnova Sveta Smirnova
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 1 day, 6 hours, 20 minutes
                1d 6h 20m

                Smart Checklist