Better fix for bug#22830

Events: crash with procedure which alters events with function

Post-review CS

This fix also changes the handling of KILL command combined with
subquery. It changes the error message given back to "not supported",
from parse error. The error for CREATE|ALTER EVENT has also been changed
to generate "not supported yet" instead of parse error.
In case of a SP call, the error is "not supported yet". This change
cleans the parser from code which should not belong to there. Still
LEX::expr_allows_subselect is existant because it simplifies the handling
 of SQLCOM_HA_READ which forbids subselects.
This commit is contained in:
andrey@example.com 2006-11-02 13:51:43 +01:00
commit c27a88ca2d
10 changed files with 153 additions and 40 deletions

View file

@ -2140,6 +2140,28 @@ void st_lex::restore_backup_query_tables_list(Query_tables_list *backup)
}
/*
Checks for usage of routines and/or tables in a parsed statement
SYNOPSIS
st_lex:table_or_sp_used()
RETURN
FALSE No routines and tables used
TRUE Either or both routines and tables are used.
*/
bool st_lex::table_or_sp_used()
{
DBUG_ENTER("table_or_sp_used");
if (sroutines.records || query_tables)
DBUG_RETURN(TRUE);
DBUG_RETURN(FALSE);
}
/*
Do end-of-prepare fixup for list of tables and their merge-VIEWed tables
@ -2207,6 +2229,7 @@ void st_select_lex::fix_prepare_information(THD *thd, Item **conds,
}
}
/*
There are st_select_lex::add_table_to_list &
st_select_lex::set_lock_for_tables are in sql_parse.cc