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
d4c8576e
Commit
d4c8576e
authored
Jun 06, 2006
by
mikael@c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG#16002: After review fixes
Fixes for NDB
parent
bda7c1fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+6
-0
sql/sql_partition.cc
sql/sql_partition.cc
+3
-3
No files found.
sql/ha_ndbcluster.cc
View file @
d4c8576e
...
...
@@ -9499,6 +9499,7 @@ int ha_ndbcluster::set_range_data(void *tab_ref, partition_info *part_info)
MYF
(
0
));
uint
i
;
int
error
=
0
;
bool
unsigned_flag
=
part_info
->
part_expr
->
unsigned_flag
;
DBUG_ENTER
(
"set_range_data"
);
if
(
!
range_data
)
...
...
@@ -9509,6 +9510,8 @@ int ha_ndbcluster::set_range_data(void *tab_ref, partition_info *part_info)
for
(
i
=
0
;
i
<
part_info
->
no_parts
;
i
++
)
{
longlong
range_val
=
part_info
->
range_int_array
[
i
];
if
(
unsigned_flag
)
range_val
-=
0x8000000000000000ULL
;
if
(
range_val
<
INT_MIN32
||
range_val
>=
INT_MAX32
)
{
if
((
i
!=
part_info
->
no_parts
-
1
)
||
...
...
@@ -9535,6 +9538,7 @@ int ha_ndbcluster::set_list_data(void *tab_ref, partition_info *part_info)
*
sizeof
(
int32
),
MYF
(
0
));
uint32
*
part_id
,
i
;
int
error
=
0
;
bool
unsigned_flag
=
part_info
->
part_expr
->
unsigned_flag
;
DBUG_ENTER
(
"set_list_data"
);
if
(
!
list_data
)
...
...
@@ -9546,6 +9550,8 @@ int ha_ndbcluster::set_list_data(void *tab_ref, partition_info *part_info)
{
LIST_PART_ENTRY
*
list_entry
=
&
part_info
->
list_array
[
i
];
longlong
list_val
=
list_entry
->
list_value
;
if
(
unsigned_flag
)
list_val
-=
0x8000000000000000ULL
;
if
(
list_val
<
INT_MIN32
||
list_val
>
INT_MAX32
)
{
my_error
(
ER_LIMITED_PART_RANGE
,
MYF
(
0
),
"NDB"
);
...
...
sql/sql_partition.cc
View file @
d4c8576e
...
...
@@ -2394,9 +2394,9 @@ int get_partition_id_list(partition_info *part_info,
}
goto
notfound
;
}
*
func_value
=
part_func_value
;
if
(
unsigned_flag
)
part_func_value
-=
0x8000000000000000ULL
;
*
func_value
=
part_func_value
;
while
(
max_list_index
>=
min_list_index
)
{
list_index
=
(
max_list_index
+
min_list_index
)
>>
1
;
...
...
@@ -2509,16 +2509,16 @@ int get_partition_id_range(partition_info *part_info,
uint
loc_part_id
;
longlong
part_func_value
=
part_val_int
(
part_info
->
part_expr
);
bool
unsigned_flag
=
part_info
->
part_expr
->
unsigned_flag
;
DBUG_ENTER
(
"get_partition_id_
int_
range"
);
DBUG_ENTER
(
"get_partition_id_range"
);
if
(
part_info
->
part_expr
->
null_value
)
{
*
part_id
=
0
;
DBUG_RETURN
(
0
);
}
*
func_value
=
part_func_value
;
if
(
unsigned_flag
)
part_func_value
-=
0x8000000000000000ULL
;
*
func_value
=
part_func_value
;
while
(
max_part_id
>
min_part_id
)
{
loc_part_id
=
(
max_part_id
+
min_part_id
+
1
)
>>
1
;
...
...
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