§ Changes in GreatSQL 8.0.32-27 (2025-3-10)

§ Version Information

§ Improvements

GreatSQL 8.0.32-27 adds the high-performance parallel query engine Turbo, upgrades the Rapid Engine kernel version, optimizes the compression and transmission mechanism for MGR large transactions, improves the greatdb_ha plugin, supports Zstd compression for InnoDB Pages, improves Oracle compatibility features, improves security, and fixes several bugs that could cause crashes or data loss.

§ High Availability

  • Optimized the handling mechanism for MGR large transaction compression exceeding the limit.

In MGR, when a large transaction exceeds the group_replication_compression_threshold threshold, LZ4 compression is performed. However, due to the limitations of LZ4 itself, compression may fail with an error, and the transaction fails with an error similar to the following

[GCS] Gcs_packet's payload is too big. Only packets smaller than 2113929216 bytes can be compressed. Payload size is 2197817290
1

GreatSQL has adjusted and optimized this mechanism to achieve the following two goals:

  1. When the transaction size exceeds the group_replication_compression_threshold threshold, compression is started.

  2. But when the transaction size exceeds the LZ4 compression limit, an error is no longer reported; instead, the original uncompressed transaction data continues to be transmitted, i.e., the effect is similar to setting group_replication_compression_threshold=0 (compression disabled).

  • Added the status variable Rpl_data_speed to display the current Binlog rate limit status. It can be viewed by executing SHOW GLOBAL STATUS LIKE 'Rpl_data_speed', for example
greatsql> SHOW GLOBAL STATUS LIKE 'Rpl%spee%';
+----------------+------------------+
| Variable_name  | Value            |
+----------------+------------------+
| Rpl_data_speed | async_rpl=100.00 |
+----------------+------------------+
1
2
3
4
5
6

This indicates that the current Binlog read rate limit is 100KB/s. For more detailed usage, please refer to: Binlog Read Rate Limit.

  • In the greatdb_ha plugin, added defense for the TCP port corresponding to the parameter greatdb_ha_port, avoiding the risk of a crash when users send illegal commands.
  • Fixed the issue where enabling the greatdb_ha plugin could cause a crash due to undefined behavior when the Linux system function FD_SET encounters file descriptors exceeding 1024.
  • Fixed the risk of memory leaks after enabling the VIP feature in the greatdb_ha plugin.
  • Fixed the issue where after deploying source-replica replication between two MGR clusters (primary and standby), if the primary node of the standby cluster crashed unexpectedly, the process might fail to exit.
  • Fixed the issue where after deploying source-replica replication between two MGR clusters (primary and standby), if the primary node of the standby cluster executed kill -19 to kill the mysqld process, the sql_thread on the Slave node might fail to exit for a long time after fault recovery.

§ High Performance

  • Added the high-performance parallel query engine Turbo. By embedding DuckDB, it gives GreatSQL multi-threaded concurrent vectorized query capabilities, achieving exponential acceleration of SQL query speed while maintaining compatibility with the GreatSQL ecosystem. Compared with the Rapid Engine, the Turbo Engine does not need to load data into the engine; instead, during query execution, it directly extracts data in parallel for use by the Turbo Engine.

First install the Turbo Engine

greatsql> INSTALL PLUGIN turbo SONAME 'turbo.so';
1

Then you can directly use the Turbo Engine to greatly improve SQL query efficiency

greatsql> SELECT /*+ SET_VAR(turbo_enable=ON) SET_VAR(turbo_cost_threshold=0)*/ * FROM t1;
1

For more detailed usage of the Turbo Engine, please refer to: Turbo Engine.

  • Upgraded the Rapid Engine kernel to the official GA version. The new version has achieved major breakthroughs in storage format stability and query semantics consistency, providing users with strong stability guarantees. Note that the new version adopts a new file storage format that is incompatible with previous versions, so it is not possible to upgrade smoothly and directly from GreatSQL 8.0.32-25 or 8.0.32-26 to GreatSQL 8.0.32-27. You need to first delete the old Rapid Engine data files, then perform a full data import again, and restart the incremental import task. For detailed upgrade steps, please see below: Upgrading to GreatSQL 8.0.32-27.
  • In the new version of the Rapid Engine, the maximum number of parallel logical CPU cores that can be used is 4. If you need higher concurrency performance, please contact us for a solution.
  • Fixed the issue in the Rapid Engine where the DELAY field displayed inaccurate values when checking the incremental import task progress after deleting a large batch of data at once.
  • Fixed the incorrect problem where using EXPLAIN to view the execution plan of a Rapid table in a stored procedure showed that the Rapid Engine could not be used when it actually could.
  • Fixed the issue where, in the Rapid Engine, starting an incremental import task directly without first completing a full import task would fail with an error, and after restarting the instance, it could not start normally. Normally, the correct approach is to complete a full import first, and then start the incremental import task.
  • Fixed the setting problem of the Rapid Engine parameter rapid_worker_threads. After setting it above the maximum value, resetting it to any other legal value except the default value would report an error, and it would not return to normal until the Rapid Engine was reloaded or the database was restarted.
  • Removed the Rapid Engine parameter rapid_hash_table_memory_limit; it is no longer used.
  • When reading Rapid table data, redundant information similar to the following is no longer printed in the error log.
