-
1. Re: MySQL TinyInt
shawkins Jan 9, 2019 12:14 PM (in response to mtawk)> When fetching the corresponding table, we are getting a Byte value as result.
For Teiid a signed tinyint is the same as a byte value.
> It uses to return an integer value in Teiid 9
That seems surprising. The driver should be returning a sql type code of -6 or TINYINT. Which should map to byte, unless it's unsigned in which case it would map to short.
> We noticed that the modification is done in TEIID-4693
> Is there a way to control the return value type of mysql Tinyint? Because it is not all the time a boolean value
I don't see how that applies as that code is specifically looking for tinyint(1), which mysql does treat as a boolean. You have tinyint(4) in this case.
-
2. Re: MySQL TinyInt
mtawk Jan 10, 2019 5:08 AM (in response to shawkins)I changed the data type in MySQL to unsigned tinyint(4) and it worked in Teiid 10
I reconfirm that this issue was not present in Teiid 9, I tried to fetch the same column and it returned an integer value
-
3. Re: MySQL TinyInt
shawkins Jan 10, 2019 8:25 AM (in response to mtawk)> I changed the data type in MySQL to unsigned tinyint(4) and it worked in Teiid 10
It maps to a short correct? As widen unsigned types is on by default.
> I reconfirm that this issue was not present in Teiid 9, I tried to fetch the same column and it returned an integer value
The import type is primarily determined by the type code reported by the source driver. As far as I can see the type determination logic above that should be the same across those Teiid versions. Perhaps a different driver version is in use?