1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +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.
This commit is contained in:
gluh@mysql.com/eagle.(none)
2007-09-03 12:22:56 +05:00
parent df7771de65
commit 33eaf2cd95
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,