Hello,

We're hitting the problem in MDEV-9504 (https://jira.mariadb.org/browse/MDEV-9504).  I see from the commit at https://github.com/MariaDB/server/commit/07b8aefe90ca830d2de068f2966cd2288b158a88 that this change was backed out due to test failures.  I ran through all the mysql-tests with and without the change and haven't been able to pinpoint a difference though.

The reverting commit indicates the correct value for select_limit is only computed when the query plan changes.  Any chance someone could provide more detail on what needs to be changed to avoid regression with this fix?  If there are sample queries that regress with only the original MDEV-9504 changes, that would be helpful.

Thanks in advance!
Jase