summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2017-03-31 21:20:32 +0400
committerAlexander Barkov <bar@mariadb.org>2017-04-05 15:03:01 +0400
commit48a7ea6da3dc98f055e7aee0d05df04cfbc5855e (patch)
tree6c0de71d46cdd9269161803d7eb4db7b3f0ba91a /sql/field.h
parent281f8a42ee15a7b50811f449d4070a7f753cb427 (diff)
downloadmariadb-git-48a7ea6da3dc98f055e7aee0d05df04cfbc5855e.tar.gz
Uninitialized Column_definition::pack_flag for ROW-type SP variables and their fields
Fixed that the Column_definition::pack_flag member corresponding to ROW-type SP variables and their fields was not properly initialized. This lead to sporadic test failures. Valgrind complained about jumps depending on uninitialized value in VALGRIND builds. This patch makes sure that sp_head::fill_spvar_definition() is always called for ROW variables and their fields. Additionally, fixed that a function with a scalar parameter erroneously acceptes ROWs with one fields. Now an error is returned.
Diffstat (limited to 'sql/field.h')
-rw-r--r--sql/field.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/field.h b/sql/field.h
index 4f29619fa85..448eee9b04d 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -3844,7 +3844,7 @@ public:
flags(0), pack_length(0), key_length(0), unireg_check(Field::NONE),
interval(0), charset(&my_charset_bin),
srid(0), geom_type(Field::GEOM_GEOMETRY),
- option_list(NULL),
+ option_list(NULL), pack_flag(0),
vcol_info(0), default_value(0), check_constraint(0)
{
interval_list.empty();
@@ -3857,7 +3857,7 @@ public:
flags(0), pack_length(0), key_length(0), unireg_check(Field::NONE),
interval(0), charset(&my_charset_bin),
srid(0), geom_type(Field::GEOM_GEOMETRY),
- option_list(NULL),
+ option_list(NULL), pack_flag(0),
vcol_info(0), default_value(0), check_constraint(0)
{
interval_list.empty();