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
b2ceedc9
Commit
b2ceedc9
authored
Jan 31, 2015
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
main.ctype_ucs2 --ps: Item_func_nullif should use m_args0_copy metadata
in case args[0] changes between PREPARE and EXECUTE
parent
f122cca4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+10
-10
No files found.
sql/item_cmpfunc.cc
View file @
b2ceedc9
...
...
@@ -2751,20 +2751,20 @@ bool Item_func_if::date_op(MYSQL_TIME *ltime, uint fuzzydate)
void
Item_func_nullif
::
fix_length_and_dec
()
{
if
(
!
args
[
0
]
)
// Only false if EOM
if
(
!
m_args0_copy
)
// Only false if EOM
return
;
cached_result_type
=
args
[
0
]
->
result_type
();
cached_field_type
=
args
[
0
]
->
field_type
();
collation
.
set
(
args
[
0
]
->
collation
);
decimals
=
args
[
0
]
->
decimals
;
unsigned_flag
=
args
[
0
]
->
unsigned_flag
;
fix_char_length
(
args
[
0
]
->
max_char_length
());
cached_result_type
=
m_args0_copy
->
result_type
();
cached_field_type
=
m_args0_copy
->
field_type
();
collation
.
set
(
m_args0_copy
->
collation
);
decimals
=
m_args0_copy
->
decimals
;
unsigned_flag
=
m_args0_copy
->
unsigned_flag
;
fix_char_length
(
m_args0_copy
->
max_char_length
());
convert_const_compared_to_int_field
(
current_thd
);
args
[
0
]
->
cmp_context
=
args
[
1
]
->
cmp_context
=
item_cmp_type
(
args
[
0
]
->
result_type
(),
args
[
1
]
->
result_type
());
cmp
.
set_cmp_func
(
this
,
tmp_arg
,
tmp_arg
+
1
,
args
[
0
]
->
cmp_context
);
m_args0_copy
->
cmp_context
=
args
[
1
]
->
cmp_context
=
item_cmp_type
(
m_args0_copy
->
result_type
(),
args
[
1
]
->
result_type
());
cmp
.
set_cmp_func
(
this
,
tmp_arg
,
tmp_arg
+
1
,
m_args0_copy
->
cmp_context
);
maybe_null
=
1
;
}
...
...
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