summaryrefslogtreecommitdiff
path: root/sql/sp_head.h
diff options
context:
space:
mode:
authorunknown <iggy@recycle.(none)>2007-03-27 12:31:44 -0400
committerunknown <iggy@recycle.(none)>2007-03-27 12:31:44 -0400
commit609277f942e5479976d5a1f31da55fd2cf646109 (patch)
tree57f840a64dcaba1c657b2edea554107300c6653b /sql/sp_head.h
parent65c34cc855ea75b1f790e738e71d304ca72403ae (diff)
downloadmariadb-git-609277f942e5479976d5a1f31da55fd2cf646109.tar.gz
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.
Diffstat (limited to 'sql/sp_head.h')
-rw-r--r--sql/sp_head.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/sp_head.h b/sql/sp_head.h
index 10eada43721..e0622e0b776 100644
--- a/sql/sp_head.h
+++ b/sql/sp_head.h
@@ -59,9 +59,10 @@ public:
calling set_routine_type().
*/
LEX_STRING m_sroutines_key;
+ bool m_explicit_name; /**< Prepend the db name? */
- sp_name(LEX_STRING db, LEX_STRING name)
- : m_db(db), m_name(name)
+ sp_name(LEX_STRING db, LEX_STRING name, bool use_explicit_name)
+ : m_db(db), m_name(name), m_explicit_name(use_explicit_name)
{
m_qname.str= m_sroutines_key.str= 0;
m_qname.length= m_sroutines_key.length= 0;
@@ -79,6 +80,7 @@ public:
m_name.length= m_qname.length= key_len - 1;
m_db.str= 0;
m_db.length= 0;
+ m_explicit_name= false;
}
// Init. the qualified name from the db and name.