-
-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'stonedb-5.7-dev' into load-uneffect
- Loading branch information
Showing
18 changed files
with
249 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ignore: | ||
- "include/boost_1_66_0" | ||
- "extra" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
DROP DATABASE IF EXISTS issue1616_test; | ||
CREATE DATABASE issue1616_test; | ||
USE issue1616_test; | ||
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); | ||
INSERT INTO T1 VALUES (3,1,1),(4,1,1); | ||
ERROR 23000: Duplicate entry '3' for key 'PRIMARY' | ||
SELECT * FROM T1; | ||
id parent_id level | ||
3 1 1 | ||
4 1 1 | ||
UPDATE IGNORE T1 SET id=id+1; | ||
SELECT * FROM T1; | ||
id parent_id level | ||
3 1 1 | ||
5 1 1 | ||
UPDATE T1 SET id =10; | ||
ERROR 23000: Duplicate entry '10' for key 'PRIMARY' | ||
SELECT * FROM T1; | ||
id parent_id level | ||
3 1 1 | ||
5 1 1 | ||
UPDATE T1 SET ID=5 WHERE ID=3; | ||
ERROR 23000: Duplicate entry '5' for key 'PRIMARY' | ||
SELECT * FROM T1; | ||
id parent_id level | ||
3 1 1 | ||
5 1 1 | ||
DROP TABLE T1; | ||
CREATE TABLE T2 (dt datetime, val int, primary key(dt)) ENGINE =tianmu; | ||
INSERT INTO T2 VALUES ('2017-11-05 20:29:36',1), ('2027-11-05 20:29:36', 2); | ||
UPDATE T2 SET dt ='2027-11-05 20:29:36' WHERE val =1; | ||
ERROR 23000: Duplicate entry '2027-11-05 20:29:36' for key 'PRIMARY' | ||
SELECT * FROM T2; | ||
dt val | ||
2017-11-05 20:29:36 1 | ||
2027-11-05 20:29:36 2 | ||
DROP TABLE T2; | ||
CREATE TABLE T3 (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, parent_id)) engine=tianmu; | ||
INSERT INTO T3 VALUES (3,1,1),(4,1,1); | ||
INSERT INTO T3 VALUES (3,1,1),(4,1,1); | ||
ERROR 23000: Duplicate entry '3-1' for key 'PRIMARY' | ||
UPDATE IGNORE T3 SET id=id+1; | ||
SELECT * FROM T3; | ||
id parent_id level | ||
4 1 1 | ||
5 1 1 | ||
DROP TABLE T3; | ||
CREATE TABLE T4 (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=innodb; | ||
INSERT INTO T4 VALUES (3,1,1),(4,1,1); | ||
UPDATE T4 SET id =10; | ||
ERROR 23000: Duplicate entry '10' for key 'PRIMARY' | ||
SELECT * FROM T4; | ||
id parent_id level | ||
3 1 1 | ||
4 1 1 | ||
DROP TABLE T4; | ||
DROP DATABASE issue1616_test; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--source include/have_tianmu.inc | ||
--disable_warnings | ||
DROP DATABASE IF EXISTS issue1616_test; | ||
CREATE DATABASE issue1616_test; | ||
USE issue1616_test; | ||
--enable_warnings | ||
|
||
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); | ||
--ERROR 1062 | ||
INSERT INTO T1 VALUES (3,1,1),(4,1,1); | ||
|
||
SELECT * FROM T1; | ||
|
||
UPDATE IGNORE T1 SET id=id+1; | ||
|
||
SELECT * FROM T1; | ||
|
||
--ERROR 1062 | ||
UPDATE T1 SET id =10; | ||
|
||
SELECT * FROM T1; | ||
|
||
--ERROR 1062 | ||
UPDATE T1 SET ID=5 WHERE ID=3; | ||
SELECT * FROM T1; | ||
|
||
DROP TABLE T1; | ||
|
||
|
||
CREATE TABLE T2 (dt datetime, val int, primary key(dt)) ENGINE =tianmu; | ||
INSERT INTO T2 VALUES ('2017-11-05 20:29:36',1), ('2027-11-05 20:29:36', 2); | ||
--ERROR 1062 | ||
UPDATE T2 SET dt ='2027-11-05 20:29:36' WHERE val =1; | ||
|
||
SELECT * FROM T2; | ||
DROP TABLE T2; | ||
|
||
#multi-keys | ||
CREATE TABLE T3 (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, parent_id)) engine=tianmu; | ||
|
||
INSERT INTO T3 VALUES (3,1,1),(4,1,1); | ||
--ERROR 1062 | ||
INSERT INTO T3 VALUES (3,1,1),(4,1,1); | ||
|
||
UPDATE IGNORE T3 SET id=id+1; | ||
SELECT * FROM T3; | ||
|
||
DROP TABLE T3; | ||
|
||
CREATE TABLE T4 (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=innodb; | ||
|
||
INSERT INTO T4 VALUES (3,1,1),(4,1,1); | ||
--ERROR 1062 | ||
UPDATE T4 SET id =10; | ||
|
||
SELECT * FROM T4; | ||
DROP TABLE T4; | ||
|
||
DROP DATABASE issue1616_test; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.