summaryrefslogtreecommitdiff
path: root/sql/sql_derived.cc
diff options
context:
space:
mode:
authorunknown <Sinisa@sinisa.nasamreza.org>2002-11-28 19:19:21 +0200
committerunknown <Sinisa@sinisa.nasamreza.org>2002-11-28 19:19:21 +0200
commit802705f957011aebbb03ca988080f914bf39a57e (patch)
treeef66c94bfc0bceb424a8ce8e01edf84b701cb6d2 /sql/sql_derived.cc
parent3284c39a1fca442cd4f803df0245e248a349bd16 (diff)
downloadmariadb-git-802705f957011aebbb03ca988080f914bf39a57e.tar.gz
adding mandatory aliases for derived tables as per SQL-99
doing it in sql_yacc.yy does not work this commit contains fixes for other tests there are fixes in subselect test which will have to be changed once fix_fields is fixed to work with aliased derived tables
Diffstat (limited to 'sql/sql_derived.cc')
-rw-r--r--sql/sql_derived.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc
index afdd1ccfdb2..01e2c1a98d8 100644
--- a/sql/sql_derived.cc
+++ b/sql/sql_derived.cc
@@ -108,7 +108,7 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t)
table->tmp_table=TMP_TABLE;
if (!lex->describe)
sl->exclude();
- t->db=(char *)"";
+ t->db=(tables && tables->db) ? tables->db : (char *)"";
t->derived=(SELECT_LEX *)0; // just in case ...
}
}