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
e409e693
Commit
e409e693
authored
May 08, 2013
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#20 cleanup some static analysis issues
parent
2090a320
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
11 deletions
+3
-11
storage/tokudb/ha_tokudb_update.cc
storage/tokudb/ha_tokudb_update.cc
+0
-10
storage/tokudb/tokudb_buffer.h
storage/tokudb/tokudb_buffer.h
+3
-1
No files found.
storage/tokudb/ha_tokudb_update.cc
View file @
e409e693
...
...
@@ -158,7 +158,6 @@ static uint32_t blob_field_index(TABLE *table, KEY_AND_COL_INFO *kc_info, uint i
int
ha_tokudb
::
fast_update
(
THD
*
thd
,
List
<
Item
>
&
update_fields
,
List
<
Item
>
&
update_values
,
Item
*
conds
)
{
TOKUDB_DBUG_ENTER
(
"ha_tokudb::fast_update"
);
int
error
=
0
;
unsigned
line
=
0
;
// debug
if
(
tokudb_debug
&
TOKUDB_DEBUG_UPSERT
)
{
dump_item_list
(
"fields"
,
update_fields
);
...
...
@@ -170,24 +169,20 @@ int ha_tokudb::fast_update(THD *thd, List<Item> &update_fields, List<Item> &upda
if
(
update_fields
.
elements
<
1
||
update_fields
.
elements
!=
update_values
.
elements
)
{
error
=
ENOTSUP
;
// something is fishy with the parameters
line
=
__LINE__
;
goto
return_error
;
}
if
(
!
check_fast_update
(
thd
,
update_fields
,
update_values
,
conds
))
{
error
=
ENOTSUP
;
line
=
__LINE__
;
goto
check_error
;
}
error
=
send_update_message
(
update_fields
,
update_values
,
conds
,
transaction
);
if
(
error
!=
0
)
{
line
=
__LINE__
;
goto
check_error
;
}
check_error:
line
=
line
;
// debug
if
(
error
!=
0
)
{
if
(
get_disable_slow_update
(
thd
))
error
=
HA_ERR_UNSUPPORTED
;
...
...
@@ -746,7 +741,6 @@ int ha_tokudb::upsert(THD *thd, List<Item> &update_fields, List<Item> &update_va
TOKUDB_DBUG_ENTER
(
"ha_tokudb::upsert"
);
int
error
=
0
;
unsigned
line
=
0
;
// debug
if
(
tokudb_debug
&
TOKUDB_DEBUG_UPSERT
)
{
fprintf
(
stderr
,
"upsert
\n
"
);
...
...
@@ -756,24 +750,20 @@ int ha_tokudb::upsert(THD *thd, List<Item> &update_fields, List<Item> &update_va
if
(
update_fields
.
elements
<
1
||
update_fields
.
elements
!=
update_values
.
elements
)
{
error
=
ENOTSUP
;
// not an upsert or something is fishy with the parameters
line
=
__LINE__
;
goto
return_error
;
}
if
(
!
check_upsert
(
thd
,
update_fields
,
update_values
))
{
error
=
ENOTSUP
;
line
=
__LINE__
;
goto
check_error
;
}
error
=
send_upsert_message
(
thd
,
update_fields
,
update_values
,
transaction
);
if
(
error
!=
0
)
{
line
=
__LINE__
;
goto
check_error
;
}
check_error:
line
=
line
;
// debug
if
(
error
!=
0
)
{
if
(
get_disable_slow_upsert
(
thd
))
error
=
HA_ERR_UNSUPPORTED
;
...
...
storage/tokudb/tokudb_buffer.h
View file @
e409e693
...
...
@@ -120,7 +120,9 @@ class buffer {
if
(
new_limit
<
m_size
+
s
)
new_limit
=
m_size
+
s
;
assert
(
!
m_is_static
);
m_data
=
realloc
(
m_data
,
new_limit
);
void
*
new_data
=
realloc
(
m_data
,
new_limit
);
assert
(
new_data
!=
NULL
);
m_data
=
new_data
;
m_limit
=
new_limit
;
}
}
...
...
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