Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

Show all

GUC Parameters of GaussDB (MySQL-Compatible Mode)

Updated on 2025-02-22 GMT+08:00

For GaussDB databases compatible with MySQL syntax, you can set the GUC parameters to enhance the compatibility. For details, see Table 1.

CAUTION:

GaussDB provides many operation parameters. Configurations of these parameters affect the behavior of the database system. Before changing these parameters, learn the impact of these parameters on the database. Otherwise, unexpected results may occur.

Table 1 GUC parameters of GaussDB (MySQL-compatible mode)

MySQL-Compatible Configuration Item

Compatibility Configuration Item

Compatibility Configuration Item Name

Supported Database

Enable

b_format_behavior_compat_options

enable_set_variables

Takes effect only for session variables of centralized GaussDB instances.

Centralized

Yes

b_format_version

5.7

Specifies database platform compatibility configuration items.

Centralized/Distributed 505.0

Yes

b_format_dev_version

s1

Specifies the compatible minor version of the database platform.

Centralized/Distributed 505.0

Yes

s2

Specifies the compatible minor version of the database platform.

Centralized/Distributed 505.1

Yes

NOTE:

Set the b_format_dev_version parameter as follows:

  • For GaussDB V2.0-8.0 Enterprise Edition, set the value to s1.
  • For GaussDB V2.0-8.100 Enterprise Edition, set the value to s2.

For details about the versions, see What Is the Mapping Between the GaussDB Versions Displayed on the UGO Console and Self-built GaussDB Versions?

  • The S1 compatibility configuration item affects the following content:
    • NEW() function, last_day() function, date_sub(date, INTERVAL expr unit), datediff(expr1, expr2), day()/dayofmonth(), and dayname()
    • dayofweek(), dayofyear(), extract(unit FROM date), from_days(days), from_unixtime(unix_timestamp[,format]), get_format({DATE | TIME | DATETIME | TIMESTAMP}, {'EUR' | 'USA' | 'JIS' | 'ISO' | 'INTERNAL'}), hour(), makedate(year,dayofyear), microsecond(), minute(), month(), monthname(), period_add(period, month_number)
    • TIMESTAMPDIFF, yearweek(date[, mode]), year(), weekofyear(date), weekday(), week(date[, mode]), utc_timestamp(), utc_time(), period_diff(p1,p2), second().
    • quarter(), str_to_date(str, format), subdate(expr, days), time_format(time, format), ifnull(expr1, expr2), database(), current_date, current_time, current_timestamp
    • round(arg1, arg2), localtime([precision]), localtimestamp, dbtimezone, timenow(), numtodsinterval(num, interval_unit), numtoyminterval(num, interval_unit)
    • new_time(date, timezone1,timezone2), sysdate([precision]), add_months(d,n), months_between(d1, d2), convert_tz(dt, from_tz, to_tz)
    • adddate(date, INTERVAL expr unit), date_format(date, format)
  • The S2 compatibility configuration item affects:
    • Compatibility behaviors controlled by s1.
    • The following functions:
      • When data is imported to the AUTO_INCREMENT column or the BATCH INSERT execution plan is inserted, if 0, NULL, and determined values are used together, the auto-increment count is updated immediately when the determined value is inserted, the subsequent 0 or NULL increases automatically based on the determined value.
      • The like operator does not report an error when an escape character is at the end of the matching string.
      • The priorities of the sorting rules for character sets and character orders are changed.
    • The following syntax:
      • The CREATE TABLE table_name LIKE source_table syntax is supported.
      • The syntaxes CREATE TABLE table_name LIKE source_table and CREATE TABLE table_name (LIKE source_table) cannot specify INCLUDING and EXCLUDING options. By default, INCLUDING ALL is specified.
      • The LOAD DATA syntax is supported. Some syntax functions in gs_loader that are consistent with the LOAD DATA syntax will change.
      • The collate clause can be specified by set names.
      • The syntax for changing table names, such as ALTER TABLE and RENAME TABLE, is involved. For example, if the character string corresponding to the new table name starts with #MySQL50# and is followed by other characters, #MySQL50# will be ignored.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback