diff options
author | Jacob Mathew <jacob.mathew@mariadb.com> | 2017-03-28 16:56:18 -0700 |
---|---|---|
committer | Jacob Mathew <jacob.mathew@mariadb.com> | 2017-03-29 12:07:33 -0700 |
commit | 3c422e60bbee79bb636e65910c26ac193de70a84 (patch) | |
tree | 851ab6dddf07680adb7b1367aa746743df10c5ef /sql/table.cc | |
parent | 4ebdef2bcd28b641dc49aaef4a8c387442ae06dc (diff) | |
download | mariadb-git-3c422e60bbee79bb636e65910c26ac193de70a84.tar.gz |
MDEV-11115 CHECK constraints are not shown in I_S.TABLE_CONSTRAINTSbb-10.2-MDEV-11115
Added CHECK constraints to I_S.TABLE_CONSTRAINTS.
Fixed a bug regarding virtual column definitions whose name is the field name.
Added test case: check_constraint_show
Diffstat (limited to 'sql/table.cc')
-rw-r--r-- | sql/table.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/table.cc b/sql/table.cc index 3a08d1e49ea..6b15c06cb91 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -1987,6 +1987,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write, if (vcol_info) { vcol_info->name.str= const_cast<char*>(reg_field->field_name); + vcol_info->name.length = strlen(reg_field->field_name); if (mysql57_null_bits && !vcol_info->stored_in_db) { /* MySQL 5.7 has null bits last */ @@ -2374,7 +2375,10 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write, vcol_info->name.str= strmake_root(&share->mem_root, (char*)vcol_screen_pos, name_length); else + { vcol_info->name.str= const_cast<char*>(reg_field->field_name); + vcol_info->name.length = strlen(reg_field->field_name); + } vcol_screen_pos+= name_length + expr_length; switch (type) { |