set SESSION sql_mode = 'ANSI'
MySQL translator (mysql)
Also see common JDBC translators information.
You can use the following translators with MySQL and MariaDB:
- mysql
-
The MySQL translator, known by the type name mysql, is for use with MySQL version 4.x or later. The translator also works with other compatible MySQL derivatives, such as MariaDB.
- mysql5
-
The legacy MySQL5 translator, known by the type name mysql5, was for use with MySQL version 5 or later. It has been incorporated into the mysql translator.
The MySQL translators expect the database or session to be using ANSI mode. If the database is not using ANSI mode, you can set ANSI mode on the pool by submitting the following initialization query:
When data includes null timestamp values, Teiid generates the following conversion error:
0000-00-00 00:00:00 cannot be converted to a timestamp
.
To avoid error, if you expect data with null timestamp values, set the connection property zeroDateTimeBehavior=convertToNull
.
Warning
|
If you must retrieve large result sets, consider setting the connection property useCursorFetch=true . Otherwise MySQL will fully fetch
result sets into memory on the Teiid instance.
|
Note
|
MySQL reports TINYINT(1) columns as a JDBC BIT type - however the value range is not actually restricted and may cause issues if for example you are relying on -1 being recognized as a true value. If not using the native importer, change the BOOLEAN columns in the affected source to have a native type of "TINYINT(1)" rather than BIT so that the translator can appropriately handle the Boolean conversion. |