1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge gleb.loc:/home/uchum/work/bk/5.1

into  gleb.loc:/home/uchum/work/bk/5.1-opt


mysql-test/r/sp.result:
  SCCS merged
mysql-test/t/sp.test:
  SCCS merged
sql/sql_lex.h:
  SCCS merged
sql/sql_parse.cc:
  SCCS merged
sql/sql_yacc.yy:
  SCCS merged
This commit is contained in:
unknown
2007-09-13 00:44:50 +05:00
37 changed files with 802 additions and 40 deletions

View File

@ -1798,6 +1798,28 @@ typedef struct st_lex : public Query_tables_list
bool table_or_sp_used();
bool is_partition_management() const;
/**
@brief check if the statement is a single-level join
@return result of the check
@retval TRUE The statement doesn't contain subqueries, unions and
stored procedure calls.
@retval FALSE There are subqueries, UNIONs or stored procedure calls.
*/
bool is_single_level_stmt()
{
/*
This check exploits the fact that the last added to all_select_list is
on its top. So select_lex (as the first added) will be at the tail
of the list.
*/
if (&select_lex == all_selects_list && !sroutines.records)
{
DBUG_ASSERT(!all_selects_list->next_select_in_list());
return TRUE;
}
return FALSE;
}
} LEX;
struct st_lex_local: public st_lex