Ads were blocked by your webbrowser.

This is not a problem, but keep in mind that developing HeidiSQL, user support and hosting takes time and money.

You may want to send a donation instead.

Bug in Select with replace(sum)

themis's profile image themis posted 3 months ago in General

Hi, I would like to submit a little bug :

with HEIDI 9.3.0.4984 32bits the query :

select sum(mt) totalmt, replace(sum(mt),'.',',') formattotalmt from test;

give this result grid :

totalmt formattotalmt

15.50 15,50

with HEIDI 10.1.0.5464 32bits and 64bits, and even with the nightly build 10.1.0.5572 the same query :

select sum(mt) totalmt, replace(sum(mt),'.',',') formattotalmt from test;

give an erroneus grid :

totalmt HEX(formattotalmt)

15.50 0x31352C3530

Here is the little script to create the table test :

create table test(
ID int(11) not null, 
Mt double(10,2) NOT NULL DEFAULT '0.00',
primary key(ID)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
insert into test values (1,10),(2,5.5);

Sincerely yours, Themis

ansgar's profile image ansgar posted 3 months ago

That REPLACE() function obviously returns its value with a binary collation, which HeidiSQL can display in hex format. Activating the "Show binary data as text" button, you can switch to see text in such columns: https://www.heidisql.com/help.php#data

themis's profile image themis posted 3 months ago

Thanks Ansgar, That was the solution.

And Congratulations for your very very good work.

Themis, Old Delphi developper

Please login to leave a reply, or register at first.