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
46dcf661
Commit
46dcf661
authored
Jun 28, 2006
by
jimw@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Optimize stack usage of ha_federated::update_row().
parent
a1c2dc5e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
20 deletions
+13
-20
sql/ha_federated.cc
sql/ha_federated.cc
+13
-20
No files found.
sql/ha_federated.cc
View file @
46dcf661
...
...
@@ -1817,18 +1817,12 @@ int ha_federated::update_row(const byte *old_data, byte *new_data)
/*
buffers for following strings
*/
char
old_field_value_buffer
[
STRING_BUFFER_USUAL_SIZE
];
char
new_field_value_buffer
[
STRING_BUFFER_USUAL_SIZE
];
char
field_value_buffer
[
STRING_BUFFER_USUAL_SIZE
];
char
update_buffer
[
FEDERATED_QUERY_BUFFER_SIZE
];
char
where_buffer
[
FEDERATED_QUERY_BUFFER_SIZE
];
/* stores the value to be replaced of the field were are updating */
String
old_field_value
(
old_field_value_buffer
,
sizeof
(
old_field_value_buffer
),
&
my_charset_bin
);
/* stores the new value of the field */
String
new_field_value
(
new_field_value_buffer
,
sizeof
(
new_field_value_buffer
),
/* Work area for field values */
String
field_value
(
field_value_buffer
,
sizeof
(
field_value_buffer
),
&
my_charset_bin
);
/* stores the update query */
String
update_string
(
update_buffer
,
...
...
@@ -1842,8 +1836,7 @@ int ha_federated::update_row(const byte *old_data, byte *new_data)
/*
set string lengths to 0 to avoid misc chars in string
*/
old_field_value
.
length
(
0
);
new_field_value
.
length
(
0
);
field_value
.
length
(
0
);
update_string
.
length
(
0
);
where_string
.
length
(
0
);
...
...
@@ -1874,10 +1867,10 @@ int ha_federated::update_row(const byte *old_data, byte *new_data)
else
{
/* otherwise = */
(
*
field
)
->
val_str
(
&
new_
field_value
);
(
*
field
)
->
quote_data
(
&
new_
field_value
);
update_string
.
append
(
new_
field_value
);
new_
field_value
.
length
(
0
);
(
*
field
)
->
val_str
(
&
field_value
);
(
*
field
)
->
quote_data
(
&
field_value
);
update_string
.
append
(
field_value
);
field_value
.
length
(
0
);
}
if
(
field_in_record_is_null
(
table
,
*
field
,
(
char
*
)
old_data
))
...
...
@@ -1885,11 +1878,11 @@ int ha_federated::update_row(const byte *old_data, byte *new_data)
else
{
where_string
.
append
(
FEDERATED_EQ
);
(
*
field
)
->
val_str
(
&
old_
field_value
,
(
*
field
)
->
val_str
(
&
field_value
,
(
char
*
)
(
old_data
+
(
*
field
)
->
offset
()));
(
*
field
)
->
quote_data
(
&
old_
field_value
);
where_string
.
append
(
old_
field_value
);
old_
field_value
.
length
(
0
);
(
*
field
)
->
quote_data
(
&
field_value
);
where_string
.
append
(
field_value
);
field_value
.
length
(
0
);
}
/*
...
...
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