Skip to content

Commit 75fb321

Browse files
committed
bugfix: Item_func_dyncol_add::print()
1 parent 0980627 commit 75fb321

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

mysql-test/r/dyncol.result

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1878,6 +1878,14 @@ COLUMN_JSON(COLUMN_CREATE('a',1 AS DECIMAL,'b',1 AS DECIMAL))
18781878
#
18791879
# Start of 10.2 tests
18801880
#
1881+
create view v1 as select column_get(column_add(column_create(1 , 'blue' as char), 2, 'ttt'), 1 as char);
1882+
show create view v1;
1883+
View Create View character_set_client collation_connection
1884+
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
1885+
select * from v1;
1886+
Name_exp_1
1887+
blue
1888+
drop view v1;
18811889
#
18821890
# MDEV-10134 Add full support for DEFAULT
18831891
#

mysql-test/t/dyncol.test

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -928,6 +928,14 @@ SELECT COLUMN_JSON(COLUMN_CREATE('a',1 AS DECIMAL,'b',1 AS DECIMAL));
928928
--echo # Start of 10.2 tests
929929
--echo #
930930

931+
#
932+
# Item_func_dyncol_add::print
933+
#
934+
create view v1 as select column_get(column_add(column_create(1 , 'blue' as char), 2, 'ttt'), 1 as char);
935+
show create view v1;
936+
select * from v1;
937+
drop view v1;
938+
931939
--echo #
932940
--echo # MDEV-10134 Add full support for DEFAULT
933941
--echo #

sql/item_strfunc.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4743,7 +4743,7 @@ void Item_func_dyncol_add::print(String *str,
47434743
enum_query_type query_type)
47444744
{
47454745
DBUG_ASSERT((arg_count & 0x1) == 1); // odd number of arguments
4746-
str->append(STRING_WITH_LEN("column_create("));
4746+
str->append(STRING_WITH_LEN("column_add("));
47474747
args[arg_count - 1]->print(str, query_type);
47484748
str->append(',');
47494749
print_arguments(str, query_type);

0 commit comments

Comments
 (0)