Commit 4d882329 authored by unknown's avatar unknown

MDEV-7116: Dynamic column hangs/segfaults

Going to 'create_new_string:' caused double freeing alloc_plan (there and at 'end:').
parent e9fc98b5
......@@ -1777,5 +1777,27 @@ group_concat(cast(column_json(dyn) as char))
{"name1":"value1","name2":"value2"}
drop table t1;
#
# MDEV-7116: Dynamic column hangs/segfaults
#
create table t1 (
impressions mediumblob
);
insert into t1 values ("");
update t1
set impressions = column_add(impressions,
'total', 12,
'2014-10-28 16:00:00', 3,
'2014-10-30 15:00:00', 3,
'2014-11-04 09:00:00', 6
);
update t1
set impressions = column_add(impressions,
'total', "a12",
'2014-10-28 16:00:00', "a3",
'2014-10-30 15:00:00', "a3",
'2014-11-04 09:00:00', "a6"
);
drop table t1;
#
# end of 10.0 tests
#
......@@ -838,6 +838,32 @@ select group_concat(cast(column_json(dyn) as char)) from t1;
drop table t1;
--echo #
--echo # MDEV-7116: Dynamic column hangs/segfaults
--echo #
create table t1 (
impressions mediumblob
);
insert into t1 values ("");
update t1
set impressions = column_add(impressions,
'total', 12,
'2014-10-28 16:00:00', 3,
'2014-10-30 15:00:00', 3,
'2014-11-04 09:00:00', 6
);
update t1
set impressions = column_add(impressions,
'total', "a12",
'2014-10-28 16:00:00', "a3",
'2014-10-30 15:00:00', "a3",
'2014-11-04 09:00:00', "a6"
);
drop table t1;
--echo #
--echo # end of 10.0 tests
--echo #
......@@ -3591,7 +3591,6 @@ end:
create_new_string:
/* There is no columns from before, so let's just add the new ones */
rc= ER_DYNCOL_OK;
my_free(alloc_plan);
if (not_null != 0)
rc= dynamic_column_create_many_internal_fmt(str, add_column_count,
(uint*)column_keys, values,
......
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