summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/table.cc b/sql/table.cc
index 2a492a15722..5c72ac6ccbf 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -452,6 +452,8 @@ int openfrm(THD *thd, const char *name, const char *alias, uint db_stat,
memcpy(comment_pos, disk_buff+read_length-com_length, com_length);
fix_type_pointers(&int_array, &share->fieldnames, 1, &names);
+ if (share->fieldnames.count != share->fields)
+ goto err;
fix_type_pointers(&int_array, share->intervals, interval_count,
&names);