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
61f63776
Commit
61f63776
authored
Jan 18, 2005
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compile error: moved inline
compile warning: changed eq_range -> eq_r
parent
609c488b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
45 deletions
+45
-45
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+45
-45
No files found.
sql/ha_ndbcluster.cc
View file @
61f63776
...
...
@@ -1112,6 +1112,47 @@ ha_ndbcluster::set_index_key(NdbOperation *op,
DBUG_RETURN
(
0
);
}
inline
int
ha_ndbcluster
::
define_read_attrs
(
byte
*
buf
,
NdbOperation
*
op
)
{
uint
i
;
THD
*
thd
=
current_thd
;
DBUG_ENTER
(
"define_read_attrs"
);
// Define attributes to read
for
(
i
=
0
;
i
<
table
->
s
->
fields
;
i
++
)
{
Field
*
field
=
table
->
field
[
i
];
if
((
thd
->
query_id
==
field
->
query_id
)
||
((
field
->
flags
&
PRI_KEY_FLAG
))
||
m_retrieve_all_fields
)
{
if
(
get_ndb_value
(
op
,
field
,
i
,
buf
))
ERR_RETURN
(
op
->
getNdbError
());
}
else
{
m_value
[
i
].
ptr
=
NULL
;
}
}
if
(
table
->
s
->
primary_key
==
MAX_KEY
)
{
DBUG_PRINT
(
"info"
,
(
"Getting hidden key"
));
// Scanning table with no primary key
int
hidden_no
=
table
->
s
->
fields
;
#ifndef DBUG_OFF
const
NDBTAB
*
tab
=
(
const
NDBTAB
*
)
m_table
;
if
(
!
tab
->
getColumn
(
hidden_no
))
DBUG_RETURN
(
1
);
#endif
if
(
get_ndb_value
(
op
,
NULL
,
hidden_no
,
NULL
))
ERR_RETURN
(
op
->
getNdbError
());
}
DBUG_RETURN
(
0
);
}
/*
Read one record from NDB using primary key
*/
...
...
@@ -1585,47 +1626,6 @@ int ha_ndbcluster::set_bounds(NdbIndexScanOperation *op,
DBUG_RETURN
(
0
);
}
inline
int
ha_ndbcluster
::
define_read_attrs
(
byte
*
buf
,
NdbOperation
*
op
)
{
uint
i
;
THD
*
thd
=
current_thd
;
DBUG_ENTER
(
"define_read_attrs"
);
// Define attributes to read
for
(
i
=
0
;
i
<
table
->
s
->
fields
;
i
++
)
{
Field
*
field
=
table
->
field
[
i
];
if
((
thd
->
query_id
==
field
->
query_id
)
||
((
field
->
flags
&
PRI_KEY_FLAG
))
||
m_retrieve_all_fields
)
{
if
(
get_ndb_value
(
op
,
field
,
i
,
buf
))
ERR_RETURN
(
op
->
getNdbError
());
}
else
{
m_value
[
i
].
ptr
=
NULL
;
}
}
if
(
table
->
s
->
primary_key
==
MAX_KEY
)
{
DBUG_PRINT
(
"info"
,
(
"Getting hidden key"
));
// Scanning table with no primary key
int
hidden_no
=
table
->
s
->
fields
;
#ifndef DBUG_OFF
const
NDBTAB
*
tab
=
(
const
NDBTAB
*
)
m_table
;
if
(
!
tab
->
getColumn
(
hidden_no
))
DBUG_RETURN
(
1
);
#endif
if
(
get_ndb_value
(
op
,
NULL
,
hidden_no
,
NULL
))
ERR_RETURN
(
op
->
getNdbError
());
}
DBUG_RETURN
(
0
);
}
/*
Start ordered index scan in NDB
*/
...
...
@@ -2487,13 +2487,13 @@ int ha_ndbcluster::index_read_last(byte * buf, const byte * key, uint key_len)
inline
int
ha_ndbcluster
::
read_range_first_to_buf
(
const
key_range
*
start_key
,
const
key_range
*
end_key
,
bool
eq_r
ange
,
bool
sorted
,
bool
eq_r
,
bool
sorted
,
byte
*
buf
)
{
KEY
*
key_info
;
int
error
=
1
;
DBUG_ENTER
(
"ha_ndbcluster::read_range_first_to_buf"
);
DBUG_PRINT
(
"info"
,
(
"eq_r
ange: %d, sorted: %d"
,
eq_range
,
sorted
));
DBUG_PRINT
(
"info"
,
(
"eq_r
: %d, sorted: %d"
,
eq_r
,
sorted
));
switch
(
get_index_type
(
active_index
)){
case
PRIMARY_KEY_ORDERED_INDEX
:
...
...
@@ -2534,14 +2534,14 @@ int ha_ndbcluster::read_range_first_to_buf(const key_range *start_key,
int
ha_ndbcluster
::
read_range_first
(
const
key_range
*
start_key
,
const
key_range
*
end_key
,
bool
eq_r
ange
,
bool
sorted
)
bool
eq_r
,
bool
sorted
)
{
byte
*
buf
=
table
->
record
[
0
];
DBUG_ENTER
(
"ha_ndbcluster::read_range_first"
);
DBUG_RETURN
(
read_range_first_to_buf
(
start_key
,
end_key
,
eq_r
ange
,
eq_r
,
sorted
,
buf
));
}
...
...
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