Commit 75fb3213 authored by Sergei Golubchik's avatar Sergei Golubchik

bugfix: Item_func_dyncol_add::print()

parent 0980627f
...@@ -1878,6 +1878,14 @@ COLUMN_JSON(COLUMN_CREATE('a',1 AS DECIMAL,'b',1 AS DECIMAL)) ...@@ -1878,6 +1878,14 @@ COLUMN_JSON(COLUMN_CREATE('a',1 AS DECIMAL,'b',1 AS DECIMAL))
# #
# Start of 10.2 tests # Start of 10.2 tests
# #
create view v1 as select column_get(column_add(column_create(1 , 'blue' as char), 2, 'ttt'), 1 as char);
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 column_get(column_add(column_create(1,'blue' AS char charset utf8 ),2,'ttt'),1 as char charset utf8) AS `Name_exp_1` utf8 utf8_general_ci
select * from v1;
Name_exp_1
blue
drop view v1;
# #
# MDEV-10134 Add full support for DEFAULT # MDEV-10134 Add full support for DEFAULT
# #
......
...@@ -928,6 +928,14 @@ SELECT COLUMN_JSON(COLUMN_CREATE('a',1 AS DECIMAL,'b',1 AS DECIMAL)); ...@@ -928,6 +928,14 @@ SELECT COLUMN_JSON(COLUMN_CREATE('a',1 AS DECIMAL,'b',1 AS DECIMAL));
--echo # Start of 10.2 tests --echo # Start of 10.2 tests
--echo # --echo #
#
# Item_func_dyncol_add::print
#
create view v1 as select column_get(column_add(column_create(1 , 'blue' as char), 2, 'ttt'), 1 as char);
show create view v1;
select * from v1;
drop view v1;
--echo # --echo #
--echo # MDEV-10134 Add full support for DEFAULT --echo # MDEV-10134 Add full support for DEFAULT
--echo # --echo #
......
...@@ -4743,7 +4743,7 @@ void Item_func_dyncol_add::print(String *str, ...@@ -4743,7 +4743,7 @@ void Item_func_dyncol_add::print(String *str,
enum_query_type query_type) enum_query_type query_type)
{ {
DBUG_ASSERT((arg_count & 0x1) == 1); // odd number of arguments DBUG_ASSERT((arg_count & 0x1) == 1); // odd number of arguments
str->append(STRING_WITH_LEN("column_create(")); str->append(STRING_WITH_LEN("column_add("));
args[arg_count - 1]->print(str, query_type); args[arg_count - 1]->print(str, query_type);
str->append(','); str->append(',');
print_arguments(str, query_type); print_arguments(str, query_type);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment