Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
46bfebbb
Commit
46bfebbb
authored
Mar 09, 2020
by
Michael Erickson
Committed by
Sergei Petrunia
Mar 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change upsert test to expect new error
parent
fca2a06c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
mysql-test/suite/xpand/upsert.result
mysql-test/suite/xpand/upsert.result
+6
-6
mysql-test/suite/xpand/upsert.test
mysql-test/suite/xpand/upsert.test
+6
-6
No files found.
mysql-test/suite/xpand/upsert.result
View file @
46bfebbb
...
@@ -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`;
...
...
mysql-test/suite/xpand/upsert.test
View file @
46bfebbb
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment