Fix for BUG#17523: natural join and information schema.

The cause of the bug was an ASSERT that checked the consistency
of TABLE_SHARE::db and TABLE_LIST::db and failed for I_S tables.
The fix relaxes the requirement for consistency for I_S.


mysql-test/r/join.result:
  Added test for BUG#17523
mysql-test/t/join.test:
  Added test for BUG#17523
sql/table.cc:
  Take into account that for I_S tables, TABLE_SHARE::db == 0,
  while TABLE_LIST::db contains the database name of a table.
  The only change is in the ASSERTs.
This commit is contained in:
unknown 2006-02-22 10:04:10 +02:00
commit 475797a346
3 changed files with 28 additions and 2 deletions

View file

@ -523,6 +523,12 @@ select t1.b from v1a;
-- error 1054
select * from v1a join v1b on t1.b = t2.b;
#
# Bug #17523 natural join and information_schema
#
select * from information_schema.statistics join information_schema.columns
using(table_name,column_name) where table_name='user';
drop table t1;
drop table t2;
drop table t3;