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
451440f9
Commit
451440f9
authored
Dec 02, 2002
by
serg@serg.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
one more test
parent
e54134fd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
mysql-test/r/insert_update.result
mysql-test/r/insert_update.result
+7
-0
mysql-test/t/insert_update.test
mysql-test/t/insert_update.test
+2
-0
No files found.
mysql-test/r/insert_update.result
View file @
451440f9
...
@@ -41,4 +41,11 @@ a b c
...
@@ -41,4 +41,11 @@ a b c
3 4 120
3 4 120
5 6 30
5 6 30
8 9 60
8 9 60
INSERT t1 SET a=5 ON DUPLICATE KEY UPDATE SET b=0;
SELECT * FROM t1;
a b c
1 2 10
3 4 120
5 0 30
8 9 60
DROP TABLE t1;
DROP TABLE t1;
mysql-test/t/insert_update.test
View file @
451440f9
...
@@ -16,4 +16,6 @@ TRUNCATE TABLE t1;
...
@@ -16,4 +16,6 @@ TRUNCATE TABLE t1;
INSERT
t1
VALUES
(
1
,
2
,
10
),
(
3
,
4
,
20
);
INSERT
t1
VALUES
(
1
,
2
,
10
),
(
3
,
4
,
20
);
INSERT
t1
VALUES
(
5
,
6
,
30
),
(
7
,
4
,
40
),
(
8
,
9
,
60
)
ON
DUPLICATE
KEY
UPDATE
SET
c
=
c
+
100
;
INSERT
t1
VALUES
(
5
,
6
,
30
),
(
7
,
4
,
40
),
(
8
,
9
,
60
)
ON
DUPLICATE
KEY
UPDATE
SET
c
=
c
+
100
;
SELECT
*
FROM
t1
;
SELECT
*
FROM
t1
;
INSERT
t1
SET
a
=
5
ON
DUPLICATE
KEY
UPDATE
SET
b
=
0
;
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
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