[Commits] Rev 4497: MDEV-7116: Dynamic column hangs/segfaults in file:///home/bell/maria/bzr/work-maria-10.0-MDEV-7116/

sanja at askmonty.org sanja at askmonty.org
Mon Nov 17 18:13:52 EET 2014


At file:///home/bell/maria/bzr/work-maria-10.0-MDEV-7116/

------------------------------------------------------------
revno: 4497
revision-id: sanja at askmonty.org-20141117161330-xw2g3fb5364er68g
parent: knielsen at knielsen-hq.org-20141117114202-64xpofds30k3i638
committer: sanja at askmonty.org
branch nick: work-maria-10.0-MDEV-7116
timestamp: Mon 2014-11-17 17:13:30 +0100
message:
  MDEV-7116: Dynamic column hangs/segfaults
  
  Going to 'create_new_string:' caused double freeing alloc_plan (there and at 'end:').
-------------- next part --------------
=== modified file 'mysql-test/r/dyncol.result'
--- a/mysql-test/r/dyncol.result	2014-06-05 22:07:27 +0000
+++ b/mysql-test/r/dyncol.result	2014-11-17 16:13:30 +0000
@@ -1777,5 +1777,27 @@ group_concat(cast(column_json(dyn) as ch
 {"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
 #

=== modified file 'mysql-test/t/dyncol.test'
--- a/mysql-test/t/dyncol.test	2014-06-05 22:07:27 +0000
+++ b/mysql-test/t/dyncol.test	2014-11-17 16:13:30 +0000
@@ -839,5 +839,31 @@ select group_concat(cast(column_json(dyn
 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 #

=== modified file 'mysys/ma_dyncol.c'
--- a/mysys/ma_dyncol.c	2014-06-10 18:20:33 +0000
+++ b/mysys/ma_dyncol.c	2014-11-17 16:13:30 +0000
@@ -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,



More information about the commits mailing list