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
9dc829eb
Commit
9dc829eb
authored
Mar 09, 2006
by
mskold@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into mysql.com:/usr/local/home/marty/MySQL/mysql-5.1-new
parents
e4bdc16f
f2ad519e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+6
-4
sql/ha_ndbcluster.h
sql/ha_ndbcluster.h
+2
-1
No files found.
sql/ha_ndbcluster.cc
View file @
9dc829eb
...
...
@@ -1367,15 +1367,17 @@ int ha_ndbcluster::drop_indexes(Ndb *ndb, TABLE *tab)
*/
NDB_INDEX_TYPE
ha_ndbcluster
::
get_index_type_from_table
(
uint
inx
)
const
{
return
get_index_type_from_key
(
inx
,
table_share
->
key_info
);
return
get_index_type_from_key
(
inx
,
table_share
->
key_info
,
inx
==
table_share
->
primary_key
);
}
NDB_INDEX_TYPE
ha_ndbcluster
::
get_index_type_from_key
(
uint
inx
,
KEY
*
key_info
)
const
KEY
*
key_info
,
bool
primary
)
const
{
bool
is_hash_index
=
(
key_info
[
inx
].
algorithm
==
HA_KEY_ALG_HASH
);
if
(
inx
==
table_share
->
primary_ke
y
)
if
(
primar
y
)
return
is_hash_index
?
PRIMARY_KEY_INDEX
:
PRIMARY_KEY_ORDERED_INDEX
;
return
((
key_info
[
inx
].
flags
&
HA_NOSAME
)
?
...
...
@@ -4644,7 +4646,7 @@ int ha_ndbcluster::add_index(TABLE *table_arg,
KEY
*
key
=
key_info
+
idx
;
KEY_PART_INFO
*
key_part
=
key
->
key_part
;
KEY_PART_INFO
*
end
=
key_part
+
key
->
key_parts
;
NDB_INDEX_TYPE
idx_type
=
get_index_type_from_key
(
idx
,
key
);
NDB_INDEX_TYPE
idx_type
=
get_index_type_from_key
(
idx
,
key
,
false
);
DBUG_PRINT
(
"info"
,
(
"Adding index: '%s'"
,
key_info
[
idx
].
name
));
// Add fields to key_part struct
for
(;
key_part
!=
end
;
key_part
++
)
...
...
sql/ha_ndbcluster.h
View file @
9dc829eb
...
...
@@ -719,7 +719,8 @@ private:
void
release_metadata
();
NDB_INDEX_TYPE
get_index_type
(
uint
idx_no
)
const
;
NDB_INDEX_TYPE
get_index_type_from_table
(
uint
index_no
)
const
;
NDB_INDEX_TYPE
get_index_type_from_key
(
uint
index_no
,
KEY
*
key_info
)
const
;
NDB_INDEX_TYPE
get_index_type_from_key
(
uint
index_no
,
KEY
*
key_info
,
bool
primary
)
const
;
int
check_index_fields_not_null
(
uint
index_no
);
uint
set_up_partition_info
(
partition_info
*
part_info
,
...
...
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