← Back to team overview

maria-discuss team mailing list archive

Re: MariaDB 10.4: subtle change of result ordering

 


Am 21.08.20 um 17:44 schrieb Rodrigo Severo:
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Friday, August 21, 2020 12:18 PM, Reindl Harald <h.reindl@xxxxxxxxxxxxx> wrote:
> 
>> MyISAM:
>>
>> in all previous versions this test was stable, so as the timestamps are
>> identical and ordering is 'desc' the result was ordered by the creation
>> time of the the records
>>
>> now it's reverse which can break all sort of expectations in subtle ways
>>
>> while we could discuss what is the expected output when order by
>> 'ktimestamp' and all are identical it still worries me that something
>> which didn't change over years and major versions now comes with the
>> reverse ordering
>>
>> unless someone tells me that's the result of some real peformance
>> optimization i would perfer the known result given that it's hard to
>> know how much other code depends implicit on the previous behavior
> 
> 
> I would say that the actual ordering of the records below obtained by the select command shown is undefined. I can very well change for whatever subtle change in code.
> 
> AFAIU, if you need repeatable results, you need to write a select command with a deterministic result.
> 
> If this test has been presenting repeatable results for a long time, that's just chance.
> 
> But that's just the opinion of a MariaDB user. I'm no developer. I would like to know the opinion of the developers.

without explicit ordering the behavior of MyISAM is that you get results
in der ordering the are created and so 'desc' can be and was deterministic

you can even "later table" with ordering MyISAM tables so that the
records are phyisally stored in the ordering they are typically fetched
for the workload


References