Affects Version/s: 4.5.2
Fix Version/s: 4.6.0
1. Table has more than 2 primary keys;
2. Table's 1st pk as index's last pk; eg. table's pks are (pk1, pk2, pk3), the failed index's pks are (pk2, pk3, pk1); table's pks are (1, 2, 3, 4), failed index's pks are (2, 3, 4, 5, 1);
3. Use row value constructors on index with another condition that use one pks(not the table's 1st pk);
4. You will get "DEGENERATE SCAN OVER TABLE_NAME"
Here is the Test SQL
I've tried 3 primary key, here is the results.
1. table's pks are (pk1, pk2, pk3);
2. 132 means (pk1, pk3, pk2);
|index's pks order||result|
I've also test this on table with 4, 5 pks