[Commits] Rev 3256: Fix set_limit to be uniform with all calls. in file:///home/bell/maria/bzr/work-maria-5.5-limit/

sanja at montyprogram.com sanja at montyprogram.com
Tue Jan 31 14:51:28 EET 2012


At file:///home/bell/maria/bzr/work-maria-5.5-limit/

------------------------------------------------------------
revno: 3256
revision-id: sanja at montyprogram.com-20120131125126-hdv6wy5zq54exh2d
parent: knielsen at knielsen-hq.org-20120131075759-wy9ryk9ad204ydwd
committer: sanja at montyprogram.com
branch nick: work-maria-5.5-limit
timestamp: Tue 2012-01-31 14:51:26 +0200
message:
  Fix set_limit to be uniform with all calls.
-------------- next part --------------
=== modified file 'sql/sql_derived.cc'
--- a/sql/sql_derived.cc	2012-01-18 07:42:49 +0000
+++ b/sql/sql_derived.cc	2012-01-31 12:51:26 +0000
@@ -750,7 +750,7 @@ bool mysql_derived_optimize(THD *thd, LE
     if (!derived->is_merged_derived())
     {
       JOIN *join= first_select->join;
-      unit->set_limit(first_select);
+      unit->set_limit(unit->global_parameters);
       unit->optimized= TRUE;
       if ((res= join->optimize()))
         goto err;
@@ -865,7 +865,7 @@ bool mysql_derived_fill(THD *thd, LEX *l
   }
   else
   {
-    unit->set_limit(first_select);
+    unit->set_limit(unit->global_parameters);
     if (unit->select_limit_cnt == HA_POS_ERROR)
       first_select->options&= ~OPTION_FOUND_ROWS;
 



More information about the commits mailing list