Updated on 2024-05-14 GMT+08:00

Binary Data Types

Table 1 Binary data types

No.

MySQL

GaussDB

Difference

1

BINARY[(M)]

Not supported

-

2

VARBINARY(M)

Not supported

-

3

TINYBLOB

Supported

  • Value range: The length limit is 1 GB, not 255 bytes. If the length exceeds the limit, no error or truncation alarm is reported in strict or loose mode.
  • Input format: Escape characters and double quotation marks ("") are not supported.
  • Operator: Arithmetic operators (+, -, *, /, and %) are not supported. Common logical operators OR, AND, NOT (||, &&, and !) are not supported. Common bitwise operators (~, &, |, and ^) are not supported.

4

BLOB

Supported

  • Value range: The length limit is 1 GB, not 65535 bytes. If the length exceeds the limit, no error or truncation alarm is reported in strict or loose mode. However, MySQL supports these functions.
  • Input format: Escape characters and double quotation marks ("") are not supported.
  • Operator: Arithmetic operators (+, -, *, /, and %) are not supported. Common logical operators OR, AND, NOT (||, &&, and !) are not supported. Common bitwise operators (~, &, |, and ^) are not supported.

5

MEDIUMBLOB

Supported

  • Value range: The length limit is 1 GB, not 16777215 bytes. If the length exceeds the limit, no error or truncation alarm is reported in strict or loose mode. However, MySQL supports these functions.
  • Input format: Escape characters and double quotation marks ("") are not supported.
  • Operator: Arithmetic operators (+, -, *, /, and %) are not supported. Common logical operators OR, AND, NOT (||, &&, and !) are not supported. Common bitwise operators (~, &, |, and ^) are not supported.

6

LONGBLOB

Supported

  • Value range: The upper limit is 1 GB. For details about the range, see the centralized and distributed specifications of the bytea data type.
  • Input format: Escape characters and double quotation marks ("") are not supported.
  • Operator: Arithmetic operators (+, -, *, /, and %) are not supported. Common logical operators OR, AND, NOT (||, &&, and !) are not supported. Common bitwise operators (~, &, |, and ^) are not supported.

7

BIT[(M)]

Not supported

-