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
9bde189d
Commit
9bde189d
authored
May 09, 2006
by
mskold@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed to use new syntax for PRIMARY/UNIQUE KEY USING HASH
parent
f7a56c0b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
mysql-test/r/ndb_index_unique.result
mysql-test/r/ndb_index_unique.result
+3
-3
mysql-test/r/ndb_partition_key.result
mysql-test/r/ndb_partition_key.result
+2
-2
mysql-test/t/ndb_index_unique.test
mysql-test/t/ndb_index_unique.test
+3
-3
mysql-test/t/ndb_partition_key.test
mysql-test/t/ndb_partition_key.test
+1
-1
No files found.
mysql-test/r/ndb_index_unique.result
View file @
9bde189d
...
@@ -99,7 +99,7 @@ CREATE TABLE t2 (
...
@@ -99,7 +99,7 @@ CREATE TABLE t2 (
a int unsigned NOT NULL PRIMARY KEY,
a int unsigned NOT NULL PRIMARY KEY,
b int unsigned not null,
b int unsigned not null,
c int unsigned not null,
c int unsigned not null,
UNIQUE
USING HASH (b, c)
UNIQUE
(b, c) USING HASH
) engine=ndbcluster;
) engine=ndbcluster;
insert t2 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2);
insert t2 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2);
select * from t2 where a = 3;
select * from t2 where a = 3;
...
@@ -142,14 +142,14 @@ CREATE TABLE t2 (
...
@@ -142,14 +142,14 @@ CREATE TABLE t2 (
a int unsigned NOT NULL PRIMARY KEY,
a int unsigned NOT NULL PRIMARY KEY,
b int unsigned not null,
b int unsigned not null,
c int unsigned,
c int unsigned,
UNIQUE
USING HASH (b, c)
UNIQUE
(b, c) USING HASH
) engine=ndbcluster;
) engine=ndbcluster;
ERROR 42000: Column 'c' is used with UNIQUE or INDEX but is not defined as NOT NULL
ERROR 42000: Column 'c' is used with UNIQUE or INDEX but is not defined as NOT NULL
CREATE TABLE t3 (
CREATE TABLE t3 (
a int unsigned NOT NULL,
a int unsigned NOT NULL,
b int unsigned not null,
b int unsigned not null,
c int unsigned,
c int unsigned,
PRIMARY KEY
USING HASH (a, b)
PRIMARY KEY
(a, b) USING HASH
) engine=ndbcluster;
) engine=ndbcluster;
insert t3 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2);
insert t3 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2);
select * from t3 where a = 3;
select * from t3 where a = 3;
...
...
mysql-test/r/ndb_partition_key.result
View file @
9bde189d
...
@@ -40,7 +40,7 @@ a b c
...
@@ -40,7 +40,7 @@ a b c
1 12 3
1 12 3
DROP TABLE t1;
DROP TABLE t1;
CREATE TABLE t1 (a INT, b CHAR(10) COLLATE latin1_bin, c INT, d INT,
CREATE TABLE t1 (a INT, b CHAR(10) COLLATE latin1_bin, c INT, d INT,
PRIMARY KEY
USING HASH (a,b,c)
)
PRIMARY KEY
(a,b,c) USING HASH
)
ENGINE=NDB
ENGINE=NDB
DEFAULT CHARSET=latin1
DEFAULT CHARSET=latin1
PARTITION BY KEY (b);
PARTITION BY KEY (b);
...
@@ -77,7 +77,7 @@ t1 CREATE TABLE `t1` (
...
@@ -77,7 +77,7 @@ t1 CREATE TABLE `t1` (
`b` char(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
`b` char(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
`c` int(11) NOT NULL DEFAULT '0',
`c` int(11) NOT NULL DEFAULT '0',
`d` int(11) DEFAULT NULL,
`d` int(11) DEFAULT NULL,
PRIMARY KEY
USING HASH (`a`,`b`,`c`)
PRIMARY KEY
(`a`,`b`,`c`) USING HASH
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY (b)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY (b)
DROP TABLE t1;
DROP TABLE t1;
CREATE TABLE t1 (a int not null primary key)
CREATE TABLE t1 (a int not null primary key)
...
...
mysql-test/t/ndb_index_unique.test
View file @
9bde189d
...
@@ -72,7 +72,7 @@ CREATE TABLE t2 (
...
@@ -72,7 +72,7 @@ CREATE TABLE t2 (
a
int
unsigned
NOT
NULL
PRIMARY
KEY
,
a
int
unsigned
NOT
NULL
PRIMARY
KEY
,
b
int
unsigned
not
null
,
b
int
unsigned
not
null
,
c
int
unsigned
not
null
,
c
int
unsigned
not
null
,
UNIQUE
USING
HASH
(
b
,
c
)
UNIQUE
(
b
,
c
)
USING
HASH
)
engine
=
ndbcluster
;
)
engine
=
ndbcluster
;
insert
t2
values
(
1
,
2
,
3
),
(
2
,
3
,
5
),
(
3
,
4
,
6
),
(
4
,
5
,
8
),
(
5
,
6
,
2
),
(
6
,
7
,
2
);
insert
t2
values
(
1
,
2
,
3
),
(
2
,
3
,
5
),
(
3
,
4
,
6
),
(
4
,
5
,
8
),
(
5
,
6
,
2
),
(
6
,
7
,
2
);
...
@@ -96,7 +96,7 @@ CREATE TABLE t2 (
...
@@ -96,7 +96,7 @@ CREATE TABLE t2 (
a
int
unsigned
NOT
NULL
PRIMARY
KEY
,
a
int
unsigned
NOT
NULL
PRIMARY
KEY
,
b
int
unsigned
not
null
,
b
int
unsigned
not
null
,
c
int
unsigned
,
c
int
unsigned
,
UNIQUE
USING
HASH
(
b
,
c
)
UNIQUE
(
b
,
c
)
USING
HASH
)
engine
=
ndbcluster
;
)
engine
=
ndbcluster
;
#
#
...
@@ -107,7 +107,7 @@ CREATE TABLE t3 (
...
@@ -107,7 +107,7 @@ CREATE TABLE t3 (
a
int
unsigned
NOT
NULL
,
a
int
unsigned
NOT
NULL
,
b
int
unsigned
not
null
,
b
int
unsigned
not
null
,
c
int
unsigned
,
c
int
unsigned
,
PRIMARY
KEY
USING
HASH
(
a
,
b
)
PRIMARY
KEY
(
a
,
b
)
USING
HASH
)
engine
=
ndbcluster
;
)
engine
=
ndbcluster
;
insert
t3
values
(
1
,
2
,
3
),
(
2
,
3
,
5
),
(
3
,
4
,
6
),
(
4
,
5
,
8
),
(
5
,
6
,
2
),
(
6
,
7
,
2
);
insert
t3
values
(
1
,
2
,
3
),
(
2
,
3
,
5
),
(
3
,
4
,
6
),
(
4
,
5
,
8
),
(
5
,
6
,
2
),
(
6
,
7
,
2
);
...
...
mysql-test/t/ndb_partition_key.test
View file @
9bde189d
...
@@ -45,7 +45,7 @@ DROP TABLE t1;
...
@@ -45,7 +45,7 @@ DROP TABLE t1;
#
#
CREATE
TABLE
t1
(
a
INT
,
b
CHAR
(
10
)
COLLATE
latin1_bin
,
c
INT
,
d
INT
,
CREATE
TABLE
t1
(
a
INT
,
b
CHAR
(
10
)
COLLATE
latin1_bin
,
c
INT
,
d
INT
,
PRIMARY
KEY
USING
HASH
(
a
,
b
,
c
)
)
PRIMARY
KEY
(
a
,
b
,
c
)
USING
HASH
)
ENGINE
=
NDB
ENGINE
=
NDB
DEFAULT
CHARSET
=
latin1
DEFAULT
CHARSET
=
latin1
PARTITION
BY
KEY
(
b
);
PARTITION
BY
KEY
(
b
);
...
...
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