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
52d5941b
Commit
52d5941b
authored
Jul 09, 2010
by
Mattias Jonsson
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
50561461
70b02d3a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
+14
-10
sql/ha_partition.h
sql/ha_partition.h
+1
-5
sql/handler.h
sql/handler.h
+13
-5
No files found.
sql/ha_partition.h
View file @
52d5941b
...
@@ -53,8 +53,7 @@ typedef struct st_ha_data_partition
...
@@ -53,8 +53,7 @@ typedef struct st_ha_data_partition
HA_CAN_FULLTEXT | \
HA_CAN_FULLTEXT | \
HA_DUPLICATE_POS | \
HA_DUPLICATE_POS | \
HA_CAN_SQL_HANDLER | \
HA_CAN_SQL_HANDLER | \
HA_CAN_INSERT_DELAYED | \
HA_CAN_INSERT_DELAYED)
HA_PRIMARY_KEY_REQUIRED_FOR_POSITION)
class
ha_partition
:
public
handler
class
ha_partition
:
public
handler
{
{
private:
private:
...
@@ -775,9 +774,6 @@ public:
...
@@ -775,9 +774,6 @@ public:
HA_PRIMARY_KEY_REQUIRED_FOR_POSITION:
HA_PRIMARY_KEY_REQUIRED_FOR_POSITION:
Does the storage engine need a PK for position?
Does the storage engine need a PK for position?
Used with hidden primary key in InnoDB.
Hidden primary keys cannot be supported by partitioning, since the
partitioning expressions columns must be a part of the primary key.
(InnoDB)
(InnoDB)
HA_FILE_BASED is always set for partition handler since we use a
HA_FILE_BASED is always set for partition handler since we use a
...
...
sql/handler.h
View file @
52d5941b
...
@@ -93,7 +93,10 @@
...
@@ -93,7 +93,10 @@
#define HA_PRIMARY_KEY_IN_READ_INDEX (1 << 15)
#define HA_PRIMARY_KEY_IN_READ_INDEX (1 << 15)
/*
/*
If HA_PRIMARY_KEY_REQUIRED_FOR_POSITION is set, it means that to position()
If HA_PRIMARY_KEY_REQUIRED_FOR_POSITION is set, it means that to position()
uses a primary key. Without primary key, we can't call position().
uses a primary key given by the record argument.
Without primary key, we can't call position().
If not set, the position is returned as the current rows position
regardless of what argument is given.
*/
*/
#define HA_PRIMARY_KEY_REQUIRED_FOR_POSITION (1 << 16)
#define HA_PRIMARY_KEY_REQUIRED_FOR_POSITION (1 << 16)
#define HA_CAN_RTREEKEYS (1 << 17)
#define HA_CAN_RTREEKEYS (1 << 17)
...
@@ -1446,10 +1449,9 @@ public:
...
@@ -1446,10 +1449,9 @@ public:
virtual
int
rnd_next
(
uchar
*
buf
)
=
0
;
virtual
int
rnd_next
(
uchar
*
buf
)
=
0
;
virtual
int
rnd_pos
(
uchar
*
buf
,
uchar
*
pos
)
=
0
;
virtual
int
rnd_pos
(
uchar
*
buf
,
uchar
*
pos
)
=
0
;
/**
/**
One has to use this method when to find
This function only works for handlers having
random position by record as the plain
HA_PRIMARY_KEY_REQUIRED_FOR_POSITION set.
position() call doesn't work for some
It will return the row with the PK given in the record argument.
handlers for random position.
*/
*/
virtual
int
rnd_pos_by_record
(
uchar
*
record
)
virtual
int
rnd_pos_by_record
(
uchar
*
record
)
{
{
...
@@ -1467,6 +1469,12 @@ public:
...
@@ -1467,6 +1469,12 @@ public:
{
return
HA_ERR_WRONG_COMMAND
;
}
{
return
HA_ERR_WRONG_COMMAND
;
}
virtual
ha_rows
records_in_range
(
uint
inx
,
key_range
*
min_key
,
key_range
*
max_key
)
virtual
ha_rows
records_in_range
(
uint
inx
,
key_range
*
min_key
,
key_range
*
max_key
)
{
return
(
ha_rows
)
10
;
}
{
return
(
ha_rows
)
10
;
}
/*
If HA_PRIMARY_KEY_REQUIRED_FOR_POSITION is set, then it sets ref
(reference to the row, aka position, with the primary key given in
the record).
Otherwise it set ref to the current row.
*/
virtual
void
position
(
const
uchar
*
record
)
=
0
;
virtual
void
position
(
const
uchar
*
record
)
=
0
;
virtual
int
info
(
uint
)
=
0
;
// see my_base.h for full description
virtual
int
info
(
uint
)
=
0
;
// see my_base.h for full description
virtual
void
get_dynamic_partition_info
(
PARTITION_INFO
*
stat_info
,
virtual
void
get_dynamic_partition_info
(
PARTITION_INFO
*
stat_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