Commit 46bfebbb authored by Michael Erickson's avatar Michael Erickson Committed by Sergei Petrunia

change upsert test to expect new error

parent fca2a06c
...@@ -11,7 +11,7 @@ id animal ...@@ -11,7 +11,7 @@ id animal
2 Cheetah 2 Cheetah
3 Zebra 3 Zebra
INSERT INTO ins_duplicate VALUES (1,'Antelope'); INSERT INTO ins_duplicate VALUES (1,'Antelope');
ERROR 23000: Xpand error: [5120] Duplicate key in container: `db1`.`ins_duplicate` Primary key: (1) ERROR 23000: Can't write; duplicate key in table 'ins_duplicate'
INSERT INTO ins_duplicate VALUES (1,'Antelope') ON DUPLICATE KEY UPDATE animal='Banana'; INSERT INTO ins_duplicate VALUES (1,'Antelope') ON DUPLICATE KEY UPDATE animal='Banana';
SELECT * FROM `ins_duplicate` ORDER BY `id`; SELECT * FROM `ins_duplicate` ORDER BY `id`;
id animal id animal
...@@ -19,7 +19,7 @@ id animal ...@@ -19,7 +19,7 @@ id animal
2 Cheetah 2 Cheetah
3 Zebra 3 Zebra
INSERT INTO ins_duplicate VALUES (1,'Antelope'),(2,'Cheetah'); INSERT INTO ins_duplicate VALUES (1,'Antelope'),(2,'Cheetah');
ERROR 23000: Xpand error: [5120] Duplicate key in container: `db1`.`ins_duplicate` Primary key: (1) ERROR 23000: Can't write; duplicate key in table 'ins_duplicate'
INSERT INTO ins_duplicate VALUES (1,'Antelope'),(2,'Cheetah') ON DUPLICATE KEY UPDATE animal='hybrid'; INSERT INTO ins_duplicate VALUES (1,'Antelope'),(2,'Cheetah') ON DUPLICATE KEY UPDATE animal='hybrid';
SELECT * FROM `ins_duplicate` ORDER BY `id`; SELECT * FROM `ins_duplicate` ORDER BY `id`;
id animal id animal
...@@ -33,7 +33,7 @@ id animal ...@@ -33,7 +33,7 @@ id animal
2 hybrid 2 hybrid
3 Zebra 3 Zebra
INSERT INTO ins_duplicate VALUES (1,'Antelope'); INSERT INTO ins_duplicate VALUES (1,'Antelope');
ERROR 23000: Xpand error: [5120] Duplicate key in container: `db1`.`ins_duplicate` Primary key: (1) ERROR 23000: Can't write; duplicate key in table 'ins_duplicate'
INSERT INTO ins_duplicate VALUES (1,'Antelope') ON DUPLICATE KEY UPDATE animal='Vegetable'; INSERT INTO ins_duplicate VALUES (1,'Antelope') ON DUPLICATE KEY UPDATE animal='Vegetable';
SELECT * FROM `ins_duplicate` ORDER BY `id`; SELECT * FROM `ins_duplicate` ORDER BY `id`;
id animal id animal
...@@ -41,7 +41,7 @@ id animal ...@@ -41,7 +41,7 @@ id animal
2 hybrid 2 hybrid
3 Zebra 3 Zebra
INSERT INTO ins_duplicate VALUES (1,'Antelope'),(2,'Cheetah'); INSERT INTO ins_duplicate VALUES (1,'Antelope'),(2,'Cheetah');
ERROR 23000: Xpand error: [5120] Duplicate key in container: `db1`.`ins_duplicate` Primary key: (1) ERROR 23000: Can't write; duplicate key in table 'ins_duplicate'
INSERT INTO ins_duplicate VALUES (1,'Antelope'),(2,'Cheetah') ON DUPLICATE KEY UPDATE animal='hybrid2'; INSERT INTO ins_duplicate VALUES (1,'Antelope'),(2,'Cheetah') ON DUPLICATE KEY UPDATE animal='hybrid2';
COMMIT; COMMIT;
BEGIN; BEGIN;
...@@ -51,7 +51,7 @@ id animal ...@@ -51,7 +51,7 @@ id animal
2 hybrid2 2 hybrid2
3 Zebra 3 Zebra
INSERT INTO ins_duplicate VALUES (1,'Antelope'); INSERT INTO ins_duplicate VALUES (1,'Antelope');
ERROR 23000: Xpand error: [5120] Duplicate key in container: `db1`.`ins_duplicate` Primary key: (1) ERROR 23000: Can't write; duplicate key in table 'ins_duplicate'
INSERT INTO ins_duplicate VALUES (1,'Antelope') ON DUPLICATE KEY UPDATE animal='Vegetable'; INSERT INTO ins_duplicate VALUES (1,'Antelope') ON DUPLICATE KEY UPDATE animal='Vegetable';
SELECT * FROM `ins_duplicate` ORDER BY `id`; SELECT * FROM `ins_duplicate` ORDER BY `id`;
id animal id animal
...@@ -59,7 +59,7 @@ id animal ...@@ -59,7 +59,7 @@ id animal
2 hybrid2 2 hybrid2
3 Zebra 3 Zebra
INSERT INTO ins_duplicate VALUES (1,'Antelope'),(2,'Cheetah'); INSERT INTO ins_duplicate VALUES (1,'Antelope'),(2,'Cheetah');
ERROR 23000: Xpand error: [5120] Duplicate key in container: `db1`.`ins_duplicate` Primary key: (1) ERROR 23000: Can't write; duplicate key in table 'ins_duplicate'
INSERT INTO ins_duplicate VALUES (1,'Antelope'),(2,'Cheetah') ON DUPLICATE KEY UPDATE animal='hybrid3'; INSERT INTO ins_duplicate VALUES (1,'Antelope'),(2,'Cheetah') ON DUPLICATE KEY UPDATE animal='hybrid3';
ROLLBACK; ROLLBACK;
SELECT * FROM `ins_duplicate` ORDER BY `id`; SELECT * FROM `ins_duplicate` ORDER BY `id`;
......
...@@ -5,12 +5,12 @@ CREATE TABLE `ins_duplicate`(`id` INT PRIMARY KEY, `animal` VARCHAR(30)) ENGINE= ...@@ -5,12 +5,12 @@ CREATE TABLE `ins_duplicate`(`id` INT PRIMARY KEY, `animal` VARCHAR(30)) ENGINE=
INSERT INTO `ins_duplicate` VALUES (1,'Aardvark'), (2,'Cheetah'), (3,'Zebra'); INSERT INTO `ins_duplicate` VALUES (1,'Aardvark'), (2,'Cheetah'), (3,'Zebra');
SELECT * FROM `ins_duplicate` ORDER BY `id`; SELECT * FROM `ins_duplicate` ORDER BY `id`;
--error ER_DUP_ENTRY --error ER_DUP_KEY
INSERT INTO ins_duplicate VALUES (1,'Antelope'); INSERT INTO ins_duplicate VALUES (1,'Antelope');
INSERT INTO ins_duplicate VALUES (1,'Antelope') ON DUPLICATE KEY UPDATE animal='Banana'; INSERT INTO ins_duplicate VALUES (1,'Antelope') ON DUPLICATE KEY UPDATE animal='Banana';
SELECT * FROM `ins_duplicate` ORDER BY `id`; SELECT * FROM `ins_duplicate` ORDER BY `id`;
--error ER_DUP_ENTRY --error ER_DUP_KEY
INSERT INTO ins_duplicate VALUES (1,'Antelope'),(2,'Cheetah'); INSERT INTO ins_duplicate VALUES (1,'Antelope'),(2,'Cheetah');
INSERT INTO ins_duplicate VALUES (1,'Antelope'),(2,'Cheetah') ON DUPLICATE KEY UPDATE animal='hybrid'; INSERT INTO ins_duplicate VALUES (1,'Antelope'),(2,'Cheetah') ON DUPLICATE KEY UPDATE animal='hybrid';
SELECT * FROM `ins_duplicate` ORDER BY `id`; SELECT * FROM `ins_duplicate` ORDER BY `id`;
...@@ -18,12 +18,12 @@ SELECT * FROM `ins_duplicate` ORDER BY `id`; ...@@ -18,12 +18,12 @@ SELECT * FROM `ins_duplicate` ORDER BY `id`;
BEGIN; BEGIN;
SELECT * FROM `ins_duplicate` ORDER BY `id`; SELECT * FROM `ins_duplicate` ORDER BY `id`;
--error ER_DUP_ENTRY --error ER_DUP_KEY
INSERT INTO ins_duplicate VALUES (1,'Antelope'); INSERT INTO ins_duplicate VALUES (1,'Antelope');
INSERT INTO ins_duplicate VALUES (1,'Antelope') ON DUPLICATE KEY UPDATE animal='Vegetable'; INSERT INTO ins_duplicate VALUES (1,'Antelope') ON DUPLICATE KEY UPDATE animal='Vegetable';
SELECT * FROM `ins_duplicate` ORDER BY `id`; SELECT * FROM `ins_duplicate` ORDER BY `id`;
--error ER_DUP_ENTRY --error ER_DUP_KEY
INSERT INTO ins_duplicate VALUES (1,'Antelope'),(2,'Cheetah'); INSERT INTO ins_duplicate VALUES (1,'Antelope'),(2,'Cheetah');
INSERT INTO ins_duplicate VALUES (1,'Antelope'),(2,'Cheetah') ON DUPLICATE KEY UPDATE animal='hybrid2'; INSERT INTO ins_duplicate VALUES (1,'Antelope'),(2,'Cheetah') ON DUPLICATE KEY UPDATE animal='hybrid2';
COMMIT; COMMIT;
...@@ -31,12 +31,12 @@ COMMIT; ...@@ -31,12 +31,12 @@ COMMIT;
BEGIN; BEGIN;
SELECT * FROM `ins_duplicate` ORDER BY `id`; SELECT * FROM `ins_duplicate` ORDER BY `id`;
--error ER_DUP_ENTRY --error ER_DUP_KEY
INSERT INTO ins_duplicate VALUES (1,'Antelope'); INSERT INTO ins_duplicate VALUES (1,'Antelope');
INSERT INTO ins_duplicate VALUES (1,'Antelope') ON DUPLICATE KEY UPDATE animal='Vegetable'; INSERT INTO ins_duplicate VALUES (1,'Antelope') ON DUPLICATE KEY UPDATE animal='Vegetable';
SELECT * FROM `ins_duplicate` ORDER BY `id`; SELECT * FROM `ins_duplicate` ORDER BY `id`;
--error ER_DUP_ENTRY --error ER_DUP_KEY
INSERT INTO ins_duplicate VALUES (1,'Antelope'),(2,'Cheetah'); INSERT INTO ins_duplicate VALUES (1,'Antelope'),(2,'Cheetah');
INSERT INTO ins_duplicate VALUES (1,'Antelope'),(2,'Cheetah') ON DUPLICATE KEY UPDATE animal='hybrid3'; INSERT INTO ins_duplicate VALUES (1,'Antelope'),(2,'Cheetah') ON DUPLICATE KEY UPDATE animal='hybrid3';
ROLLBACK; ROLLBACK;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment