Matt Stancliff 87815ab5ba Fix key extraction for SORT
We only want to use the last STORE key, but we have to record
we actually found a STORE key so we can increment the final return
key count.

Test added to prevent further regression.

Closes #1883, #1645, #1647
2014-08-07 16:14:15 +02:00
..
2014-08-07 12:40:44 +02:00
2014-02-27 15:27:05 +01:00
2012-04-18 11:34:18 +02:00
2014-07-18 12:03:31 +02:00
2010-10-15 12:54:53 +02:00
2013-11-05 15:19:44 +01:00
2014-08-07 16:14:15 +02:00