Bug #92226 | Importing data to Excel from MySQL causes data to be misplaced during sorting | ||
---|---|---|---|
Submitted: | 29 Aug 2018 12:01 | Modified: | 23 Sep 2018 17:17 |
Reporter: | Samuel Kekäläinen | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL for Windows: MySQL for Excel | Severity: | S2 (Serious) |
Version: | 1.3.7 | OS: | Windows (Office 365) |
Assigned to: | CPU Architecture: | Any |
[29 Aug 2018 12:01]
Samuel Kekäläinen
[20 Sep 2018 21:29]
Javier Treviño
Hi Samuel, I tried to verify the bug, but in my test I get the correct column order. You can see in the following screenshots the flow I did, which is follow your steps to create the data in Excel, then export it to a MySQL table, after that I verified the data importing through a usual Import Data operation and then through the one you pointed out, right-clicking the table and doing an Import Selected and Related Tables. Both imports reflect the correct column headers order: https://ibb.co/cyoRCK https://ibb.co/cUOMez https://ibb.co/j4gk6e https://ibb.co/eo5Zzz https://ibb.co/fEjSKz So, I need to know more about your setup (Server configuration, Excel version, etc), since I don't get the same results.
[23 Sep 2018 17:17]
Samuel Kekäläinen
Hello Javier, Curious, it seems that whilst for me it automatically sorts the headers, whilst for you, it does not. In either case, I'm using Windows 10 Home 64-bit, Excel 2016 32-bit (Microsoft Office 365 ProPlus subscription). Locale of Windows is English (UK), but I use a Finnish keyboard and formatting. I'm also using a 7th generation i5 processor. As far as server goes, I use my computer as a local server. So, "Local instance MySQL Router". Can't remember whether it was there from the start or whether I had to go through a wizard to create it, but it is most likely not going to be all that far from the standard (possibly changing one or two things depending on recommendations from a tutorial). If you need more detailed information I'm afraid I need more guidance on what exactly and/or how I should get that information, as I simply don't know MySQL well enough to know what information you might be looking for. Regards, Samuel
[23 Sep 2018 21:51]
Nikos Voutsinas
FYI, I can also confirm the same behavior of MySQL for Excel 1.3.7. Initial loading from a worksheet to a MySQL table completed successfully and I was even able to alter the data at the MySQL table via the same excel worksheet (ie the source worksheet). However when at later time, I tried to load the data from the MySQL table using the "Edit" operation, the columns were loaded correctly but the headers of the columns were ordered alphabetically. That was on a Windows 7 32bit machine, using an MS Office 2010 (32bit).
[25 Sep 2018 14:58]
Nikos Voutsinas
I checked this with a colleague, on his laptop using MS Office 2007. We used for the test the same MySQL table on the same MySQL server, which is btw, a MySQL 8.0.12. The weird thing is that there is nothing special on the MySQL server side, besides a different collation (utf8mb4_unicode_ci) than the default.
[8 Oct 2018 6:46]
Nikos Voutsinas
MySQL Workbench Model that was used to reproduce the problem
Attachment: bug92226.mwb (application/vnd.mysql-workbench-model, text), 9.34 KiB.
[8 Oct 2018 6:47]
Nikos Voutsinas
SHOW VARIABLES output
Attachment: bug92226.show_variables.out (application/octet-stream, text), 264.20 KiB.
[8 Oct 2018 6:53]
Nikos Voutsinas
It seems that the guilty part is the utf8mb4_unicode collation. At least one way to reproduce the problem is to complete the use-case shown initially by Samuel, with a specification of a schema having: 'DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci'. That was confirmed on a MySQL 8.0.12 for Linux as provided by Oracle's repo. Please find attached, a)the MySQL Workbench Model that was used to reproduce the problem b)the output of the SHOW VARIABLES from the MySQL server