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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
86b33f36
Commit
86b33f36
authored
Nov 02, 2004
by
ram@gw.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A fix (bug #6331: INSERT IGNORE .. SELECT breaks subsequent inserts).
parent
d84dbdfc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
1 deletion
+46
-1
mysql-test/r/ndb_insert.result
mysql-test/r/ndb_insert.result
+29
-0
mysql-test/t/ndb_insert.test
mysql-test/t/ndb_insert.test
+15
-0
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+2
-1
No files found.
mysql-test/r/ndb_insert.result
View file @
86b33f36
...
@@ -557,3 +557,32 @@ select * from t1 where pk1=1;
...
@@ -557,3 +557,32 @@ select * from t1 where pk1=1;
pk1 b c
pk1 b c
1 2 3
1 2 3
DROP TABLE t1;
DROP TABLE t1;
CREATE TABLE t1(a INT) ENGINE=ndb;
INSERT IGNORE INTO t1 VALUES (1);
INSERT IGNORE INTO t1 VALUES (1);
INSERT IGNORE INTO t1 SELECT a FROM t1;
INSERT IGNORE INTO t1 SELECT a FROM t1;
INSERT IGNORE INTO t1 SELECT a FROM t1;
INSERT IGNORE INTO t1 VALUES (1);
INSERT IGNORE INTO t1 VALUES (1);
SELECT * FROM t1;
a
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
DROP TABLE t1;
mysql-test/t/ndb_insert.test
View file @
86b33f36
...
@@ -583,3 +583,18 @@ INSERT INTO t1 VALUES(1,1,1) ON DUPLICATE KEY UPDATE b=79;
...
@@ -583,3 +583,18 @@ INSERT INTO t1 VALUES(1,1,1) ON DUPLICATE KEY UPDATE b=79;
select
*
from
t1
where
pk1
=
1
;
select
*
from
t1
where
pk1
=
1
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
#
# Bug #6331: problem with 'insert ignore'
#
CREATE
TABLE
t1
(
a
INT
)
ENGINE
=
ndb
;
INSERT
IGNORE
INTO
t1
VALUES
(
1
);
INSERT
IGNORE
INTO
t1
VALUES
(
1
);
INSERT
IGNORE
INTO
t1
SELECT
a
FROM
t1
;
INSERT
IGNORE
INTO
t1
SELECT
a
FROM
t1
;
INSERT
IGNORE
INTO
t1
SELECT
a
FROM
t1
;
INSERT
IGNORE
INTO
t1
VALUES
(
1
);
INSERT
IGNORE
INTO
t1
VALUES
(
1
);
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
sql/ha_ndbcluster.cc
View file @
86b33f36
...
@@ -2650,7 +2650,8 @@ int ha_ndbcluster::extra(enum ha_extra_function operation)
...
@@ -2650,7 +2650,8 @@ int ha_ndbcluster::extra(enum ha_extra_function operation)
m_use_write
=
TRUE
;
m_use_write
=
TRUE
;
}
else
}
else
{
{
m_ignore_dup_key_not_supported
=
TRUE
;
if
(
table
->
keys
)
m_ignore_dup_key_not_supported
=
TRUE
;
}
}
break
;
break
;
case
HA_EXTRA_NO_IGNORE_DUP_KEY
:
case
HA_EXTRA_NO_IGNORE_DUP_KEY
:
...
...
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