Hello.
Support guys verified this bug. Thank you. See: http://bugs.mysql.com/bug.php?id=13815 Juri Shimon wrote: > Hello All! > > left(),right(),mid(),etc functions > + > with fixed point return value for function (or out parameter for sp) > --------------- > result has been truncated > > How to repeat: > -------------------- > mysql> drop function if exists test; > mysql> drop function if exists test1; > mysql> delimiter // > mysql> create function test () returns numeric(7,2) return left('77.247',5)// > mysql> create function test1 () returns numeric(7,2) return '77.247'// > mysql> delimiter ; > mysql> select test(),test1(); > +--------+---------+ > | test() | test1() | > +--------+---------+ > | 77.00 | 77.25 | > +--------+---------+ > 1 row in set (0.02 sec) > > How to correct: > use global variable as intermediate storage (with side effect) > -------------------- > mysql> drop function if exists test; > mysql> delimiter // > mysql> create function test () returns numeric(7,2) return > @z:=left('77.247',5)// > mysql> delimiter ; > mysql> select test(),test1(); > +--------+---------+ > | test() | test1() | > +--------+---------+ > | 77.24 | 77.25 | > +--------+---------+ > 1 row in set (0.00 sec) > > > Is it a known bug? > > WBR, Juri. > > -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]