Bug 461419 - Kate plugin-sql: Export/Copy of output table fails to retain order
Summary: Kate plugin-sql: Export/Copy of output table fails to retain order
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 22.04.3
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-04 13:28 UTC by Vassilis Virvilis
Modified: 2024-10-21 18:08 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vassilis Virvilis 2022-11-04 13:28:23 UTC
Consider the following simple SQL that generates two rows.

SELECT 1 row, 11 col1, 12 col2, 13 col3 UNION ALL SELECT 2, 21,22, 23;

The output is:

row    col1   col2   col3
--------------------------------
1        11       12       13
2        21       22       23

but when I export or copy I get:

col1   row   col3   col2
--------------------------------
21      2        23      22
11      1       13       12

It has mixed both rows and columns.


My system:
Operating System: Debian GNU/Linux
KDE Plasma Version: 5.26.0
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6
Kernel Version: 6.0.0-2-amd64 (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-3570K CPU @ 3.40GHz
Memory: 31.3 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 4000
Manufacturer: Gigabyte Technology Co., Ltd.
Comment 1 Bug Janitor Service 2024-10-20 19:47:19 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/1627
Comment 2 Christoph Cullmann 2024-10-20 20:23:47 UTC
Git commit aa9207e6242100dcf8d99c74a803cecd1aa668d0 by Christoph Cullmann, on behalf of Waqar Ahmed.
Committed on 20/10/2024 at 20:14.
Pushed by cullmann into branch 'master'.

Fix sql copy/export is randomly ordered

Use a vector instead of a QSet which will have random ordering

M  +16   -16   addons/katesql/dataoutputwidget.cpp

https://invent.kde.org/utilities/kate/-/commit/aa9207e6242100dcf8d99c74a803cecd1aa668d0
Comment 3 Waqar Ahmed 2024-10-21 18:08:37 UTC
Git commit 5adfcc095fa54f0269ac2c2aacd676569858e3db by Waqar Ahmed.
Committed on 21/10/2024 at 18:08.
Pushed by waqar into branch 'release/24.08'.

Fix sql copy/export is randomly ordered

Use a vector instead of a QSet which will have random ordering
(cherry picked from commit aa9207e6242100dcf8d99c74a803cecd1aa668d0)

M  +16   -16   addons/katesql/dataoutputwidget.cpp

https://invent.kde.org/utilities/kate/-/commit/5adfcc095fa54f0269ac2c2aacd676569858e3db