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
9b7c2c6b
Commit
9b7c2c6b
authored
Mar 26, 2024
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-33220 fixup: Remove some initialization
parent
e0c81654
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
13 deletions
+22
-13
sql/item_strfunc.cc
sql/item_strfunc.cc
+22
-13
No files found.
sql/item_strfunc.cc
View file @
9b7c2c6b
...
...
@@ -1383,19 +1383,20 @@ String *Item_func_regexp_replace::val_str_internal(String *str,
char
buff2
[
MAX_FIELD_WIDTH
];
String
tmp0
(
buff0
,
sizeof
(
buff0
),
&
my_charset_bin
);
String
tmp2
(
buff2
,
sizeof
(
buff2
),
&
my_charset_bin
);
String
*
source
,
*
replace
=
0
;
String
*
source
,
*
replace
;
LEX_CSTRING
src
,
rpl
;
int
startoffset
=
0
;
if
((
null_value
=
(
!
(
source
=
args
[
0
]
->
val_str
(
&
tmp0
))
||
!
(
replace
=
args
[
2
]
->
val_str_null_to_empty
(
&
tmp2
,
null_to_empty
))
||
re
.
recompile
(
args
[
1
]))))
return
(
String
*
)
0
;
source
=
args
[
0
]
->
val_str
(
&
tmp0
);
if
(
!
source
)
goto
err
;
replace
=
args
[
2
]
->
val_str_null_to_empty
(
&
tmp2
,
null_to_empty
);
if
(
!
replace
||
re
.
recompile
(
args
[
1
]))
goto
err
;
if
(
!
(
source
=
re
.
convert_if_needed
(
source
,
&
re
.
subject_converter
))
||
!
(
replace
=
re
.
convert_if_needed
(
replace
,
&
re
.
replace_converter
)))
goto
err
;
null_value
=
false
;
src
=
source
->
lex_cstring
();
rpl
=
replace
->
lex_cstring
();
...
...
@@ -1439,7 +1440,7 @@ String *Item_func_regexp_replace::val_str_internal(String *str,
err:
null_value
=
true
;
return
(
String
*
)
0
;
return
nullptr
;
}
...
...
@@ -1583,13 +1584,21 @@ bool Item_func_insert::fix_length_and_dec()
String
*
Item_str_conv
::
val_str
(
String
*
str
)
{
DBUG_ASSERT
(
fixed
==
1
);
String
*
res
;
size_t
alloced_length
=
0
,
len
;
String
*
res
=
args
[
0
]
->
val_str
(
&
tmp_value
);
if
((
null_value
=
(
!
(
res
=
args
[
0
]
->
val_str
(
&
tmp_value
))
||
str
->
alloc
((
alloced_length
=
res
->
length
()
*
multiply
)))))
return
0
;
if
(
!
res
)
{
err:
null_value
=
true
;
return
nullptr
;
}
size_t
alloced_length
=
res
->
length
()
*
multiply
,
len
;
if
(
str
->
alloc
((
alloced_length
)))
goto
err
;
null_value
=
false
;
len
=
converter
(
collation
.
collation
,
(
char
*
)
res
->
ptr
(),
res
->
length
(),
(
char
*
)
str
->
ptr
(),
alloced_length
);
DBUG_ASSERT
(
len
<=
alloced_length
);
...
...
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