diff options
author | Alexey Kopytov <Alexey.Kopytov@Sun.com> | 2010-04-11 11:17:42 +0400 |
---|---|---|
committer | Alexey Kopytov <Alexey.Kopytov@Sun.com> | 2010-04-11 11:17:42 +0400 |
commit | 456235a13c7e8cb5ba14072ba24ceee5fb877719 (patch) | |
tree | 9e8865e4297ebff57bac639031c2ed3e115be98a /sql/item_subselect.cc | |
parent | 93009c60da170c7a6cdf106a39226969c88de517 (diff) | |
parent | 97afbf5a279363e2052f97c96af4e36dfe7dd30a (diff) | |
download | mariadb-git-456235a13c7e8cb5ba14072ba24ceee5fb877719.tar.gz |
Automerge of mysql-5.1-bugteam to mysql-trunk-merge.
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r-- | sql/item_subselect.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 83e1f9b0625..3e3f8e93266 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -122,6 +122,21 @@ void Item_subselect::cleanup() DBUG_VOID_RETURN; } + +/* + We cannot use generic Item::safe_charset_converter() because + Subselect transformation does not happen in view_prepare_mode + and thus we can not evaluate val_...() for const items. +*/ + +Item *Item_subselect::safe_charset_converter(CHARSET_INFO *tocs) +{ + Item_func_conv_charset *conv= + new Item_func_conv_charset(this, tocs, thd->lex->view_prepare_mode ? 0 : 1); + return conv->safe ? conv : NULL; +} + + void Item_singlerow_subselect::cleanup() { DBUG_ENTER("Item_singlerow_subselect::cleanup"); |