diff options
Diffstat (limited to 'sql/table.cc')
-rw-r--r-- | sql/table.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/table.cc b/sql/table.cc index ba38194afc0..a6750b2b4d7 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -1,9 +1,8 @@ -/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB +/* Copyright (C) 2000-2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -453,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); @@ -2618,6 +2619,7 @@ Field *Natural_join_column::field() const char *Natural_join_column::table_name() { + DBUG_ASSERT(table_ref); return table_ref->alias; } |