Fix for bug #14863 "Triggers: crash if create and there is no current database".
Now when we create or drop trigger we check that both trigger name and trigger table always have database part specified. Thus we give an error if it they are not specified explicitly or implicitly via current database. mysql-test/r/trigger.result: Added test for bug #14863 "Triggers: crash if create and there is no current database". mysql-test/t/trigger.test: Added test for bug #14863 "Triggers: crash if create and there is no current database". sql/sql_trigger.cc: mysql_create_or_drop_trigger(): Now we check that both trigger name and trigger table have database part specified (explicitly or implicitly via current database. Note that in latter case sp_name::m_db is already set by parser). Table_triggers_list::create_trigger()/::add_table_for_trigger(): Simplified method/function's code since now they can assume that sp_name::m_db is always filled now. trigname_file_parameters: Removed comment which is no longer true.
Showing
Please register or sign in to comment