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
8b1f145c
Commit
8b1f145c
authored
Aug 26, 2017
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup
Item_func_format::print() was redundant and other changes
parent
3af191b7
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
31 deletions
+44
-31
cmake/submodules.cmake
cmake/submodules.cmake
+2
-2
mysql-test/r/locale.result
mysql-test/r/locale.result
+17
-1
mysql-test/t/locale.test
mysql-test/t/locale.test
+16
-1
sql/item_strfunc.cc
sql/item_strfunc.cc
+0
-14
sql/item_strfunc.h
sql/item_strfunc.h
+8
-10
sql/item_timefunc.h
sql/item_timefunc.h
+1
-3
No files found.
cmake/submodules.cmake
View file @
8b1f145c
...
...
@@ -7,7 +7,7 @@ IF(GIT_EXECUTABLE AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
IF
(
git_config_get_result EQUAL 128 OR cmake_update_submodules MATCHES no
)
SET
(
update_result 0
)
ELSEIF
(
cmake_update_submodules MATCHES force
)
MESSAGE
(
"--
Updating submodules (forced)"
)
MESSAGE
(
STATUS
"
Updating submodules (forced)"
)
EXECUTE_PROCESS
(
COMMAND
"
${
GIT_EXECUTABLE
}
"
submodule update --init --force
WORKING_DIRECTORY
"
${
CMAKE_SOURCE_DIR
}
"
RESULT_VARIABLE update_result
)
...
...
@@ -16,7 +16,7 @@ IF(GIT_EXECUTABLE AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
WORKING_DIRECTORY
"
${
CMAKE_SOURCE_DIR
}
"
RESULT_VARIABLE update_result
)
ELSE
()
MESSAGE
(
"--
Updating submodules"
)
MESSAGE
(
STATUS
"
Updating submodules"
)
EXECUTE_PROCESS
(
COMMAND
"
${
GIT_EXECUTABLE
}
"
submodule update --init
WORKING_DIRECTORY
"
${
CMAKE_SOURCE_DIR
}
"
RESULT_VARIABLE update_result
)
...
...
mysql-test/r/locale.result
View file @
8b1f145c
...
...
@@ -223,5 +223,21 @@ SELECT * FROM non_existent;
ERROR 42S02: Table 'test.non_existent' doesn't exist
SET lc_time_names=@old_50915_lc_time_names;
#
# End of 5.6 tests
# End of 10.0 tests
#
#
# End of 10.1 tests
#
create view v1 as select
format(123456789,2) as b,
format(123456789,2,'rm_CH') as b1;
select * from v1;
b b1
123,456,789.00 123'456'789,00
show create view v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select format(123456789,2) AS `b`,format(123456789,2,'rm_CH') AS `b1` utf8 utf8_general_ci
drop view v1;
#
# End of 10.2 tests
#
mysql-test/t/locale.test
View file @
8b1f145c
...
...
@@ -134,7 +134,22 @@ SELECT * FROM non_existent;
SET
lc_time_names
=@
old_50915_lc_time_names
;
--
echo
#
--
echo
# End of 10.0 tests
--
echo
#
--
echo
#
--
echo
# End of 10.1 tests
--
echo
#
# Item::print
create
view
v1
as
select
format
(
123456789
,
2
)
as
b
,
format
(
123456789
,
2
,
'rm_CH'
)
as
b1
;
select
*
from
v1
;
show
create
view
v1
;
drop
view
v1
;
--
echo
#
--
echo
# End of
5.6
tests
--
echo
# End of
10.2
tests
--
echo
#
sql/item_strfunc.cc
View file @
8b1f145c
...
...
@@ -2707,20 +2707,6 @@ String *Item_func_format::val_str_ascii(String *str)
}
void
Item_func_format
::
print
(
String
*
str
,
enum_query_type
query_type
)
{
str
->
append
(
STRING_WITH_LEN
(
"format("
));
args
[
0
]
->
print
(
str
,
query_type
);
str
->
append
(
','
);
args
[
1
]
->
print
(
str
,
query_type
);
if
(
arg_count
>
2
)
{
str
->
append
(
','
);
args
[
2
]
->
print
(
str
,
query_type
);
}
str
->
append
(
')'
);
}
void
Item_func_elt
::
fix_length_and_dec
()
{
uint32
char_length
=
0
;
...
...
sql/item_strfunc.h
View file @
8b1f145c
...
...
@@ -93,7 +93,7 @@ class Item_str_ascii_func :public Item_str_func
{
return
val_str_from_val_str_ascii
(
str
,
&
ascii_buf
);
}
virtual
String
*
val_str_ascii
(
String
*
)
=
0
;
String
*
val_str_ascii
(
String
*
)
=
0
;
};
...
...
@@ -490,7 +490,7 @@ class Item_func_trim :public Item_str_func
String
*
val_str
(
String
*
);
void
fix_length_and_dec
();
const
char
*
func_name
()
const
{
return
"trim"
;
}
v
irtual
v
oid
print
(
String
*
str
,
enum_query_type
query_type
);
void
print
(
String
*
str
,
enum_query_type
query_type
);
virtual
const
char
*
mode_name
()
const
{
return
"both"
;
}
Item
*
get_copy
(
THD
*
thd
,
MEM_ROOT
*
mem_root
)
{
return
get_item_copy
<
Item_func_trim
>
(
thd
,
mem_root
,
this
);
}
...
...
@@ -853,7 +853,6 @@ class Item_func_format :public Item_str_ascii_func
String
*
val_str_ascii
(
String
*
);
void
fix_length_and_dec
();
const
char
*
func_name
()
const
{
return
"format"
;
}
virtual
void
print
(
String
*
str
,
enum_query_type
query_type
);
Item
*
get_copy
(
THD
*
thd
,
MEM_ROOT
*
mem_root
)
{
return
get_item_copy
<
Item_func_format
>
(
thd
,
mem_root
,
this
);
}
};
...
...
@@ -914,7 +913,6 @@ class Item_func_binlog_gtid_pos :public Item_str_func
const
char
*
func_name
()
const
{
return
"binlog_gtid_pos"
;
}
bool
check_vcol_func_processor
(
void
*
arg
)
{
return
mark_unsupported_function
(
func_name
(),
"()"
,
arg
,
VCOL_IMPOSSIBLE
);
}
Item
*
get_copy
(
THD
*
thd
,
MEM_ROOT
*
mem_root
)
...
...
@@ -1070,7 +1068,7 @@ class Item_func_binary :public Item_str_func
collation
.
set
(
&
my_charset_bin
);
max_length
=
args
[
0
]
->
max_length
;
}
v
irtual
v
oid
print
(
String
*
str
,
enum_query_type
query_type
);
void
print
(
String
*
str
,
enum_query_type
query_type
);
const
char
*
func_name
()
const
{
return
"cast_as_binary"
;
}
bool
need_parentheses_in_default
()
{
return
true
;
}
Item
*
get_copy
(
THD
*
thd
,
MEM_ROOT
*
mem_root
)
...
...
@@ -1214,7 +1212,7 @@ class Item_func_conv_charset :public Item_str_func
}
void
fix_length_and_dec
();
const
char
*
func_name
()
const
{
return
"convert"
;
}
v
irtual
v
oid
print
(
String
*
str
,
enum_query_type
query_type
);
void
print
(
String
*
str
,
enum_query_type
query_type
);
Item
*
get_copy
(
THD
*
thd
,
MEM_ROOT
*
mem_root
)
{
return
get_item_copy
<
Item_func_conv_charset
>
(
thd
,
mem_root
,
this
);
}
};
...
...
@@ -1230,7 +1228,7 @@ class Item_func_set_collation :public Item_str_func
const
char
*
func_name
()
const
{
return
"collate"
;
}
enum
precedence
precedence
()
const
{
return
COLLATE_PRECEDENCE
;
}
enum
Functype
functype
()
const
{
return
COLLATE_FUNC
;
}
v
irtual
v
oid
print
(
String
*
str
,
enum_query_type
query_type
);
void
print
(
String
*
str
,
enum_query_type
query_type
);
Item_field
*
field_for_view_update
()
{
/* this function is transparent for view updating */
...
...
@@ -1412,8 +1410,8 @@ class Item_func_dyncol_create: public Item_str_func
void
fix_length_and_dec
();
const
char
*
func_name
()
const
{
return
"column_create"
;
}
String
*
val_str
(
String
*
);
v
irtual
v
oid
print
(
String
*
str
,
enum_query_type
query_type
);
virtual
enum
Functype
functype
()
const
{
return
DYNCOL_FUNC
;
}
void
print
(
String
*
str
,
enum_query_type
query_type
);
enum
Functype
functype
()
const
{
return
DYNCOL_FUNC
;
}
Item
*
get_copy
(
THD
*
thd
,
MEM_ROOT
*
mem_root
)
{
return
get_item_copy
<
Item_func_dyncol_create
>
(
thd
,
mem_root
,
this
);
}
};
...
...
@@ -1427,7 +1425,7 @@ class Item_func_dyncol_add: public Item_func_dyncol_create
{}
const
char
*
func_name
()
const
{
return
"column_add"
;
}
String
*
val_str
(
String
*
);
v
irtual
v
oid
print
(
String
*
str
,
enum_query_type
query_type
);
void
print
(
String
*
str
,
enum_query_type
query_type
);
Item
*
get_copy
(
THD
*
thd
,
MEM_ROOT
*
mem_root
)
{
return
get_item_copy
<
Item_func_dyncol_add
>
(
thd
,
mem_root
,
this
);
}
};
...
...
sql/item_timefunc.h
View file @
8b1f145c
...
...
@@ -199,7 +199,6 @@ class Item_func_monthname :public Item_str_func
}
bool
check_vcol_func_processor
(
void
*
arg
)
{
return
mark_unsupported_function
(
func_name
(),
"()"
,
arg
,
VCOL_SESSION_FUNC
);
}
Item
*
get_copy
(
THD
*
thd
,
MEM_ROOT
*
mem_root
)
...
...
@@ -693,8 +692,7 @@ class Item_func_curdate :public Item_datefunc
virtual
void
store_now_in_TIME
(
THD
*
thd
,
MYSQL_TIME
*
now_time
)
=
0
;
bool
check_vcol_func_processor
(
void
*
arg
)
{
return
mark_unsupported_function
(
func_name
(),
"()"
,
arg
,
VCOL_TIME_FUNC
);
return
mark_unsupported_function
(
func_name
(),
"()"
,
arg
,
VCOL_TIME_FUNC
);
}
};
...
...
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