[PUSHED:3-5] graphical query editor mangles sorting order

Petr Mladek pmladek at suse.cz
Tue Mar 20 04:43:48 PDT 2012


Lionel Elie Mamane píše v Út 20. 03. 2012 v 11:30 +0100:
> Attached patch fixes (old! at least back to 3.3) bugs exposed by
> fixing fdo#46843, about sort orders in the graphical query editor:
> 
> fdo#47370: when sort columns order does not match result columns
>            order, sort is reordered to result order
> 
> 	   E.g. "SELECT a, b, c FROM foo ORDER BY c, a"
>            becomes "SELECT a, b, c FROM foo ORDER BY a, c"
> 
> fdo#47560: when several sort columns are "out of result order", all
>            are set to the last
> 
> 	   E.g. "SELECT a, b, c FROM foo ORDER BY c, a, b"
> 	   becomes "SELECT a, b, c FROM foo ORDER BY c, b, b"
> 
> 	   That is simply because those "additional" sort columns were
> 	   set in the *same* in-memory structure. Fix: allocate a
> 	   fresh structure for each new sort column.

Great catch! Both fixes make sense and work like a charm. I have pushed
them into 3-5 branch. They will be in 3.5.2.

Best Regards,
Petr



More information about the LibreOffice mailing list