diff options
| author | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-12-17 15:10:40 +0200 |
|---|---|---|
| committer | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-12-17 15:10:40 +0200 |
| commit | 24a40d0b7728515559c4b99af20acb70d3d36950 (patch) | |
| tree | 92da3d894dbdc908aa82e7c7566fc89d92c432e9 /sql/sql_base.cc | |
| parent | 8dc1e33487976d8379273f5942fa9f6e81022048 (diff) | |
| parent | ce80181720e7fb8818578ce06b18b001a95daa23 (diff) | |
| download | mariadb-git-24a40d0b7728515559c4b99af20acb70d3d36950.tar.gz | |
merge
Diffstat (limited to 'sql/sql_base.cc')
| -rw-r--r-- | sql/sql_base.cc | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index bfc98937498..686da918dbb 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -5408,11 +5408,19 @@ bool open_and_lock_tables(THD *thd, TABLE_LIST *tables, if (lock_tables(thd, tables, counter, flags)) goto err; - if (derived && - (mysql_handle_derived(thd->lex, &mysql_derived_prepare) || - (thd->fill_derived_tables() && - mysql_handle_derived(thd->lex, &mysql_derived_filling)))) - goto err; + if (derived) + { + if (mysql_handle_derived(thd->lex, &mysql_derived_prepare)) + goto err; + if (thd->fill_derived_tables() && + mysql_handle_derived(thd->lex, &mysql_derived_filling)) + { + mysql_handle_derived(thd->lex, &mysql_derived_cleanup); + goto err; + } + if (!thd->lex->describe) + mysql_handle_derived(thd->lex, &mysql_derived_cleanup); + } DBUG_RETURN(FALSE); err: |
