summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2019-05-14 14:01:15 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2019-08-28 12:06:52 +0200
commit9cd6e7ad73554be6d0186a42f983777a90a984f1 (patch)
tree229bdc0666fd61f7688ef342b553f22a3474bbe0 /sql/field.h
parent7aac83580a5c5a6042b5d03d1031750cb0d5d6ea (diff)
downloadmariadb-git-9cd6e7ad73554be6d0186a42f983777a90a984f1.tar.gz
MDEV-16932: ASAN heap-use-after-free in my_charlen_utf8 / my_well_formed_char_length_utf8 on 2nd execution of SP with ALTER trying to add bad CHECK
Make automatic name generation during execution (not prepare). Check result of memory allocation operation.
Diffstat (limited to 'sql/field.h')
-rw-r--r--sql/field.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/field.h b/sql/field.h
index b9eb2085f0b..ac7794081bc 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -628,6 +628,7 @@ public:
/* Flag indicating that the field is physically stored in the database */
bool stored_in_db;
bool utf8; /* Already in utf8 */
+ bool automatic_name;
Item *expr;
LEX_STRING name; /* Name of constraint */
/* see VCOL_* (VCOL_FIELD_REF, ...) */
@@ -637,7 +638,7 @@ public:
: vcol_type((enum_vcol_info_type)VCOL_TYPE_NONE),
field_type((enum enum_field_types)MYSQL_TYPE_VIRTUAL),
in_partitioning_expr(FALSE), stored_in_db(FALSE),
- utf8(TRUE), expr(NULL), flags(0)
+ utf8(TRUE), automatic_name(FALSE), expr(NULL), flags(0)
{
name.str= NULL;
name.length= 0;