1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Bug#29408 Cannot find view in columns table if the selection contains a function

Use view db name as thread default database, in order to ensure
that the view is parsed and prepared correctly.


mysql-test/r/sp.result:
  test result
mysql-test/t/sp.test:
  test case
sql/sql_parse.cc:
  copy thd->db_length to table_list->db_length
sql/sql_view.cc:
  Use view db name as thread default database, in order to ensure
  that the view is parsed and prepared correctly.
This commit is contained in:
unknown
2007-09-03 12:22:56 +05:00
parent b25b8cbc72
commit ee0b7d895d
4 changed files with 70 additions and 1 deletions

View File

@@ -1864,7 +1864,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
statistic_increment(thd->status_var.com_stat[SQLCOM_SHOW_FIELDS],
&LOCK_status);
bzero((char*) &table_list,sizeof(table_list));
if (thd->copy_db_to(&table_list.db, 0))
if (thd->copy_db_to(&table_list.db, &table_list.db_length))
break;
pend= strend(packet);
thd->convert_string(&conv_name, system_charset_info,