Hi Sergei,
I had a similar idea yesterday. A statement like this will do the trick:
((Item_field*)tempCond)->val_str(&tempCond->str_value);
My assumption was that there is a general approach valid for all classes of type Item and derived classes. This seems to be valid (e.g. Item_string) but is not valid for Item_field.
OK, problem solved.
Thanks for your help.
AugustQ
Am Mittwoch, den 22.02.2017, 12:13 +0100 schrieb Sergei Golubchik:
Hi, AugustQ!
On Feb 21, AugustQ wrote:
Hi Sergej,
attached you will find a file with commands for generating the effect.
It's not a script so please copy and paste the lines into your
favourite front-end.
Here is the result on my test:
# the result in cond_push():
for TestSmall: OK
for TestBig: OK
as you cann see from the INSERT-statement above it is:
1st: is <>, should have been <12>
It is 12. Don't look at Item::str_value. In case of the Item_field, you
need to look at item->field->ptr.
2nd: is <2>, should have been <3717968>
It's 3717968
3rd: is <222 >, should have been <222>
And so on, all values are as they should've been.
Regards,
Sergei
Chief Architect MariaDB
and security@mariadb.org