stonedb-5.7-v1.0.4-alpha
Release Notes for stonedb-5.7-v1.0.4-alpha
- Version Number: 5.7-v1.0.4-alpha
- Release Date: 2023-06-30
Stability:
- Fixed a crash caused by incremental data when importing data #1805
- Fixed a crash caused by the result set of the union all clause, #1875
- Fixed a crash caused by using aggregate functions in large data scenarios, #1855
New features
2.1. Support for update ignore syntax feature.
When updating tianmu, records with primary key conflicts will be skipped and subsequent update operations will be performed. For example:
CREATE TABLE t1 (id int(11) NOT NULL auto_increment, parent_id int(11) DEFAULT '0' NOT NULL, level tinyint(4)
DEFAULT '0' NOT NULL, PRIMARY KEY (id)) engine=tianmu;
INSERT INTO t1 VALUES (3,1,1),(4,1,1);
Executing the update ignore t1 set id=id+1; statement will ignore the update of PK=3, because the updated primary key will conflict with PK=4. Then continue to execute the update of pk=4, and the updated PK=5.
mysql> CREATE TABLE t1 (id int(11) NOT NULL auto_increment, parent_id int(11) DEFAULT '0' NOT NULL, level tinyint(4)
-> DEFAULT '0' NOT NULL, PRIMARY KEY (id)) engine=tianmu;
Query OK, 0 rows affected (0.01 sec)
mysql> INSERT INTO t1 VALUES (3,1,1),(4,1,1);
Query OK, 2 rows affected (0.01 sec)
Records: 2 Duplicates: 0 Warnings: 0
mysql> update t1 set id=id+1;
ERROR 1062 (23000): Duplicate entry '4' for key 'PRIMARY'
mysql> select * from t1;
+----+-----------+-------+
| id | parent_id | level |
+----+-----------+-------+
| 3 | 1 | 1 |
| 4 | 1 | 1 |
+----+-----------+-------+
2 rows in set (0.00 sec)
mysql> update ignore t1 set id=id+1;
Query OK, 2 rows affected (0.00 sec)
Rows matched: 2 Changed: 2 Warnings: 0
mysql> select * from t1;
+----+-----------+-------+
| id | parent_id | level |
+----+-----------+-------+
| 3 | 1 | 1 |
| 5 | 1 | 1 |
+----+-----------+-------+
2 rows in set (0.00 sec)