Bug #80880 Tinyint incorrectly mapped to boolean
Submitted: 29 Mar 2016 11:08 Modified: 4 May 2017 23:48
Reporter: Paul Lautman Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL for Windows: MySQL for Excel Severity:S3 (Non-critical)
Version:1.3.6 OS:Windows
Assigned to: CPU Architecture:Any

[29 Mar 2016 11:08] Paul Lautman
Description:
When importing data into Excel, values in a Tinyint field are being mapped to boolean. So the maping is:
0->0
1->1
2->1
3->1
and so on.

How to repeat:
Import data from a table with a tinyint field with a value greater than 1. It will (incorrectly) end up with a value of 1 in the Excel sheet.

Suggested fix:
Map the values correctly.
[30 Mar 2016 7:11] Chiranjeevi Battula
Hello Paul Lautman,

Thank you for the bug report.
I tried to reproduce the issue at my end using MS Excel 2013,  MySQL for Excel 1.3.6 but not seeing any issues to importing data from a table with a Tinyint field.
Could you please provide repeatable test case (sample excel data etc. - please make it as private if you prefer) to confirm this issue at our end?

Thanks,
Chiranjeevi.
[30 Mar 2016 7:12] Chiranjeevi Battula
Screenshot.

Attachment: 80880.JPG (image/jpeg, text), 196.01 KiB.

[30 Mar 2016 8:45] Paul Lautman
I have found that the problem occurs when the field is specified as tinyint(1).
[30 Mar 2016 9:07] Chiranjeevi Battula
Hello Paul Lautman,

Thank you for your feedback.
Verified this behavior on MS Excel 2013, MySQL for Excel 1.3.6.

Thanks,
Chiranjeevi
[30 Mar 2016 9:07] Chiranjeevi Battula
Screenshot.

Attachment: 80880_1.JPG (image/jpeg, text), 190.44 KiB.

[29 Nov 2016 23:30] Javier Treviño
Posted by developer:
 
Fixed the way tinyint(1), bit and bit(1) values are treated by MySQL for Excel.
Before values mapped to columns of those aforementioned data types were assumed to be boolean values and always converted to true and false representation (1 and 0 values in Excel).
Now tinyint(1) is treated as a type that can be either boolean or numeric for Export and Edit Data operations (since BOOL/BOOLEAN are actually synonyms of TINYINT(1), but not viceversa).
For Import Data operations, connections are now using the TreatTinyAsBoolean=false in the connection string for all connections opened by MySQL for Excel.
[6 Feb 2017 22:38] Ovette Abejuela
Is this supposed to be fixed already, because I guess not. I still am getting this error with this version (mysql-installer-web-community-5.7.17.0.msi).
[6 Feb 2017 23:15] Javier Treviño
It is fixed in 1.3.7, it has not been released yet.
You tested with 1.3.6 most probably.
[7 Feb 2017 14:00] Ovette Abejuela
You're right what I have is 1.3.6. Hoping to see the new version come out soon.
[3 May 2017 20:06] Rafael Antonio Bedoy Torres
Posted by developer:
 
Fixed on 1.3.7 build 2
[4 May 2017 23:48] Christine Cole
Posted by developer:
 
Fixed as of the upcoming MySQL for Excel 1.3.7 release, and here's the changelog entry:

Type TinyInt was mapped as type Bool when data was imported to Excel from
MySQL.

Thank you for the bug report.