1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

new method to detect commands where all VIEWs should be temporary tables (BUG#4803)

mysql-test/r/view.result:
  Showing VIEW with VIEWs in subquery
mysql-test/t/view.test:
  Showing VIEW with VIEWs in subquery
sql/sql_lex.cc:
  new method to detect commands where all VIEWs should be temporary tables
sql/sql_lex.h:
  new method to detect commands where all VIEWs should be temporary tables
sql/sql_view.cc:
  new method to detect commands where all VIEWs should be temporary tables
  debug output added
This commit is contained in:
unknown
2004-08-24 22:51:23 +03:00
parent 52b735a1a2
commit b8785595b9
5 changed files with 49 additions and 2 deletions

View File

@ -1546,7 +1546,7 @@ bool st_lex::can_be_merged()
}
/*
check if command can use VIEW with MERGE algorithm
check if command can use VIEW with MERGE algorithm (for top VIEWs)
SYNOPSIS
st_lex::can_use_merged()
@ -1576,6 +1576,29 @@ bool st_lex::can_use_merged()
}
}
/*
check if command can't use merged views in any part of command
SYNOPSIS
st_lex::can_not_use_merged()
RETURN
FALSE - command can't use merged VIEWs
TRUE - VIEWs with MERGE algorithms can be used
*/
bool st_lex::can_not_use_merged()
{
switch (sql_command)
{
case SQLCOM_CREATE_VIEW:
case SQLCOM_SHOW_CREATE:
return TRUE;
default:
return FALSE;
}
}
/*
Detect that we need only table structure of derived table/view