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
28c8ac88
Commit
28c8ac88
authored
May 25, 2004
by
magnus@neptunus.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrected index_flags returned when index are created with USING HASH
Updated ndb_ test cases
parent
2bee88a4
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
107 additions
and
15 deletions
+107
-15
mysql-test/r/ndb_autodiscover.result
mysql-test/r/ndb_autodiscover.result
+4
-1
mysql-test/r/ndb_basic.result
mysql-test/r/ndb_basic.result
+9
-9
mysql-test/r/ndb_index_unique.result
mysql-test/r/ndb_index_unique.result
+42
-0
mysql-test/t/ndb_autodiscover.test
mysql-test/t/ndb_autodiscover.test
+4
-0
mysql-test/t/ndb_basic.test
mysql-test/t/ndb_basic.test
+3
-3
mysql-test/t/ndb_index_unique.test
mysql-test/t/ndb_index_unique.test
+41
-0
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+4
-2
No files found.
mysql-test/r/ndb_autodiscover.result
View file @
28c8ac88
...
...
@@ -128,7 +128,10 @@ select * from t4;
id name
1 Automatic
select * from t4;
ERROR HY000: Got error 284 'Table not defined in transaction coordinator' from NDBCLUSTER
ERROR HY000: Got error 284 'Table not defined in transaction coordinator' from ndbcluster
flush table t4;
select * from t4;
ERROR HY000: Can't open file: 't4' (errno: 709)
show status like 'handler_discover%';
Variable_name Value
Handler_discover 0
...
...
mysql-test/r/ndb_basic.result
View file @
28c8ac88
...
...
@@ -303,26 +303,26 @@ insert into t7 values
("Street Road 78", 3, 92, 3),
("Main street 89C", 5, 71, 4),
(NULL, 8, NULL, 12);
select * from t7;
select * from t7
order by a
;
adress a b c
Street Road 78 3 92 3
Highway 3456 1 23 2
NULL 8 NULL 12
Street Road 78 3 92 3
Main street 89C 5 71 4
select a, b from t7;
NULL 8 NULL 12
select a, b from t7 order by a;
a b
3 92
1 23
8 NULL
3 92
5 71
8 NULL
update t7 set adress="End of road 09" where a=3;
update t7 set adress="Gatuvägen 90C" where a=5 and c=4;
update t7 set adress="No adress" where adress is NULL;
select * from t7;
select * from t7
order by a
;
adress a b c
Gatuvägen 90C 5 71 4
End of road 09 3 92 3
Highway 3456 1 23 2
End of road 09 3 92 3
Gatuvägen 90C 5 71 4
No adress 8 NULL 12
select * from t7 where a=1 and c=2;
adress a b c
...
...
mysql-test/r/ndb_index_unique.result
View file @
28c8ac88
...
...
@@ -22,6 +22,48 @@ select * from t1 where b = 4 order by a;
a b c
3 4 6
drop table t1;
CREATE TABLE t2 (
a int unsigned NOT NULL PRIMARY KEY,
b int unsigned not null,
c int unsigned not null,
UNIQUE USING HASH (b, c)
) engine=ndbcluster;
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;
a b c
3 4 6
select * from t2 where b = 4;
a b c
3 4 6
select * from t2 where c = 6;
a b c
3 4 6
insert into t2 values(7,8,3);
select * from t2 where b = 4 order by a;
a b c
3 4 6
drop table t2;
CREATE TABLE t3 (
a int unsigned NOT NULL,
b int unsigned not null,
c int unsigned,
PRIMARY KEY USING HASH (a, b)
) engine=ndbcluster;
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;
a b c
3 4 6
select * from t3 where b = 4;
a b c
3 4 6
select * from t3 where c = 6;
a b c
3 4 6
insert into t3 values(7,8,3);
select * from t3 where b = 4 order by a;
a b c
3 4 6
drop table t3;
CREATE TABLE t1 (
cid smallint(5) unsigned NOT NULL default '0',
cv varchar(250) NOT NULL default '',
...
...
mysql-test/t/ndb_autodiscover.test
View file @
28c8ac88
...
...
@@ -166,6 +166,10 @@ system drop_tab -c "host=localhost:2200;nodeid=5" -d test t4 > /dev/null ;
--
error
1296
select
*
from
t4
;
flush
table
t4
;
--
error
1016
select
*
from
t4
;
show
status
like
'handler_discover%'
;
drop
table
t4
;
flush
tables
;
...
...
mysql-test/t/ndb_basic.test
View file @
28c8ac88
...
...
@@ -299,13 +299,13 @@ insert into t7 values
(
"Street Road 78"
,
3
,
92
,
3
),
(
"Main street 89C"
,
5
,
71
,
4
),
(
NULL
,
8
,
NULL
,
12
);
select
*
from
t7
;
select
a
,
b
from
t7
;
select
*
from
t7
order
by
a
;
select
a
,
b
from
t7
order
by
a
;
update
t7
set
adress
=
"End of road 09"
where
a
=
3
;
update
t7
set
adress
=
"Gatuvägen 90C"
where
a
=
5
and
c
=
4
;
update
t7
set
adress
=
"No adress"
where
adress
is
NULL
;
select
*
from
t7
;
select
*
from
t7
order
by
a
;
select
*
from
t7
where
a
=
1
and
c
=
2
;
delete
from
t7
where
a
=
1
;
delete
from
t7
where
a
=
3
and
c
=
3
;
...
...
mysql-test/t/ndb_index_unique.test
View file @
28c8ac88
...
...
@@ -23,6 +23,47 @@ select * from t1 where b = 4 order by a;
drop
table
t1
;
#
# Show use of UNIQUE USING HASH indexes
#
CREATE
TABLE
t2
(
a
int
unsigned
NOT
NULL
PRIMARY
KEY
,
b
int
unsigned
not
null
,
c
int
unsigned
not
null
,
UNIQUE
USING
HASH
(
b
,
c
)
)
engine
=
ndbcluster
;
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
b
=
4
;
select
*
from
t2
where
c
=
6
;
insert
into
t2
values
(
7
,
8
,
3
);
select
*
from
t2
where
b
=
4
order
by
a
;
drop
table
t2
;
#
# Show use of PRIMARY KEY USING HASH indexes
#
CREATE
TABLE
t3
(
a
int
unsigned
NOT
NULL
,
b
int
unsigned
not
null
,
c
int
unsigned
,
PRIMARY
KEY
USING
HASH
(
a
,
b
)
)
engine
=
ndbcluster
;
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
b
=
4
;
select
*
from
t3
where
c
=
6
;
insert
into
t3
values
(
7
,
8
,
3
);
select
*
from
t3
where
b
=
4
order
by
a
;
drop
table
t3
;
#
# More complex tables
#
...
...
sql/ha_ndbcluster.cc
View file @
28c8ac88
...
...
@@ -474,7 +474,8 @@ static const ulong index_type_flags[]=
0
,
/* PRIMARY_KEY_INDEX */
HA_NOT_READ_PREFIX_LAST
,
HA_NOT_READ_PREFIX_LAST
|
HA_ONLY_WHOLE_INDEX
,
/* PRIMARY_KEY_ORDERED_INDEX */
/*
...
...
@@ -485,7 +486,8 @@ static const ulong index_type_flags[]=
HA_NOT_READ_PREFIX_LAST
,
/* UNIQUE_INDEX */
HA_NOT_READ_PREFIX_LAST
,
HA_NOT_READ_PREFIX_LAST
|
HA_ONLY_WHOLE_INDEX
,
/* UNIQUE_ORDERED_INDEX */
HA_NOT_READ_PREFIX_LAST
,
...
...
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