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

new show create view output

mysqldump view support (BUG#4972)
workaround to allow view work after LOCK TABLES
This commit is contained in:
bell@sanja.is.com.ua
2004-09-24 12:50:10 +03:00
parent 8cd9fd44b2
commit 2264bb01ca
6 changed files with 309 additions and 58 deletions

View File

@@ -879,6 +879,7 @@ mysqld_show_create(THD *thd, TABLE_LIST *table_list)
table_list->real_name, "VIEW");
DBUG_RETURN(-1);
}
table= table_list->table;
if ((table_list->view ?
@@ -887,10 +888,19 @@ mysqld_show_create(THD *thd, TABLE_LIST *table_list)
DBUG_RETURN(-1);
List<Item> field_list;
field_list.push_back(new Item_empty_string("Table",NAME_LEN));
// 1024 is for not to confuse old clients
field_list.push_back(new Item_empty_string("Create Table",
max(buffer.length(),1024)));
if (table_list->view)
{
field_list.push_back(new Item_empty_string("View",NAME_LEN));
field_list.push_back(new Item_empty_string("Create View",
max(buffer.length(),1024)));
}
else
{
field_list.push_back(new Item_empty_string("Table",NAME_LEN));
// 1024 is for not to confuse old clients
field_list.push_back(new Item_empty_string("Create Table",
max(buffer.length(),1024)));
}
if (protocol->send_fields(&field_list,
Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))