Known issues with MariaDB
  • As of MariaDB 10.2 the DATETIME data type supports sub-second fractions. The default of MariaDB internally is to use no fractions. The number of fractions can be explicitly set via scale: @Column(scale=6) will lead to a DATETIME(6) column and able to store microseconds. A value of @Column(scale=-1) will explicitly turn off all fractions.

  • As of MariaDB 10.7 the UUID data type is supported, but the JDBC driver does not writes the object directly, so UUID field support is made through UUID to String conversion.

  • MariaDB’s InnoDB performs ALTER TABLE …​ ADD COLUMN and ALTER TABLE …​ DROP COLUMN instantly and keeps the dropped columns in the clustered index record format, where they continue to count towards the 8126 byte maximum row size. Re-synchronising a mapping with a drop/add schema action against the same table - either openjpa.jdbc.SynchronizeMappings set to buildSchema(SchemaAction='drop,add'), or mappingtool -action refresh in a deployment script - therefore accumulates that metadata on every cycle and eventually fails with

Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. [code=1118, state=42000]

even though the table’s visible columns fit well inside the limit; information_schema gives no indication of the accumulated metadata. Rebuild the table to discard it (ALTER TABLE <name> FORCE or OPTIMIZE TABLE <name>), or do not use a drop/add schema action against a long-lived MariaDB schema.