diff options
author | Guilhem Bichot <guilhem@mysql.com> | 2008-11-21 15:21:50 +0100 |
---|---|---|
committer | Guilhem Bichot <guilhem@mysql.com> | 2008-11-21 15:21:50 +0100 |
commit | 33b194c36ec28528fd349dd17412848de2f1171c (patch) | |
tree | 68cba4897925b9395dd0bfe53b5b95a777d78637 /sql/sp_head.cc | |
parent | 8d96bcda72df224f7a656cbcc1535a027bada75f (diff) | |
parent | 1d521f6c20881997c9162bd11cadcbc77d20520b (diff) | |
download | mariadb-git-33b194c36ec28528fd349dd17412848de2f1171c.tar.gz |
Merge of 5.1-main into 5.1-maria. There were no changes to storage/myisam, or mysql-test/t/*myisam*.
However there were three new tests mysql-test/suite/parts/t/partition*myisam.test, of which I make here
copies for Maria.
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r-- | sql/sp_head.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc index d1f920fd3a5..534cd0a7ca1 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -126,6 +126,9 @@ sp_get_item_value(THD *thd, Item *item, String *str) if (cs->escape_with_backslash_is_dangerous) buf.append(' '); append_query_string(cs, result, &buf); + buf.append(" COLLATE '"); + buf.append(item->collation.collation->name); + buf.append('\''); str->copy(buf); return str; @@ -1940,10 +1943,14 @@ sp_head::execute_procedure(THD *thd, List<Item> *args) we'll leave it here. */ if (!thd->in_sub_stmt) - close_thread_tables(thd); + { + thd->lex->unit.cleanup(); + close_thread_tables(thd); + thd->rollback_item_tree_changes(); + } - DBUG_PRINT("info",(" %.*s: eval args done", - (int) m_name.length, m_name.str)); + DBUG_PRINT("info",(" %.*s: eval args done", (int) m_name.length, + m_name.str)); } if (!(m_flags & LOG_SLOW_STATEMENTS) && thd->enable_slow_log) { |