1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

MDEV-13911 Support ORDER BY and LIMIT in multi-table update

This commit is contained in:
Sergei Golubchik
2017-09-26 10:28:00 +02:00
parent b6a5be9eaa
commit 26ff92f7ac
5 changed files with 51 additions and 15 deletions

View File

@ -1988,7 +1988,8 @@ int JOIN::optimize_stage2()
FORCE INDEX FOR ORDER BY can be used to prevent join buffering when
sorting on the first table.
*/
if (!stable || !stable->force_index_order)
if (!stable || (!stable->force_index_order &&
!map2table[stable->tablenr]->keep_current_rowid))
{
if (group_list)
simple_group= 0;