summaryrefslogtreecommitdiff
path: root/sql/sp_head.h
diff options
context:
space:
mode:
authoranozdrin/alik@booka. <>2006-07-27 17:57:43 +0400
committeranozdrin/alik@booka. <>2006-07-27 17:57:43 +0400
commitb7f403b546b83f40ff48479c9dd909e38ae9eb26 (patch)
tree3a62fb0611cd97599fba47d89d0a7be1ba566c11 /sql/sp_head.h
parent7b34bbc43ce13361fcc1b42030d2e4fd7ab4fc7c (diff)
downloadmariadb-git-b7f403b546b83f40ff48479c9dd909e38ae9eb26.tar.gz
Fix for BUG#16211: Stored function return type for strings is ignored.
Fix for BUG#16676: Database CHARSET not used for stored procedures The problem in BUG#16211 is that CHARSET-clause of the return type for stored functions is just ignored. The problem in BUG#16676 is that if character set is not explicitly specified for sp-variable, the server character set is used instead of the database one. The fix has two parts: - always store CHARSET-clause of the return type along with the type definition in mysql.proc.returns column. "Always" means that CHARSET-clause is appended even if it has not been explicitly specified in CREATE FUNCTION statement (this affects BUG#16211 only). Storing CHARSET-clause if it is not specified is essential to avoid changing character set if the database character set is altered in the future. NOTE: this change is not backward compatible with the previous releases. - use database default character set if CHARSET-clause is not explicitly specified (this affects both BUG#16211 and BUG#16676). NOTE: this also breaks backward compatibility.
Diffstat (limited to 'sql/sp_head.h')
-rw-r--r--sql/sp_head.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/sp_head.h b/sql/sp_head.h
index 36747716bdc..4cd34bc9e20 100644
--- a/sql/sp_head.h
+++ b/sql/sp_head.h
@@ -193,9 +193,13 @@ public:
void
init(LEX *lex);
+ /* Copy sp name from parser. */
+ void
+ init_sp_name(THD *thd, sp_name *spname);
+
// Initialize strings after parsing header
void
- init_strings(THD *thd, LEX *lex, sp_name *name);
+ init_strings(THD *thd, LEX *lex);
int
create(THD *thd);