summaryrefslogtreecommitdiff
path: root/sql/sp_head.h
diff options
context:
space:
mode:
authoriggy@recycle.(none) <>2007-03-27 12:31:44 -0400
committeriggy@recycle.(none) <>2007-03-27 12:31:44 -0400
commitbbc38df09071ca42e0087402558dd3b745f50807 (patch)
tree57f840a64dcaba1c657b2edea554107300c6653b /sql/sp_head.h
parenta763917a6fcff597a79fdace241b4ac8cd595ec2 (diff)
downloadmariadb-git-bbc38df09071ca42e0087402558dd3b745f50807.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.
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.