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
8788f96e
Commit
8788f96e
authored
Sep 07, 2004
by
magnus@neptunus.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for INSERT with multiple values and start/end_bulk_insert
parent
a9531f60
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
1 deletion
+42
-1
mysql-test/r/ndb_insert.result
mysql-test/r/ndb_insert.result
+12
-0
mysql-test/t/ndb_insert.test
mysql-test/t/ndb_insert.test
+29
-0
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+1
-1
No files found.
mysql-test/r/ndb_insert.result
View file @
8788f96e
...
...
@@ -416,4 +416,16 @@ INSERT INTO t1 VALUES
SELECT COUNT(*) FROM t1;
COUNT(*)
2000
INSERT INTO t1 VALUES
(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),
(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10);
ERROR 23000: Duplicate entry '10' for key 1
begin;
INSERT INTO t1 VALUES
(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),
(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10);
ERROR 23000: Duplicate entry '10' for key 1
commit;
insert into t1 select * from t1 where b < 10 order by pk1;
ERROR 23000: Duplicate entry '9' for key 1
DROP TABLE t1;
mysql-test/t/ndb_insert.test
View file @
8788f96e
...
...
@@ -429,5 +429,34 @@ INSERT INTO t1 VALUES
SELECT
COUNT
(
*
)
FROM
t1
;
#
# Insert duplicate rows
#
--
error
1062
INSERT
INTO
t1
VALUES
(
1
,
1
,
1
),(
2
,
2
,
2
),(
3
,
3
,
3
),(
4
,
4
,
4
),(
5
,
5
,
5
),
(
6
,
6
,
6
),(
7
,
7
,
7
),(
8
,
8
,
8
),(
9
,
9
,
9
),(
10
,
10
,
10
);
begin
;
#
# Insert duplicate rows, inside transaction
#
--
error
1062
INSERT
INTO
t1
VALUES
(
1
,
1
,
1
),(
2
,
2
,
2
),(
3
,
3
,
3
),(
4
,
4
,
4
),(
5
,
5
,
5
),
(
6
,
6
,
6
),(
7
,
7
,
7
),(
8
,
8
,
8
),(
9
,
9
,
9
),(
10
,
10
,
10
);
commit
;
#
# Insert duplicate rows using "insert .. select"
#
--
error
1062
insert
into
t1
select
*
from
t1
where
b
<
10
order
by
pk1
;
DROP
TABLE
t1
;
sql/ha_ndbcluster.cc
View file @
8788f96e
...
...
@@ -2401,7 +2401,7 @@ int ha_ndbcluster::end_bulk_insert()
rows_inserted
,
bulk_insert_rows
));
bulk_insert_not_flushed
=
false
;
if
(
trans
->
execute
(
NoCommit
)
!=
0
)
error
=
ndb_err
(
trans
);
my_errno
=
error
=
ndb_err
(
trans
);
}
rows_inserted
=
0
;
...
...
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