[Phpmyadmin-devel] Help in resolving bug #4154

Marc Delisle marc at infomarc.info
Sat Dec 7 14:09:47 CET 2013


Le 2013-12-07 07:49, Lakshit Arora a écrit :
> Hello all, I am trying to fix the bug 
> https://sourceforge.net/p/phpmyadmin/bugs/4154/ . I have few 
> observations regarding this: if you do
> 
> SELECT * FROM `sortunion1` UNION SELECT * FROM `sortunion2`
> 
> what I think is that when you are trying to query the above one it
> transforms it into query as follows
> 
> 
> |SELECT * FROM `sortunion1` UNION SELECT * FROM `sortunion2`  ORDER
> BY `sortunion2`.`id` DESC LIMIT 0, 25|
> 
> but instead if it transforms the same query as
> 
> |SELECT * FROM `sortunion1` UNION (SELECT * FROM `sortunion2`  ORDER
> BY `sortunion2`.`id` DESC ) LIMIT 0, 25|
> 
> Then there won't be any issue.
> 
> Please tell me whether my understanding is correct or not. If
> yes,then I would like to take up the bug, else please suggest if
> there is any mistake in my approach.

Hi Lakshit,
a better solution is to avoid adding the ORDER BY clause, since the user
did not ask for it.

-- 
Marc Delisle
http://infomarc.info | http://phpmyadmin.net




More information about the Developers mailing list