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
e39256f8
Commit
e39256f8
authored
Mar 28, 2006
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tests with IGNORE and NULL values
parent
3372c31d
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 @
e39256f8
...
@@ -629,7 +629,23 @@ DELETE FROM t1;
...
@@ -629,7 +629,23 @@ DELETE FROM t1;
CREATE UNIQUE INDEX ai ON t1(a);
CREATE UNIQUE INDEX ai ON t1(a);
INSERT IGNORE INTO t1 VALUES (1);
INSERT IGNORE INTO t1 VALUES (1);
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;
SELECT * FROM t1 ORDER BY a;
a
a
NULL
1
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;
DROP TABLE t1;
mysql-test/t/ndb_insert.test
View file @
e39256f8
...
@@ -619,7 +619,15 @@ DELETE FROM t1;
...
@@ -619,7 +619,15 @@ DELETE FROM t1;
CREATE
UNIQUE
INDEX
ai
ON
t1
(
a
);
CREATE
UNIQUE
INDEX
ai
ON
t1
(
a
);
INSERT
IGNORE
INTO
t1
VALUES
(
1
);
INSERT
IGNORE
INTO
t1
VALUES
(
1
);
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
;
SELECT
*
FROM
t1
ORDER
BY
a
;
DROP
TABLE
t1
;
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
# 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