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
67cbb3b1
Commit
67cbb3b1
authored
Jan 11, 2006
by
mskold@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restructered index management, to prepare for add/drop index (WL#1892)
parent
0f7214d9
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
291 additions
and
102 deletions
+291
-102
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+268
-98
sql/ha_ndbcluster.h
sql/ha_ndbcluster.h
+23
-4
No files found.
sql/ha_ndbcluster.cc
View file @
67cbb3b1
This diff is collapsed.
Click to expand it.
sql/ha_ndbcluster.h
View file @
67cbb3b1
...
...
@@ -54,8 +54,16 @@ typedef enum ndb_index_type {
ORDERED_INDEX
=
5
}
NDB_INDEX_TYPE
;
typedef
enum
ndb_index_status
{
UNDEFINED
=
0
,
CREATED
=
1
,
ACTIVE
=
2
,
TO_BE_DROPPED
=
3
}
NDB_INDEX_STATUS
;
typedef
struct
ndb_index_data
{
NDB_INDEX_TYPE
type
;
NDB_INDEX_STATUS
status
;
void
*
index
;
void
*
unique_index
;
unsigned
char
*
unique_index_attrid_map
;
...
...
@@ -622,17 +630,28 @@ static void set_tabname(const char *pathname, char *tabname);
const
char
*
path
,
const
char
*
db
,
const
char
*
table_name
);
int
intern_drop
_table
();
int
create_index
(
const
char
*
name
,
KEY
*
key_info
,
bool
unique
);
int
drop_ndb
_table
();
int
create_
ndb_
index
(
const
char
*
name
,
KEY
*
key_info
,
bool
unique
);
int
create_ordered_index
(
const
char
*
name
,
KEY
*
key_info
);
int
create_unique_index
(
const
char
*
name
,
KEY
*
key_info
);
int
create_index
(
const
char
*
name
,
KEY
*
key_info
,
NDB_INDEX_TYPE
idx_type
,
uint
idx_no
);
int
drop_ndb_index
(
const
char
*
name
);
// Index list management
int
create_indexes
(
Ndb
*
ndb
,
TABLE
*
tab
);
void
clear_index
(
int
i
);
void
clear_indexes
();
int
open_indexes
(
Ndb
*
ndb
,
TABLE
*
tab
);
int
renumber_indexes
(
Ndb
*
ndb
,
TABLE
*
tab
);
int
drop_indexes
(
Ndb
*
ndb
,
TABLE
*
tab
);
int
add_index_handle
(
THD
*
thd
,
NdbDictionary
::
Dictionary
*
dict
,
KEY
*
key_info
,
const
char
*
index_name
,
uint
index_no
);
int
initialize_autoincrement
(
const
void
*
table
);
enum
ILBP
{
ILBP_CREATE
=
0
,
ILBP_OPEN
=
1
};
// Index List Build Phase
int
build_index_list
(
Ndb
*
ndb
,
TABLE
*
tab
,
enum
ILBP
phase
);
int
get_metadata
(
const
char
*
path
);
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
;
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