mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Fixed bug #20519.
The bug was due to a loss happened during a refactoring made on May 30 2005 that modified the function JOIN::reinit. As a result of it for any subquery the value of offset_limit_cnt was not restored for the following executions. Yet the first execution of the subquery made it equal to 0. The fix restores this value in the function JOIN::reinit. mysql-test/r/subselect.result: Added a test case fir bug #20519. mysql-test/t/subselect.test: Added a test case fir bug #20519.
This commit is contained in:
@@ -1209,6 +1209,11 @@ int
|
||||
JOIN::reinit()
|
||||
{
|
||||
DBUG_ENTER("JOIN::reinit");
|
||||
|
||||
unit->offset_limit_cnt= (ha_rows)(select_lex->offset_limit ?
|
||||
select_lex->offset_limit->val_uint() :
|
||||
ULL(0));
|
||||
|
||||
first_record= 0;
|
||||
|
||||
if (exec_tmp_table1)
|
||||
|
Reference in New Issue
Block a user