summaryrefslogtreecommitdiff
path: root/sql/set_var.cc
diff options
context:
space:
mode:
authoristruewing@chilla.local <>2007-05-31 21:28:04 +0200
committeristruewing@chilla.local <>2007-05-31 21:28:04 +0200
commit4ba6a0fb7ea0a5b2027379f94d72a3b029eaaf33 (patch)
tree3b6c850737e6e47c518de5113931e3925c301869 /sql/set_var.cc
parent2c8f4f97910bec416fc9a375cf1c74be2ca395cc (diff)
parent06cba627b9a3db7cc08e45b32184fef56ac667bb (diff)
downloadmariadb-git-4ba6a0fb7ea0a5b2027379f94d72a3b029eaaf33.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into chilla.local:/home/mydev/mysql-5.1-axmrg
Diffstat (limited to 'sql/set_var.cc')
-rw-r--r--sql/set_var.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc
index bf6a503762c..3a1ab84738b 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -1489,6 +1489,25 @@ Item *sys_var::item(THD *thd, enum_var_type var_type, LEX_STRING *base)
pthread_mutex_unlock(&LOCK_global_system_variables);
return new Item_int(value,1);
}
+ case SHOW_CHAR_PTR:
+ {
+ Item *tmp;
+ pthread_mutex_lock(&LOCK_global_system_variables);
+ char *str= *(char**) value_ptr(thd, var_type, base);
+ if (str)
+ {
+ uint length= strlen(str);
+ tmp= new Item_string(thd->strmake(str, length), length,
+ system_charset_info, DERIVATION_SYSCONST);
+ }
+ else
+ {
+ tmp= new Item_null();
+ tmp->collation.set(system_charset_info, DERIVATION_SYSCONST);
+ }
+ pthread_mutex_unlock(&LOCK_global_system_variables);
+ return tmp;
+ }
case SHOW_CHAR:
{
Item *tmp;