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
c9865cdb
Commit
c9865cdb
authored
Oct 01, 2009
by
Mikael Ronstrom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed no_ to num_ change for NDB handler
parent
226171ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+14
-14
No files found.
sql/ha_ndbcluster.cc
View file @
c9865cdb
...
@@ -9781,7 +9781,7 @@ void ha_ndbcluster::set_auto_partitions(partition_info *part_info)
...
@@ -9781,7 +9781,7 @@ void ha_ndbcluster::set_auto_partitions(partition_info *part_info)
int
ha_ndbcluster
::
set_range_data
(
void
*
tab_ref
,
partition_info
*
part_info
)
int
ha_ndbcluster
::
set_range_data
(
void
*
tab_ref
,
partition_info
*
part_info
)
{
{
NDBTAB
*
tab
=
(
NDBTAB
*
)
tab_ref
;
NDBTAB
*
tab
=
(
NDBTAB
*
)
tab_ref
;
int32
*
range_data
=
(
int32
*
)
my_malloc
(
part_info
->
n
o
_parts
*
sizeof
(
int32
),
int32
*
range_data
=
(
int32
*
)
my_malloc
(
part_info
->
n
um
_parts
*
sizeof
(
int32
),
MYF
(
0
));
MYF
(
0
));
uint
i
;
uint
i
;
int
error
=
0
;
int
error
=
0
;
...
@@ -9790,17 +9790,17 @@ int ha_ndbcluster::set_range_data(void *tab_ref, partition_info *part_info)
...
@@ -9790,17 +9790,17 @@ int ha_ndbcluster::set_range_data(void *tab_ref, partition_info *part_info)
if
(
!
range_data
)
if
(
!
range_data
)
{
{
mem_alloc_error
(
part_info
->
n
o
_parts
*
sizeof
(
int32
));
mem_alloc_error
(
part_info
->
n
um
_parts
*
sizeof
(
int32
));
DBUG_RETURN
(
1
);
DBUG_RETURN
(
1
);
}
}
for
(
i
=
0
;
i
<
part_info
->
n
o
_parts
;
i
++
)
for
(
i
=
0
;
i
<
part_info
->
n
um
_parts
;
i
++
)
{
{
longlong
range_val
=
part_info
->
range_int_array
[
i
];
longlong
range_val
=
part_info
->
range_int_array
[
i
];
if
(
unsigned_flag
)
if
(
unsigned_flag
)
range_val
-=
0x8000000000000000ULL
;
range_val
-=
0x8000000000000000ULL
;
if
(
range_val
<
INT_MIN32
||
range_val
>=
INT_MAX32
)
if
(
range_val
<
INT_MIN32
||
range_val
>=
INT_MAX32
)
{
{
if
((
i
!=
part_info
->
n
o
_parts
-
1
)
||
if
((
i
!=
part_info
->
n
um
_parts
-
1
)
||
(
range_val
!=
LONGLONG_MAX
))
(
range_val
!=
LONGLONG_MAX
))
{
{
my_error
(
ER_LIMITED_PART_RANGE
,
MYF
(
0
),
"NDB"
);
my_error
(
ER_LIMITED_PART_RANGE
,
MYF
(
0
),
"NDB"
);
...
@@ -9811,7 +9811,7 @@ int ha_ndbcluster::set_range_data(void *tab_ref, partition_info *part_info)
...
@@ -9811,7 +9811,7 @@ int ha_ndbcluster::set_range_data(void *tab_ref, partition_info *part_info)
}
}
range_data
[
i
]
=
(
int32
)
range_val
;
range_data
[
i
]
=
(
int32
)
range_val
;
}
}
tab
->
setRangeListData
(
range_data
,
sizeof
(
int32
)
*
part_info
->
n
o
_parts
);
tab
->
setRangeListData
(
range_data
,
sizeof
(
int32
)
*
part_info
->
n
um
_parts
);
error:
error:
my_free
((
char
*
)
range_data
,
MYF
(
0
));
my_free
((
char
*
)
range_data
,
MYF
(
0
));
DBUG_RETURN
(
error
);
DBUG_RETURN
(
error
);
...
@@ -9820,7 +9820,7 @@ int ha_ndbcluster::set_range_data(void *tab_ref, partition_info *part_info)
...
@@ -9820,7 +9820,7 @@ int ha_ndbcluster::set_range_data(void *tab_ref, partition_info *part_info)
int
ha_ndbcluster
::
set_list_data
(
void
*
tab_ref
,
partition_info
*
part_info
)
int
ha_ndbcluster
::
set_list_data
(
void
*
tab_ref
,
partition_info
*
part_info
)
{
{
NDBTAB
*
tab
=
(
NDBTAB
*
)
tab_ref
;
NDBTAB
*
tab
=
(
NDBTAB
*
)
tab_ref
;
int32
*
list_data
=
(
int32
*
)
my_malloc
(
part_info
->
n
o
_list_values
*
2
int32
*
list_data
=
(
int32
*
)
my_malloc
(
part_info
->
n
um
_list_values
*
2
*
sizeof
(
int32
),
MYF
(
0
));
*
sizeof
(
int32
),
MYF
(
0
));
uint32
*
part_id
,
i
;
uint32
*
part_id
,
i
;
int
error
=
0
;
int
error
=
0
;
...
@@ -9829,10 +9829,10 @@ int ha_ndbcluster::set_list_data(void *tab_ref, partition_info *part_info)
...
@@ -9829,10 +9829,10 @@ int ha_ndbcluster::set_list_data(void *tab_ref, partition_info *part_info)
if
(
!
list_data
)
if
(
!
list_data
)
{
{
mem_alloc_error
(
part_info
->
n
o
_list_values
*
2
*
sizeof
(
int32
));
mem_alloc_error
(
part_info
->
n
um
_list_values
*
2
*
sizeof
(
int32
));
DBUG_RETURN
(
1
);
DBUG_RETURN
(
1
);
}
}
for
(
i
=
0
;
i
<
part_info
->
n
o
_list_values
;
i
++
)
for
(
i
=
0
;
i
<
part_info
->
n
um
_list_values
;
i
++
)
{
{
LIST_PART_ENTRY
*
list_entry
=
&
part_info
->
list_array
[
i
];
LIST_PART_ENTRY
*
list_entry
=
&
part_info
->
list_array
[
i
];
longlong
list_val
=
list_entry
->
list_value
;
longlong
list_val
=
list_entry
->
list_value
;
...
@@ -9848,7 +9848,7 @@ int ha_ndbcluster::set_list_data(void *tab_ref, partition_info *part_info)
...
@@ -9848,7 +9848,7 @@ int ha_ndbcluster::set_list_data(void *tab_ref, partition_info *part_info)
part_id
=
(
uint32
*
)
&
list_data
[
2
*
i
+
1
];
part_id
=
(
uint32
*
)
&
list_data
[
2
*
i
+
1
];
*
part_id
=
list_entry
->
partition_id
;
*
part_id
=
list_entry
->
partition_id
;
}
}
tab
->
setRangeListData
(
list_data
,
2
*
sizeof
(
int32
)
*
part_info
->
n
o
_list_values
);
tab
->
setRangeListData
(
list_data
,
2
*
sizeof
(
int32
)
*
part_info
->
n
um
_list_values
);
error:
error:
my_free
((
char
*
)
list_data
,
MYF
(
0
));
my_free
((
char
*
)
list_data
,
MYF
(
0
));
DBUG_RETURN
(
error
);
DBUG_RETURN
(
error
);
...
@@ -9970,11 +9970,11 @@ uint ha_ndbcluster::set_up_partition_info(partition_info *part_info,
...
@@ -9970,11 +9970,11 @@ uint ha_ndbcluster::set_up_partition_info(partition_info *part_info,
ng
=
0
;
ng
=
0
;
ts_names
[
fd_index
]
=
part_elem
->
tablespace_name
;
ts_names
[
fd_index
]
=
part_elem
->
tablespace_name
;
frag_data
[
fd_index
++
]
=
ng
;
frag_data
[
fd_index
++
]
=
ng
;
}
while
(
++
j
<
part_info
->
n
o
_subparts
);
}
while
(
++
j
<
part_info
->
n
um
_subparts
);
}
}
first
=
FALSE
;
first
=
FALSE
;
}
while
(
++
i
<
part_info
->
n
o
_parts
);
}
while
(
++
i
<
part_info
->
n
um
_parts
);
tab
->
setDefaultNoPartitionsFlag
(
part_info
->
use_default_n
o
_partitions
);
tab
->
setDefaultNoPartitionsFlag
(
part_info
->
use_default_n
um
_partitions
);
tab
->
setLinearFlag
(
part_info
->
linear_hash_ind
);
tab
->
setLinearFlag
(
part_info
->
linear_hash_ind
);
{
{
ha_rows
max_rows
=
table_share
->
max_rows
;
ha_rows
max_rows
=
table_share
->
max_rows
;
...
@@ -10368,7 +10368,7 @@ int ndbcluster_alter_tablespace(handlerton *hton,
...
@@ -10368,7 +10368,7 @@ int ndbcluster_alter_tablespace(handlerton *hton,
}
}
bool
ha_ndbcluster
::
get_no_parts
(
const
char
*
name
,
uint
*
n
o
_parts
)
bool
ha_ndbcluster
::
get_no_parts
(
const
char
*
name
,
uint
*
n
um
_parts
)
{
{
Ndb
*
ndb
;
Ndb
*
ndb
;
NDBDICT
*
dict
;
NDBDICT
*
dict
;
...
@@ -10390,7 +10390,7 @@ bool ha_ndbcluster::get_no_parts(const char *name, uint *no_parts)
...
@@ -10390,7 +10390,7 @@ bool ha_ndbcluster::get_no_parts(const char *name, uint *no_parts)
Ndb_table_guard
ndbtab_g
(
dict
=
ndb
->
getDictionary
(),
m_tabname
);
Ndb_table_guard
ndbtab_g
(
dict
=
ndb
->
getDictionary
(),
m_tabname
);
if
(
!
ndbtab_g
.
get_table
())
if
(
!
ndbtab_g
.
get_table
())
ERR_BREAK
(
dict
->
getNdbError
(),
err
);
ERR_BREAK
(
dict
->
getNdbError
(),
err
);
*
n
o
_parts
=
ndbtab_g
.
get_table
()
->
getFragmentCount
();
*
n
um
_parts
=
ndbtab_g
.
get_table
()
->
getFragmentCount
();
DBUG_RETURN
(
FALSE
);
DBUG_RETURN
(
FALSE
);
}
}
...
...
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