[Note] [MY-011825] [InnoDB] thread 62 handle range count: 34 total rows: 2449266
[Note] [MY-011825] [InnoDB] thread 63 handle range count: 21 total rows: 1648443
[Note] [MY-011825] [InnoDB] total fetch rows count: 150000000
1
2
3
  • Fixed the Rapid Engine's handling of tables with virtual columns. Previously, when a table had virtual columns, executing ALTER TABLE ... SECONDARY_LOAD did not report an error, but executing SELECT ... /*+ SET_VAR(use_secondary_engine=FORCED) */ reported that it was not supported. In the new version, when a table is found to have virtual columns, executing ALTER TABLE ... SECONDARY_LOAD directly reports the following error indicating that it is not supported:
ERROR 3106 (HY000): 'Rapid engine' is not supported for generated columns.
1
  • When using the Rapid Engine, if an unsupported data type is encountered, a clearer error is added to the returned error message, as shown in the following example
greatsql> CREATE TABLE t1 (
  id int unsigned not null primary key,
  c1 int unsigned not null,
  c2 decimal(65,30) DEFAULT NULL
) SECONDARY_ENGINE=rapid;
Query OK, 0 rows affected (0.02 sec)

-- In the error message below, it clearly indicates that the data type of column c2 is not supported
greatsql> ALTER TABLE t1 SECONDARY_LOAD;
ERROR 3877 (HY000): The field c2 type is not supported
1
2
3
4
5
6
7
8
9
10

§ High Compatibility

  • Added support for the INTERVAL 'n' DAY arithmetic usage in the TO_DATE function. For example
greatsql> SELECT TO_DATE('20250212','YYYYMMDD') + (INTERVAL '-1' DAY) AS LASTDAY FROM DUAL;
+---------------------+
| LASTDAY             |
+---------------------+
| 2025-02-11 00:00:00 |
+---------------------+
1
2
3
4
5
6
  • Optimized the execution efficiency of the TO_NUMBER function with large amounts of data; performance can be improved several times.
  • Fixed the issue where REF CURSOR could report an error when the table structure changes during execution.
  • Optimized the memory management mechanism of dynamic cursors, releasing memory in time after the dynamic cursor END LOOP completes execution.
  • Fixed the issue where the MERGE INTO statement failed to update the target table when the source table is a single-row pseudo-table, causing the execution result to be inconsistent with Oracle.

§ High Security

  • Fixed the source-replica anomaly that could be caused by not handling Binlog in the last login information feature.
  • Fixed the source-replica anomaly that could be caused by not handling Binlog in the audit log into tables feature.
  • Fixed the inconsistency of function names before and after in the installation and uninstallation SQL scripts of the audit log into tables feature.
  • Fixed the issue where, when sql_log_bin=ON was set, the audit log table sys_audit.audit_log could still be updated and modified, even though modifying it should have been prohibited.

§ Others

  • The InnoDB Page compression algorithm supports Zstd, further improving the Page compression ratio, especially when the table contains a large amount of repeated character-type data. You can specify the Page compression algorithm when creating a new table, for example
