diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2019-05-14 14:01:15 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2019-07-30 10:39:12 +0200 |
commit | 999cce215fbee4d0bcdb8df920f460cfee46e41b (patch) | |
tree | d68a8ed4e1196362ff7662bd1cd2e4cf4b220084 /sql/field.h | |
parent | d6886b95d0d48d80deffa7f2190b8abd5ee8236b (diff) | |
download | mariadb-git-bb-10.2-MDEV-16932.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 CHECKbb-10.2-MDEV-16932
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.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/field.h b/sql/field.h index 083f3d01bb8..e78b965d9d4 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; |