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
a5b54f78
Commit
a5b54f78
authored
Jan 15, 2021
by
Monty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanups
- Fix long lines to be <= 80 character - Trivial changes (no logic changes)
parent
9a60e89a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
17 deletions
+21
-17
sql/item.cc
sql/item.cc
+21
-17
No files found.
sql/item.cc
View file @
a5b54f78
...
...
@@ -4922,7 +4922,8 @@ double Item_copy_string::val_real()
int
err_not_used
;
char
*
end_not_used
;
return
(
null_value
?
0.0
:
str_value
.
charset
()
->
strntod
((
char
*
)
str_value
.
ptr
(),
str_value
.
length
(),
str_value
.
charset
()
->
strntod
((
char
*
)
str_value
.
ptr
(),
str_value
.
length
(),
&
end_not_used
,
&
err_not_used
));
}
...
...
@@ -4930,8 +4931,8 @@ longlong Item_copy_string::val_int()
{
int
err
;
return
null_value
?
0
:
str_value
.
charset
()
->
strntoll
(
str_value
.
ptr
(),
str_value
.
length
(),
10
,
(
char
**
)
0
,
&
err
);
str_value
.
length
(),
10
,
(
char
**
)
0
,
&
err
);
}
...
...
@@ -5032,9 +5033,11 @@ bool Item_ref_null_helper::val_native(THD *thd, Native *to)
}
bool
Item_ref_null_helper
::
get_date
(
THD
*
thd
,
MYSQL_TIME
*
ltime
,
date_mode_t
fuzzydate
)
bool
Item_ref_null_helper
::
get_date
(
THD
*
thd
,
MYSQL_TIME
*
ltime
,
date_mode_t
fuzzydate
)
{
return
(
owner
->
was_null
|=
null_value
=
(
*
ref
)
->
get_date_result
(
thd
,
ltime
,
fuzzydate
));
return
(
owner
->
was_null
|=
null_value
=
(
*
ref
)
->
get_date_result
(
thd
,
ltime
,
fuzzydate
));
}
...
...
@@ -5751,7 +5754,8 @@ Item_field::fix_outer_field(THD *thd, Field **from_field, Item **reference)
Item_ref
*
rf
;
rf
=
new
(
thd
->
mem_root
)
Item_ref
(
thd
,
context
,
(
*
from_field
)
->
table
->
s
->
db
,
Lex_cstring_strlen
((
*
from_field
)
->
table
->
alias
.
c_ptr
()),
Lex_cstring_strlen
((
*
from_field
)
->
table
->
alias
.
c_ptr
()),
field_name
);
if
(
!
rf
)
return
-
1
;
...
...
@@ -5908,8 +5912,9 @@ bool Item_field::fix_fields(THD *thd, Item **reference)
return
TRUE
;
thd
->
change_item_tree
(
reference
,
select
->
context_analysis_place
==
IN_GROUP_BY
&&
alias_name_used
?
*
rf
->
ref
:
rf
);
select
->
context_analysis_place
==
IN_GROUP_BY
&&
alias_name_used
?
*
rf
->
ref
:
rf
);
/*
We can not "move" aggregate function in the place where
...
...
@@ -8891,7 +8896,8 @@ bool Item_cache_wrapper::is_null()
Get the date value of the possibly cached item
*/
bool
Item_cache_wrapper
::
get_date
(
THD
*
thd
,
MYSQL_TIME
*
ltime
,
date_mode_t
fuzzydate
)
bool
Item_cache_wrapper
::
get_date
(
THD
*
thd
,
MYSQL_TIME
*
ltime
,
date_mode_t
fuzzydate
)
{
Item
*
cached_value
;
DBUG_ENTER
(
"Item_cache_wrapper::get_date"
);
...
...
@@ -9434,7 +9440,8 @@ my_decimal *Item_default_value::val_decimal(my_decimal *decimal_value)
return
Item_field
::
val_decimal
(
decimal_value
);
}
bool
Item_default_value
::
get_date
(
THD
*
thd
,
MYSQL_TIME
*
ltime
,
date_mode_t
fuzzydate
)
bool
Item_default_value
::
get_date
(
THD
*
thd
,
MYSQL_TIME
*
ltime
,
date_mode_t
fuzzydate
)
{
calculate
();
return
Item_field
::
get_date
(
thd
,
ltime
,
fuzzydate
);
...
...
@@ -9791,8 +9798,8 @@ void Item_cache::store(Item *item)
void
Item_cache
::
print
(
String
*
str
,
enum_query_type
query_type
)
{
if
(
example
&&
// There is a cached item
(
query_type
&
QT_NO_DATA_EXPANSION
))
// Caller is show-create-table
if
(
example
&&
// There is a cached item
(
query_type
&
QT_NO_DATA_EXPANSION
))
// Caller is show-create-table
{
// Instead of "cache" or the cached value, print the cached item name
example
->
print
(
str
,
query_type
);
...
...
@@ -9971,15 +9978,12 @@ Item *Item_cache_temporal::clone_item(THD *thd)
Item
*
Item_cache_temporal
::
convert_to_basic_const_item
(
THD
*
thd
)
{
Item
*
new_item
;
DBUG_ASSERT
(
value_cached
||
example
!=
0
);
if
(
!
value_cached
)
cache_value
();
if
(
null_value
)
return
new
(
thd
->
mem_root
)
Item_null
(
thd
);
else
return
make_literal
(
thd
);
return
new_item
;
return
make_literal
(
thd
);
}
Item
*
Item_cache_datetime
::
make_literal
(
THD
*
thd
)
...
...
@@ -10281,8 +10285,8 @@ bool Item_cache_row::setup(THD *thd, Item *item)
return
1
;
for
(
uint
i
=
0
;
i
<
item_count
;
i
++
)
{
Item
*
el
=
item
->
element_index
(
i
);
Item_cache
*
tmp
;
Item
*
el
=
item
->
element_index
(
i
);
if
(
!
(
tmp
=
values
[
i
]
=
el
->
get_cache
(
thd
)))
return
1
;
tmp
->
setup
(
thd
,
el
);
...
...
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