Skip to content
ClickHouse Docs
ClickHouse DocsClickHouse Docs

mysql_* session settings

These settings are available in system.settings and are autogenerated from source.

mysql_datatypes_support_level

Type
MySQLDataTypesSupport
Default
decimal,datetime64,date2Date32,geometry
Version history
VersionDefault valueComment
26.7decimal,datetime64,date2Date32,geometryMap MySQL's concrete spatial types (LINESTRING, POLYGON, MULTILINESTRING, MULTIPOLYGON, MULTIPOINT) and the generic GEOMETRY type to the corresponding ClickHouse geometric types by default. The generic GEOMETRY column maps to the umbrella Geometry type; reading a value whose subtype has no ClickHouse counterpart (GEOMETRYCOLLECTION) throws at read time.
26.3decimal,datetime64,date2Date32Enable modern MySQL type mappings by default.

Defines how MySQL types are converted to corresponding ClickHouse types. A comma separated list in any combination of decimal, datetime64, date2Date32, date2String or geometry. All modern mappings (decimal, datetime64, date2Date32, geometry) are enabled by default.

  • decimal: convert NUMERIC and DECIMAL types to Decimal when precision allows it.
  • datetime64: convert DATETIME and TIMESTAMP types to DateTime64 instead of DateTime when precision is not 0.
  • date2Date32: convert DATE to Date32 instead of Date. Takes precedence over date2String.
  • date2String: convert DATE to String instead of Date. Overridden by datetime64.
  • geometry: convert MySQL’s spatial types (LINESTRING, POLYGON, MULTILINESTRING, MULTIPOLYGON, MULTIPOINT) to the corresponding ClickHouse geometric types, and the generic GEOMETRY type to the umbrella Geometry type. POINT is always converted to Point regardless of this option. Because a generic GEOMETRY column can hold any subtype, reading a value whose subtype has no ClickHouse counterpart (GEOMETRYCOLLECTION) throws an exception at read time; columns declared as GEOMETRYCOLLECTION map to String. A nullable spatial column other than POINT also maps to Nullable(String), since Point is the only geometric type that can be nested inside Nullable. Every such string is a 4-byte SRID prefix followed by the WKB payload, as returned by MySQL. All of the above applies when the schema is inferred from the column types of a MySQL table; when the source is a query (the query(...) argument of the mysql table function or the MySQL table engine), MySQL reports every spatial result column as the generic GEOMETRY without the concrete subtype, so such columns — including POINT — map to String (Nullable(String) if nullable).

mysql_max_rows_to_insert

Type
UInt64
Default
65536

The maximum number of rows in MySQL batch insertion of the MySQL storage engine

Navigation