greatsql> CREATE TABLE `t1_zstd` (
  `id` int NOT NULL,
  `c1` varchar(20) NOT NULL,
  `c2` varchar(30) NOT NULL,
  `c3` datetime NOT NULL,
  `c4` varchar(30) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_c3` (`c3`)
) ENGINE=InnoDB COMPRESSION='zstd';
1
2
3
4
5
6
7
8
9

You can also execute ALTER TABLE to modify the Page compression algorithm of a table, for example

greatsql> ALTER TABLE t1 COMPRESSION='zstd';
1

For more usage of InnoDB Page compression, please refer to: InnoDB Page Compression.

§ Bug Fixes

§ Notes

§ Upgrading/Downgrading to GreatSQL 8.0.32-27

§ Upgrading to GreatSQL 8.0.32-27

  • If the old version is GreatSQL 8.0.32-25 or 8.0.32-26 and the Rapid Engine is not used, you can directly start GreatSQL 8.0.32-27 in-place based on the original datadir after modifying basedir, and automatic upgrade will be completed.
  • If the old version is GreatSQL 8.0.32-25 or 8.0.32-26 and the Rapid Engine is enabled, in-place upgrade is not possible in this case. You need to unload all Rapid Engine tables, delete the Rapid data files, and then you can directly start GreatSQL 8.0.32-27 in-place based on the original datadir after modifying basedir, and automatic upgrade will be completed. After the new version instance starts, execute ALTER TABLE SECONDARY_LOAD on all Rapid Engine tables to complete the full data import, then execute SELECT START_SECONDARY_ENGINE_INCREMENT_LOAD_TASK() to start the incremental import task, completing the Rapid Engine table upgrade. The following is a reference upgrade process:
  1. Query and record all Rapid Engine tables

You can execute the following SQL to query which tables currently use the Rapid Engine:

greatsql> SELECT TABLE_SCHEMA, TABLE_NAME, TABLE_ROWS FROM information_schema.TABLES WHERE CREATE_OPTIONS LIKE '%Rapid%';
+--------------+----------------+------------+
| TABLE_SCHEMA | TABLE_NAME     | TABLE_ROWS |
+--------------+----------------+------------+
| tpch100g     | customer       |   14854987 |
| tpch100g     | lineitem       |  582868392 |
| tpch100g     | nation         |         25 |
| tpch100g     | orders         |  148492582 |
| tpch100g     | part           |   19943155 |
| tpch100g     | partsupp       |   79832625 |
| tpch100g     | region         |          5 |
| tpch100g     | supplier       |     989416 |
+--------------+----------------+------------+
1
2
3
4
5
6
7
8
9
10
11
12
13
  1. Stop the GreatSQL instance process normally

Before stopping the GreatSQL instance process, first modify innodb_fast_shutdown=0 and then execute SHUTDOWN to stop the instance

greatsql> SET GLOBAL innodb_fast_shutdown=0;
greatsql> SHUTDOWN;
1
2
  1. Delete the old Rapid Engine data files
cd /data/GreatSQL && rm -f duckdb*
1
  1. Modify the basedir parameter in the my.cnf configuration file to point to the new GreatSQL 8.0.32-27 version
#my.cnf
[mysqld]
basedir=/usr/local/GreatSQL-8.0.32-27-Linux-glibc2.28-x86_64
1
2
3

And make sure the parameter upgrade is not set to NONE.

  1. Start the new GreatSQL 8.0.32-27 instance
systemctl start greatsql
1
  1. Reinstall the Rapid Engine
greatsql> INSTALL PLUGIN rapid SONAME 'ha_rapid.so';
1
  1. Perform a full data import for the Rapid Engine tables
greatsql> ALTER TABLE test.t1 SECONDARY_LOAD;
1

Tip

Since the SECONDARY_ENGINE=rapid attribute of the table was not removed before the upgrade, there is no need to set it again. If all Rapid Engine tables were unloaded before the upgrade, you need to set it again.

  1. Start the incremental import task again
greatsql> SELECT START_SECONDARY_ENGINE_INCREMENT_LOAD_TASK('test', 't1');
1

This completes the Rapid Engine table upgrade.

  • If the old version is GreatSQL 8.0.32-24, 8.0.25-*, 5.7.36-39 or other series versions, you can directly start GreatSQL 8.0.32-27 in-place based on the original datadir after modifying basedir, and automatic upgrade will be completed.
  • If the old version is MySQL 8.0.* (<= 8.0.32), Percona Server 8.0.* (<= 8.0.32) or other series versions, you can directly start GreatSQL 8.0.32-27 in-place based on the original datadir after modifying basedir, and automatic upgrade will be completed.
  • If the old version is MySQL 8.0.* (> 8.0.32), Percona Server 8.0.* (> 8.0.32) or other series versions, you need to export data using logical backup and then import it to complete the upgrade. In-place upgrade to GreatSQL 8.0.32-27 is not supported.
  • If the old version is MySQL 5.7.* (>= 5.7.23), Percona Server 5.7.* (>= 5.7.23) or other series versions, you can directly start GreatSQL 8.0.32-27 in-place based on the original datadir after modifying basedir, and automatic upgrade will be completed.

In the above in-place upgrade scenarios, make sure that the upgrade parameter in my.cnf is not set to NONE; it can be set to the default AUTO or FORCE. For example:

#my.cnf
[mysqld]
upgrade = AUTO
1
2
3

For more migration and upgrade solutions, please refer to: Migration & Upgrade.

§ Downgrading to GreatSQL 8.0.32-27

If you want to downgrade from a version after MySQL/Percona 8.0.32 to GreatSQL 8.0.32-27, you need to use the logical backup + logical import method to complete the downgrade. In addition, on the first restart after the logical backup import is completed, be sure to set upgrade = FORCE to force upgrading all data tables, including system tables.

The downgrade process is roughly as follows:

  1. Perform a full logical backup in the higher version
mysqldump -S/data/MySQL/mysql.sock -A --triggers --routines --events --single-transaction > /data/backup/fulldump.sql
1
  1. Import the logical backup file in the GreatSQL 8.0.32-27 environment to complete logical recovery
mysql -S/data/GreatSQL/mysql.sock -f < /data/backup/fulldump.sql
1
  1. Modify my.cnf to ensure the upgrade=FORCE setting
#my.cnf
[mysqld]
upgrade = FORCE
1
2
3
  1. Restart GreatSQL to complete the downgrade
systemctl restart greatsql
1

During the restart, you can see a forced upgrade process in the log similar to the following

[Note] [MY-013387] [Server] Upgrading system table data.
[Note] [MY-013385] [Server] Upgrading the sys schema.
[Note] [MY-013400] [Server] Upgrade of help tables started.
[Note] [MY-013400] [Server] Upgrade of help tables completed.
[Note] [MY-013394] [Server] Checking 'mysql' schema.
[Note] [MY-013394] [Server] Checking 'sys' schema.
[System] [MY-013381] [Server] Server upgrade from '80032' to '80032' completed.
1
2
3
4
5
6
7

If upgrade = FORCE is not set to force upgrading all tables, the system table mysql.procs_priv may be corrupted, and an error similar to the following may be reported when creating users:

greatsql> create user tpch identified by 'tpch';
ERROR 1728 (HY000): Cannot load from mysql.procs_priv. The table is probably corrupted
1
2

§ GreatSQL vs MySQL

1. Major Features GreatSQL 8.0.32-27 MySQL 8.0.32
Open Source ✔️ ✔️
ACID Integrity ✔️ ✔️
MVCC Features ✔️ ✔️
Row Locks Supported ✔️ ✔️
Automatic Crash Recovery ✔️ ✔️
Table Partitioning ✔️ ✔️
Views ✔️ ✔️
Subqueries ✔️ ✔️
Triggers ✔️ ✔️
Stored Programs ✔️ ✔️
Foreign Keys ✔️ ✔️
Window Functions ✔️ ✔️
Common Table Expressions (CTE) ✔️ ✔️
Geographic Information (GIS) ✔️ ✔️
GTID-Based Replication ✔️ ✔️
Group Replication (MGR) ✔️ ✔️
MyRocks Engine ✔️ ❌
LoongArch Architecture Support ✔️ ❌
2. Performance Enhancement Extensions GreatSQL 8.0.32-27 MySQL 8.0.32
Rapid Engine ✔️ HeatWave (cloud only)
Turbo Engine ✔️ ❌
NUMA Affinity Optimization ✔️ ❌
Non-Blocking DDL ✔️ ❌
Import Optimization for Tables Without Primary Key ✔️ ❌
InnoDB Parallel Query ✔️ Primary key scans only
Parallel LOAD DATA ✔️ ❌
InnoDB Transaction ReadView Lock-Free Optimization ✔️ ❌
InnoDB Transaction Large Lock Splitting Optimization ✔️ ❌
InnoDB Page Compression with Zstd Support ✔️ ❌
InnoDB Resource Groups ✔️ ✔️
Custom InnoDB Page Size ✔️ ✔️
Contention-Aware Transaction Scheduling ✔️ ✔️
InnoDB Mutexes Splitting Optimization ✔️ ❌
MEMORY Engine Optimization ✔️ ❌
InnoDB Flushing Optimization ✔️ ❌
Parallel Doublewrite Buffer ✔️ ✔️
InnoDB Fast Index Creation Optimization ✔️ ❌
Single-Column Compression for VARCHAR/BLOB/JSON Types ✔️ ❌
Single-Column Compression Information in Data Dictionary ✔️ ❌
3. Developer-Oriented Improvements GreatSQL 8.0.32-27 MySQL 8.0.32
X API ✔️ ✔️
JSON ✔️ ✔️
NoSQL Socket-Level Interface ✔️ ✔️
InnoDB Full-Text Search Improvements ✔️ ❌
More Hash/Digest Functions ✔️ ❌
Oracle Compatibility - Data Types ✔️ ❌
Oracle Compatibility - Functions ✔️ ❌
Oracle Compatibility - SQL Syntax ✔️ ❌
Oracle Compatibility - Stored Programs ✔️ ❌
4. Basic Feature Enhancements GreatSQL 8.0.32-27 MySQL 8.0.32
MGR Enhancement - Zone Tags ✔️ ❌
MGR Enhancement - Arbitrator Nodes ✔️ ❌
MGR Enhancement - VIP Binding for Read/Write Nodes ✔️ ❌
MGR Enhancement - Fast Single-Primary Mode ✔️ ❌
MGR Enhancement - Smart Primary Election Mechanism ✔️ ❌
MGR Enhancement - New Flow Control Algorithm ✔️ ❌
MGR Enhancement - Network Partition Exception Handling ✔️ ❌
MGR Enhancement - Abnormal Node Exit Handling ✔️ ❌
MGR Enhancement - Full Node Disk Handling ✔️ ❌
MGR Enhancement - Automatic Donor Node Selection ✔️ ❌
MGR Enhancement - Large Transaction Compression Optimization ✔️ ❌
Clone Incremental Backup ✔️ ❌
Clone Backup Compression ✔️ ❌
Binlog Read Rate Limit ✔️ ❌
Number of information_schema tables 95 65
Global performance and status metrics 853 434
Optimizer Histograms ✔️ ✔️
Per-Table Performance Metrics ✔️ ❌
Per-Index Performance Metrics ✔️ ❌
Per-User Performance Metrics ✔️ ❌
Per-Client Performance Metrics ✔️ ❌
Per-Thread Performance Metrics ✔️ ❌
Global Query Response Time Statistics ✔️ ❌
SHOW ENGINE INNODB STATUS Enhancement ✔️ ❌
Rollback Segment Information Enhancement ✔️ ❌
Temporary Table Information Enhancement ✔️ ❌
User Statistics Enhancement ✔️ ❌
Slow Query Log Enhancement ✔️ ❌
5. Security Enhancements GreatSQL 8.0.32-27 MySQL 8.0.32
National Cryptographic Algorithm Support ✔️ ❌
Backup Encryption ✔️ ❌
Auditing ✔️ Enterprise Edition only
Data Masking ✔️ ❌
Last Login Records ✔️ ❌
SQL Roles ✔️ ✔️
SHA-2 Password Hashing ✔️ ✔️
Password Rotation Policy ✔️ ✔️
PAM Authentication Plugin ✔️ Enterprise Edition only
Keyring Stored in File ✔️ ✔️
Keyring Stored in Hashicorp Vault ✔️ Enterprise Edition only
InnoDB Data Encryption ✔️ ✔️
InnoDB Log Encryption ✔️ ✔️
InnoDB Tablespace File Encryption ✔️ ✔️
Binary Log Encryption ✔️ ❌
Temporary File Encryption ✔️ ❌
Forced Encryption ✔️ ❌
6. Operations Convenience Enhancements GreatSQL 8.0.32-27 MySQL 8.0.32
DDL Atomicity ✔️ ✔️
Data Dictionary Stored in InnoDB Tables ✔️ ✔️
Fast DDL ✔️ ✔️
SET PERSIST ✔️ ✔️
Invisible Indexes ✔️ ✔️
Thread Pool ✔️ Enterprise Edition only
Backup Locks ✔️ ❌
SHOW GRANTS Extension ✔️ ❌
Table Corruption Action Extension ✔️ ❌
Kill Inactive Transactions ✔️ ❌
START TRANSACTION WITH CONSISTENT SNAPSHOT Extension ✔️ ❌

GreatSQL 8.0.32-27 is based on Percona Server for MySQL 8.0.32, which has made a large number of improvements and enhancements and added many new features on top of MySQL 8.0.32. For details, please see: Percona Server for MySQL feature comparison (opens new window). These include features only available in MySQL Enterprise Edition, such as thread pool, auditing, and data masking, as well as numerous improvements and enhancements such as performance_schema improvements, information_schema improvements, performance and scalability improvements, user statistics enhancements, PROCESSLIST enhancements, and Slow Query Log enhancements. They are not listed here one by one.

§ GreatSQL Release Notes

§ GreatSQL 8.0

§ GreatSQL 5.7

Scan the QR code to follow our WeChat Official Account

greatsql-wx