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
fcf18daf
Commit
fcf18daf
authored
Apr 21, 2005
by
mskold@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-generated
parent
8c45ec56
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
6 deletions
+25
-6
mysql-test/r/ndb_update.result
mysql-test/r/ndb_update.result
+25
-6
No files found.
mysql-test/r/ndb_update.result
View file @
fcf18daf
...
@@ -2,13 +2,32 @@ DROP TABLE IF EXISTS t1;
...
@@ -2,13 +2,32 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
CREATE TABLE t1 (
pk1 INT NOT NULL PRIMARY KEY,
pk1 INT NOT NULL PRIMARY KEY,
b INT NOT NULL,
b INT NOT NULL,
c INT NOT NULL
c INT NOT NULL
UNIQUE
) ENGINE=ndbcluster;
) ENGINE=ndbcluster;
INSERT INTO t1 VALUES (0,
0, 1),(1,1,2),(2,2,3
);
INSERT INTO t1 VALUES (0,
1, 0),(1,2,1),(2,3,2
);
UPDATE t1 set b = c;
UPDATE t1 set b = c;
select * from t1 order by pk1;
select * from t1 order by pk1;
pk1 b c
pk1 b c
0 1 1
0 0 0
1 2 2
1 1 1
2 3 3
2 2 2
drop table t1;
UPDATE t1 set pk1 = 4 where pk1 = 1;
select * from t1 order by pk1;
pk1 b c
0 0 0
2 2 2
4 1 1
UPDATE t1 set pk1 = 1, c = 2 where pk1 = 4;
ERROR 23000: Duplicate entry '1' for key 1
select * from t1 order by pk1;
pk1 b c
0 0 0
2 2 2
4 1 1
UPDATE t1 set pk1 = pk1 + 10;
select * from t1 order by pk1;
pk1 b c
10 0 0
12 2 2
14 1 1
DROP TABLE IF EXISTS 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