From 609277f942e5479976d5a1f31da55fd2cf646109 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 27 Mar 2007 12:31:44 -0400 Subject: Bug#23491 MySQLDump prefix function call in a view by database name - mysqldump executes a SHOW CREATE VIEW statement to generate the text that it outputs. When the function name is retrieved it's database name is unconditionally prepended. This change causes the function's database name to be prepended only when it was used to define the function. mysql-test/r/information_schema.result: Bug#23491 MySQLDump prefix function call in a view by database name - Updated Results. mysql-test/r/mysqldump.result: Bug#23491 MySQLDump prefix function call in a view by database name - Added new results. mysql-test/r/sp-code.result: Bug#23491 MySQLDump prefix function call in a view by database name - Updated Results. mysql-test/r/udf.result: Bug#23491 MySQLDump prefix function call in a view by database name - Updated Results. mysql-test/t/mysqldump.test: Bug#23491 MySQLDump prefix function call in a view by database name - Added new testcase. sql/item_func.cc: Bug#23491 MySQLDump prefix function call in a view by database name - Use new m_explicit_name member when deciding whether or not to prepend the db name while building the function name. sql/sp.cc: Bug#23491 MySQLDump prefix function call in a view by database name - Use new sp_name constructor. sql/sp_head.h: Bug#23491 MySQLDump prefix function call in a view by database name - Add m_explicit_name member to sp_name object. - Redefined sp_name constructor to include new member. sql/sql_yacc.yy: Bug#23491 MySQLDump prefix function call in a view by database name - Use new sp_name constructors. --- sql/sp.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sp.cc') diff --git a/sql/sp.cc b/sql/sp.cc index 2bb13b02e14..c8701aa2c87 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -1068,7 +1068,7 @@ sp_exist_routines(THD *thd, TABLE_LIST *routines, bool any, bool no_error) lex_name.length= strlen(routine->table_name); lex_db.str= thd->strmake(routine->db, lex_db.length); lex_name.str= thd->strmake(routine->table_name, lex_name.length); - name= new sp_name(lex_db, lex_name); + name= new sp_name(lex_db, lex_name, true); name->init_qname(thd); sp_object_found= sp_find_routine(thd, TYPE_ENUM_PROCEDURE, name, &thd->sp_proc_cache, FALSE) != NULL || -- cgit v1.2.1