Bug #84154 ERROR REFRESHING IMPORTED DATA FROM DIFFERENT SCHEMAS IN SAME CONNECTION
Submitted: 9 Dec 2016 23:40 Modified: 5 May 2017 22:10
Reporter: Javier Treviño Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL for Windows: MySQL for Excel Severity:S2 (Serious)
Version:1.3.6 OS:Any
Assigned to: CPU Architecture:Any

[9 Dec 2016 23:40] Javier Treviño
Description:
When data is imported from MySQL into an Excel worksheet, having the advanced option of "Create an Excel table for the imported MySQL data." checked and the Workbook is saved, the next time the Workbook is opened MySQL for Excel will attempt to refresh the imported data.

If the data that was imported comes from different schemas using the same connection, when the Workbook is opened again the data refresh fails since the connection is established only with the last schema found in the persisted connection information for that single connection.

How to repeat:
1. Open MySQL for Excel.
2. Double-click any connection that you know contains several schemas with tables in them.
3. Select one of the schemas.
4. Select any table with data, and click Import MySQL Data.
5. Click on Advanced Options, make sure the "Create an Excel table for the imported MySQL data." option is checked.
6. Click Import.
7. Repeat steps 3-6 with a different schema.
8. Save the Workbook to any location and close Excel.
9. Open the saved Workbook.
10. Note an error stating "Error copying table data" is shown, with a detail like "Input array is longer than the number of columns in this table."
[10 Dec 2016 1:52] Javier Treviño
Posted by developer:
 
Fixed the way the current schema is assigned to the connection being used to refresh imported data.
Connections for imported data are first checked to see if they are already connected, otherwise a connection is attempted; if successful the current schema is assigned to the connection.
That way we ensure a shared connection for different imported tables switches to the current schema correctly.
[5 May 2017 21:47] Rafael Antonio Bedoy Torres
Posted by developer:
 
Fixed on 1.3.7 build 2
[5 May 2017 22:10] Christine Cole
Posted by developer:
 
Fixed as of the upcoming MySQL for Excel 1.3.7 release, and here's the changelog entry:

A mismatch between the current schema and the current connection caused
the refresh action to fail when a worksheet with imported data was created
as an Excel table, saved, closed, and then reopened.

Thank you for the bug report.