diff options
author | Alexander Barkov <bar@mysql.com> | 2010-11-12 13:12:15 +0300 |
---|---|---|
committer | Alexander Barkov <bar@mysql.com> | 2010-11-12 13:12:15 +0300 |
commit | 529e49f5d5de6c5b4632bbe26e05f38a00d4aa00 (patch) | |
tree | 857de10f04663e23de6cfb4be01edfbda425279e /sql/rpl_injector.h | |
parent | a5d6c009d4e956775642af284bd4f2755000bbec (diff) | |
download | mariadb-git-529e49f5d5de6c5b4632bbe26e05f38a00d4aa00.tar.gz |
Bug#58005 utf8 + get_format causes failed assertion: !str || str != Ptr'
Problem: When GET_FORMAT() is called two times from the upper
level function (e.g. LEAST in the bug report), on the second
call "res= args[0]->val_str(...)" and str point to the same
String object.
1. Fix: changing the order from
- get val_str into tmp_value then convert to str
to
- get val_str into str then convert to tmp_value
The new order is more correct: the purpose of "str" parameter
is exactly to call val_str() for arguments.
The purpose of String class members (like tmp_value) is to do further
actions on the result.
Doing it in the other way around give unexpected surprises.
2. Using str_value instead of str to do padding, for the same reason.
Diffstat (limited to 'sql/rpl_injector.h')
0 files changed, 0 insertions, 0 deletions