diff options
author | Alexander Barkov <alexander.barkov@oracle.com> | 2011-01-17 15:11:33 +0300 |
---|---|---|
committer | Alexander Barkov <alexander.barkov@oracle.com> | 2011-01-17 15:11:33 +0300 |
commit | 6665ca25afdeea7a3fd2db0094d3f67af37e14ba (patch) | |
tree | 433f3a35979efa7b1649711bfe1527f18ff46beb /sql/item_strfunc.h | |
parent | a2850a2f5323bfe8eaae17746c88986cee37fc76 (diff) | |
download | mariadb-git-6665ca25afdeea7a3fd2db0094d3f67af37e14ba.tar.gz |
Bug#58371 Assertion failed: !s.uses_buffer_owned_by(this) with format string function
Introduced by the fix for bug#44766.
Problem: it's not correct to use args[0]->str_value as a buffer,
because args[0] may need this buffer for its own purposes.
Fix: adding a new class member tmp_value to use as return value.
@ mysql-test/r/ctype_many.result
@ mysql-test/t/ctype_many.test
Adding tests
@ sql/item_strfunc.cc
Changing code into traditional style:
use "str" as a buffer for the argument and tmp_value for the result value.
@ sql/item_strfunc.h
Adding tmp_value
Diffstat (limited to 'sql/item_strfunc.h')
-rw-r--r-- | sql/item_strfunc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index 6645a4c637a..408062ddc08 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -713,6 +713,7 @@ public: class Item_func_conv_charset :public Item_str_func { bool use_cached_value; + String tmp_value; public: bool safe; CHARSET_INFO *conv_charset; // keep it public |