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
078b84bd
Commit
078b84bd
authored
Mar 28, 2006
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tests with IGNORE and NULL values
parent
aba5100d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
mysql-test/r/ndb_insert.result
mysql-test/r/ndb_insert.result
+16
-0
mysql-test/t/ndb_insert.test
mysql-test/t/ndb_insert.test
+8
-0
No files found.
mysql-test/r/ndb_insert.result
View file @
078b84bd
...
...
@@ -629,7 +629,23 @@ DELETE FROM t1;
CREATE UNIQUE INDEX ai ON t1(a);
INSERT IGNORE INTO t1 VALUES (1);
INSERT IGNORE INTO t1 VALUES (1);
INSERT IGNORE INTO t1 VALUES (NULL),(2);
SELECT * FROM t1 ORDER BY a;
a
NULL
1
2
DROP TABLE t1;
CREATE TABLE t1(pk INT NOT NULL PRIMARY KEY, a INT, UNIQUE (a)) ENGINE=ndb;
INSERT IGNORE INTO t1 VALUES (1,1),(2,2),(3,3);
INSERT IGNORE INTO t1 VALUES (4,NULL),(5,NULL),(6,NULL),(7,4);
SELECT * FROM t1 ORDER BY pk;
pk a
1 1
2 2
3 3
4 NULL
5 NULL
6 NULL
7 4
DROP TABLE t1;
mysql-test/t/ndb_insert.test
View file @
078b84bd
...
...
@@ -619,7 +619,15 @@ DELETE FROM t1;
CREATE
UNIQUE
INDEX
ai
ON
t1
(
a
);
INSERT
IGNORE
INTO
t1
VALUES
(
1
);
INSERT
IGNORE
INTO
t1
VALUES
(
1
);
INSERT
IGNORE
INTO
t1
VALUES
(
NULL
),(
2
);
SELECT
*
FROM
t1
ORDER
BY
a
;
DROP
TABLE
t1
;
# Ignore and NULL values
CREATE
TABLE
t1
(
pk
INT
NOT
NULL
PRIMARY
KEY
,
a
INT
,
UNIQUE
(
a
))
ENGINE
=
ndb
;
INSERT
IGNORE
INTO
t1
VALUES
(
1
,
1
),(
2
,
2
),(
3
,
3
);
INSERT
IGNORE
INTO
t1
VALUES
(
4
,
NULL
),(
5
,
NULL
),(
6
,
NULL
),(
7
,
4
);
SELECT
*
FROM
t1
ORDER
BY
pk
;
DROP
TABLE
t1
;
# End of 4.1 tests
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