From b790bc24d81856d896231c42e3c7e259933cb1e7 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 30 Nov 2002 19:53:31 +0200 Subject: some bug fixes and tests for those. I am pushing now, because : * I have a fix for crashing bug * Sanja will destroy my changes in sub-select test ... ;) mysql-test/r/derived.result: tests for recent bugs mysql-test/r/subselect.result: tests for recent bugs mysql-test/t/derived.test: tests for recent bugs mysql-test/t/subselect.test: tests for recent bugs sql/sql_derived.cc: Luckily, we have `make test` so that my last changes could be re-checked --- sql/sql_derived.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sql/sql_derived.cc') diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index 78356a0d725..76a97a2e4b8 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -107,7 +107,10 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t) table->derived_select_number= sl->select_number; table->tmp_table=TMP_TABLE; if (lex->describe) - tables->table_list->table=tables->table; // to fix a problem in EXPLAIN + { + if (tables) + tables->table_list->table=tables->table; // to fix a problem in EXPLAIN + } else sl->exclude(); t->db=(char *)""; -- cgit v1.2.1