diff options
Diffstat (limited to 'sql/table.cc')
-rw-r--r-- | sql/table.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sql/table.cc b/sql/table.cc index 84f929fa7a7..a4065f2c393 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -5066,10 +5066,8 @@ TABLE *TABLE_LIST::get_real_join_table() */ for (TABLE_LIST *t= ti++; t; t= ti++) tbl= t; - /* - It is impossible that the list is empty - so tbl can't be NULL after above loop. - */ + if (!tbl) + return NULL; // view/derived with no tables if (!tbl->nested_join) break; /* go deeper if we've found nested join */ |