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
5b657455
Commit
5b657455
authored
Mar 26, 2003
by
hf@deer.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix of the #173 bug
(Truncating of Replace result)
parent
5e3155f1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
sql/item_strfunc.cc
sql/item_strfunc.cc
+2
-2
No files found.
sql/item_strfunc.cc
View file @
5b657455
...
@@ -813,8 +813,8 @@ void Item_func_replace::fix_length_and_dec()
...
@@ -813,8 +813,8 @@ void Item_func_replace::fix_length_and_dec()
int
diff
=
(
int
)
(
args
[
2
]
->
max_length
-
args
[
1
]
->
max_length
);
int
diff
=
(
int
)
(
args
[
2
]
->
max_length
-
args
[
1
]
->
max_length
);
if
(
diff
>
0
&&
args
[
1
]
->
max_length
)
if
(
diff
>
0
&&
args
[
1
]
->
max_length
)
{
// Calculate of maxreplaces
{
// Calculate of maxreplaces
max_length
=
max_length
/
args
[
1
]
->
max_length
;
int
max_substrs
=
max_length
/
args
[
1
]
->
max_length
;
max_length
=
(
max_length
+
1
)
*
(
uint
)
diff
;
max_length
+=
max_substrs
*
(
uint
)
diff
;
}
}
if
(
max_length
>
MAX_BLOB_WIDTH
)
if
(
max_length
>
MAX_BLOB_WIDTH
)
{
{
...
...
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