MySQL Compatibility Notes
VeloDB Cloud accepts MySQL-protocol connections and supports common SQL query syntax. It is an analytics database, so MySQL applications can encounter differences in data types, table definitions, transactions, and data modification. Check the statements and functions your application uses before migrating.
This document organizes the main differences between VeloDB Cloud and MySQL from two perspectives, migration and daily use, to help you quickly locate syntax or behavior incompatibilities.
Intended readers and scenarios
- You plan to migrate a MySQL application or data warehouse to VeloDB Cloud and need to quickly assess SQL compatibility.
- You run into syntax or behavior differences when writing SQL on VeloDB Cloud with MySQL habits.
- You need to check whether a specific data type or DDL/DML statement is supported in VeloDB Cloud.
Data type differences
The differences from MySQL are listed below, grouped by numeric, date, string, JSON, and VeloDB Cloud-specific types.
Numeric types
| Type | MySQL | VeloDB Cloud |
|---|---|---|
BOOLEAN | - Supported - Range: 0 stands for false, 1 stands for true | - Supported - Keyword: BOOLEAN- Range: 0 stands for false, 1 stands for true |
BIT | - Supported - Width: 1 to 64 bits | Not supported |
TINYINT | - Supported - Supports signed and unsigned - Range: signed is -128 to 127, unsigned is 0 to 255 | - Supported - Only signed is supported - Range: -128 to 127 |
SMALLINT | - Supported - Supports signed and unsigned - Range: signed is -2^15 to 2^15-1, unsigned is 0 to 2^16-1 | - Supported - Only signed is supported - Range: -32768 to 32767 |
MEDIUMINT | - Supported - Supports signed and unsigned - Range: signed is -2^23 to 2^23-1, unsigned is 0 to 2^24-1 | Not supported |
INT | - Supported - Supports signed and unsigned - Range: signed is -2^31 to 2^31-1, unsigned is 0 to 2^32-1 | - Supported - Only signed is supported - Range: -2147483648 to 2147483647 |
BIGINT | - Supported - Supports signed and unsigned - Range: signed is -2^63 to 2^63-1, unsigned is 0 to 2^64-1 | - Supported - Only signed is supported - Range: -2^63 to 2^63-1 |
LARGEINT | Not supported | - Supported - Only signed is supported - Range: -2^127 to 2^127-1 |
DECIMAL | - Supported - Supports signed and unsigned (supported before 8.0.17, marked as deprecated in later versions) - Default: DECIMAL(10, 0) | - Supported - Only signed is supported - With default decimal conversion enabled in Core 26.1.3: DECIMAL(38, 9)- Specify DECIMAL(P, S) explicitly when migrating |
FLOAT / DOUBLE | - Supported - Supports signed and unsigned (supported before 8.0.17, marked as deprecated in later versions) | - Supported - Only signed is supported |
Date types
| Type | MySQL | VeloDB Cloud |
|---|---|---|
DATE | - Supported - Range: ['1000-01-01', '9999-12-31'] - Format: YYYY-MM-DD | - Supported - Range: ['0000-01-01', '9999-12-31'] - Format: YYYY-MM-DD |
DATETIME | - Supported - DATETIME([P]), where the optional parameter P is the precision- Range: '1000-01-01 00:00:00.000000' to '9999-12-31 23:59:59.999999' - Format: YYYY-MM-DD hh:mm:ss[.fraction] | - Supported - DATETIME([P]), where the optional parameter P is the precision- Range: ['0000-01-01 00:00:00[.000000]', '9999-12-31 23:59:59[.999999]'] - Format: YYYY-MM-DD hh:mm:ss[.fraction] |
TIMESTAMP | - Supported - TIMESTAMP[(p)], where the optional parameter P is the precision- Range: ['1970-01-01 00:00:01.000000' UTC, '2038-01-19 03:14:07.999999' UTC] - Format: YYYY-MM-DD hh:mm:ss[.fraction] | - Supported - TIMESTAMPTZ([P]), where the optional parameter P is the precision- Range: ['0000-01-01 00:00:00[.000000]' UTC, '9999-12-31 23:59:59[.999999]' UTC] - Format: YYYY-MM-DD hh:mm:ss[.fraction]+XX.XX |
TIME | - Supported - TIME[(p)]- Range: ['-838:59:59.000000', '838:59:59.000000'] - Format: hh:mm:ss[.fraction] | - Supported for computation, cannot be stored as a column in OLAP tables - TIME[(p)]- Range: ['-838:59:59.999999', '838:59:59.999999'] - Format: hh:mm:ss[.fraction] |
YEAR | - Supported - Range: 1901 to 2155, or 0000 - Format: yyyy | Not supported |
String types
| Type | MySQL | VeloDB Cloud |
|---|---|---|
CHAR | - Supported - CHAR(M), where M is the character length, defaults to 1- Fixed length - Range: [0, 255] characters | - Supported - CHAR(M), where M is the byte length- Fixed length - Range: [1, 255] bytes |
VARCHAR | - Supported - VARCHAR(M), where M is the character length- Range: [0, 65535], in bytes | - Supported - VARCHAR(M), where M is the byte length- Range: [1, 65533] |
STRING | Not supported | - Supported - Core 26.1.3 compiled default soft limit: 10485760 bytes (10 MiB) - Maximum: 2147483643 bytes (approximately 2 GiB) |
BINARY | - Supported - Similar to CHAR | Not supported |
VARBINARY | - Supported - Similar to VARCHAR | Supported in expressions and applicable external catalog mappings. Native table creation does not support VARBINARY columns. |
BLOB | - Supported - TINYBLOB, BLOB, MEDIUMBLOB, LONGBLOB | Not supported |
TEXT | - Supported - TINYTEXT, TEXT, MEDIUMTEXT, LONGTEXT | TEXT is accepted as an alias for STRING. The MySQL text-family sizes are not separate native types. |
ENUM | - Supported - Up to 65535 elements | Not supported |
SET | - Supported - Up to 64 elements | Not supported |
JSON data type
| Type | MySQL | VeloDB Cloud |
|---|---|---|
JSON | Supported | Supported |
The string soft limit is managed by the service, and an effective warehouse setting can differ from the compiled default above. Contact VeloDB Cloud support if a required string value exceeds the accepted limit. TIMESTAMPTZ is the VeloDB Cloud type shown alongside MySQL TIMESTAMP. Check type names and time-zone behavior explicitly during migration.
Additional analytics data types
VeloDB Cloud provides the following additional types for analytics. They are commonly used for distinct counting, quantile computation, and semi-structured scenarios.
-
HyperLogLog
The
HLLtype cannot be used as a key column. When used in an Aggregate model table, the matching aggregation type at table creation isHLL_UNION. You do not need to specify length or default value; the length is controlled internally by the system based on the aggregation level of the data.HLLcolumns can only be queried or used through the matchingHLL_UNION_AGG,HLL_RAW_AGG,HLL_CARDINALITY, andHLL_HASHfunctions.HLLestimates distinct counts with a compact sketch. Use it when approximate results are acceptable, and measure accuracy and performance for your workload. -
BITMAPThe
BITMAPtype cannot be used as a key column. When used in an Aggregate table, it must be paired with theBITMAP_UNIONaggregation definition. You do not need to specify length or default value; the length is controlled internally by the system based on the aggregation level of the data.BITMAPcolumns can only be queried or used through the matchingBITMAP_UNION_COUNT,BITMAP_UNION,BITMAP_HASH,BITMAP_HASH64, and other functions.A bitmap counts distinct integer identifiers exactly. Hashing other values with
BITMAP_HASH()can cause collisions and undercount distinct values.BITMAP_HASH64()reduces collision risk, but does not eliminate it. Use a collision-free identifier mapping when exact counts are required. -
QUANTILE_STATEThe
QUANTILE_STATEtype cannot be used as a key column. When used in an Aggregate model table, the matching aggregation type at table creation isQUANTILE_UNION. You do not need to specify length or default value; the length is controlled internally by the system based on the aggregation level of the data.QUANTILE_STATEcolumns can only be queried or used through the matchingQUANTILE_PERCENT,QUANTILE_UNION,TO_QUANTILE_STATE, and other functions.QUANTILE_STATEis a type for computing approximate quantiles. During import, it pre-aggregates different values for the same key: when the number of values does not exceed 2048, all data is recorded in detail; when the number of values exceeds 2048, the TDigest algorithm is used to aggregate (cluster) the data and store the centroids of the clusters. -
ARRAY<T>ARRAY<T>is an array of elements of typeTand cannot be used as a key column. -
MAP<K, V>MAP<K, V>maps keys of typeKto values of typeVand cannot be used as a key column. -
STRUCT<field_name:field_type, ...>Struct is a structure composed of multiple fields, which can also be understood as a collection of multiple columns. It cannot be used as a key column.
The field names and count in a
STRUCTare fixed. Its fields are nullable. A field typically consists of:field_name: the identifier of the field, which must be uniquefield_type: the type of the field
-
AGG_STATEAGG_STATEcannot be used as a key column. When creating a table, you must also declare the signature of the aggregate function.You do not need to specify length or default value; the actual storage size depends on the function implementation.
AGG_STATEcan only be used together with the STATE / MERGE / UNION function combinators.
Syntax differences
VeloDB Cloud SQL syntax is overall close to MySQL, but it has some unique extensions or restrictions in scenarios such as table creation, indexes, and views. Pay particular attention to these during migration.
DDL differences
CREATE TABLE
The VeloDB Cloud table creation syntax is as follows:
CREATE TABLE [IF NOT EXISTS] [database.]table
(
column_definition_list
[, index_definition_list]
)
[engine_type]
[keys_type]
[table_comment]
[partition_info]
[distribution_desc]
[rollup_list]
[properties]
[extra_properties]
The differences between each clause and MySQL are as follows:
| Parameter | Differences from MySQL |
|---|---|
column_definition_list | - Defines the column list. The basic syntax is similar to MySQL. - VeloDB Cloud additionally supports an aggregation type operation, primarily for the Aggregate Key data model. - MySQL allows constraints such as Index, Primary Key, and Unique Key to be added after the column list definition; VeloDB Cloud implements support for these constraints and computations through data models. |
index_definition_list | - Defines the index list. The basic syntax is similar to MySQL. - VeloDB Cloud supports bitmap indexes, inverted indexes, and N-Gram indexes, and can also enable Bloom filter indexes through properties.- MySQL supports B+Tree indexes and Hash indexes. |
engine_type | - Specifies the table engine type. Optional. - The currently supported table engine is mainly the OLAP native engine. - MySQL supports storage engines such as InnoDB and MyISAM. |
keys_type | - Specifies the data model. Optional. - Supported types include: 1) DUPLICATE KEY (default): the columns specified after it are sort columns;2) AGGREGATE KEY: the columns specified after it are dimension columns;3) UNIQUE KEY: the columns specified after it are primary key columns.- MySQL has no concept of a data model. |
table_comment | Table comment. |
partition_info | Partitioning algorithm. Optional. VeloDB Cloud supports the following partitioning algorithms: - LESS THAN: defines only the upper bound of the partition; the lower bound is determined by the upper bound of the previous partition. - FIXED RANGE: defines a left-closed, right-open interval for the partition. - MULTI RANGE: creates RANGE partitions in batch, defining left-closed, right-open intervals with a time unit and step size. Supported time units are year, month, day, week, and hour. MySQL supported algorithms: Hash, Range, and List Key, with subpartitions supported. Subpartitions support Hash and Key. |
distribution_desc | - Bucketing algorithm. Includes: 1) Hash bucketing: DISTRIBUTED BY HASH (k1[, k2 ...]) [BUCKETS num|auto], uses the specified key columns for hash bucketing;2) Random bucketing: DISTRIBUTED BY RANDOM [BUCKETS num|auto], uses random numbers for bucketing.- MySQL has no bucketing algorithm. |
rollup_list | - Multiple synchronous materialized views can be created at the same time as table creation. - Syntax: rollup_name (col1[, col2, ...]) [DUPLICATE KEY(col1[, col2, ...])][PROPERTIES("key" = "value")].- Not supported by MySQL. |
properties | Table properties. The properties differ from those of MySQL, and the syntax for defining them also differs from MySQL. |
CREATE INDEX
CREATE INDEX [IF NOT EXISTS] index_name ON table_name (column [, ...]) [USING BITMAP];
- VeloDB Cloud currently supports bitmap indexes, inverted indexes, N-Gram indexes, and Bloom filter indexes (configured through separate syntax).
- MySQL supports B+Tree and Hash index algorithms.
CREATE VIEW
CREATE VIEW [IF NOT EXISTS]
[db_name.]view_name
(column1[ COMMENT "col comment"][, column2, ...])
AS query_stmt
CREATE MATERIALIZED VIEW [IF NOT EXISTS] mvName=multipartIdentifier
(LEFT_PAREN cols=simpleColumnDefs RIGHT_PAREN)? buildMode?
(REFRESH refreshMethod? refreshTrigger?)?
(KEY keys=identifierList)?
(COMMENT STRING_LITERAL)?
(PARTITION BY LEFT_PAREN partitionKey = identifier RIGHT_PAREN)?
(DISTRIBUTED BY (HASH hashKeys=identifierList | RANDOM) (BUCKETS (INTEGER_VALUE | AUTO))?)?
propertyClause?
AS query
- The basic syntax is the same as MySQL.
- In addition to logical views, VeloDB Cloud also supports two types of materialized views: synchronous materialized views and asynchronous materialized views.
- MySQL does not support materialized views.
ALTER TABLE / ALTER INDEX
Supported ALTER TABLE and index clauses differ from MySQL. Check the VeloDB Cloud SQL reference for each operation before migrating.
DROP TABLE / DROP INDEX
Use DROP TABLE or DROP INDEX to remove an object. Check object qualification and index syntax against the VeloDB Cloud SQL reference.
DML differences
INSERT
INSERT INTO table_name
[ PARTITION (p1, ...) ]
[ WITH LABEL label]
[ (column [, ...]) ]
[ [ hint [, ...] ] ]
{ VALUES ( { expression | DEFAULT } [, ...] ) [, ...] | query }
The VeloDB Cloud INSERT syntax is essentially the same as MySQL.
UPDATE
UPDATE target_table [table_alias]
SET assignment_list
[WHERE condition]
assignment_list:
assignment [, assignment] ...
assignment:
col_name = value
value:
{expr | DEFAULT}
For native tables, UPDATE modifies value columns in Unique Key tables. WHERE is optional. If neither WHERE nor LIMIT is present, the statement updates all rows. Check the intended scope before running it.
DELETE
DELETE FROM table_name [table_alias]
[PARTITION partition_name | PARTITIONS (partition_name [, partition_name])]
WHERE column_name op { value | value_list } [ AND column_name op { value | value_list } ...];
In VeloDB Cloud, the syntax above only allows specifying filter predicates.
DELETE FROM table_name [table_alias]
[PARTITION partition_name | PARTITIONS (partition_name [, partition_name])]
[USING additional_tables]
WHERE condition
In VeloDB Cloud, the syntax above can only be used on Unique Key model tables.
The supported DELETE form depends on the table model. Check the filter and table requirements, and use a predicate that identifies the intended rows.
SELECT
SELECT
[hint_statement, ...]
[ALL | DISTINCT]
select_expr [, select_expr ...]
[EXCEPT ( col_name1 [, col_name2, col_name3, ...] )]
[FROM table_references
[PARTITION partition_list]
[TABLET tabletid_list]
[TABLESAMPLE sample_value [ROWS | PERCENT]
[REPEATABLE pos_seek]]
[WHERE where_condition]
[GROUP BY [GROUPING SETS | ROLLUP | CUBE] {col_name | expr | position}]
[HAVING where_condition]
[ORDER BY {col_name | expr | position} [ASC | DESC], ...]
[LIMIT {[offset_count,] row_count | row_count OFFSET offset_count}]
[INTO OUTFILE 'file_name']
The VeloDB Cloud SELECT syntax is essentially the same as MySQL.
SQL functions
VeloDB Cloud provides string, date, aggregate, and window functions. Function names can overlap with MySQL while argument types, NULL handling, and results differ. Check the SQL function reference and test your application queries.
SQL mode
VeloDB Cloud supports setting some SQL Modes to control SQL parsing and execution behavior, making it easier to stay aligned with MySQL conventions.
| Name | Behavior when set | Behavior when not set | Notes |
|---|---|---|---|
PIPES_AS_CONCAT | Parses the || symbol as the concat function | Parses the || symbol as the logical OR operator | - |
NO_BACKSLASH_ESCAPES | Treats backslashes in strings as normal characters | Treats backslashes in strings as the start of an escape sequence | - |
ONLY_FULL_GROUP_BY | Allows only standard aggregation | Allows aggregation result output to include scalar values that are not in the aggregation KEY | Supported. Check the session setting before relying on permissive grouping behavior. |