Description:
Making a select with concat("$",format(col_num,2));
The optimized servers crash on Win9x and the debug server
shows the error message on all platforms.
Also tested the last BK 4.0
Not back trace because the compiler/debugger doesn't works
on my Win9x machine.
How to repeat:
For to see the message error:
start the server:
c:\mysql\bin>mysqld --standalone --console
030610 20:34:13 InnoDB: Started
mysqld: ready for connections.
Version: '4.0.14-max-debug-log' socket: '' port: 3306
open another console screen and with the mysql client:
C:\mysql\bin>mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.0.14-max-debug-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> select concat("$",format(2500,2));
+----------------------------+
| concat("$",format(2500,2)) |
+----------------------------+
| $2,500.00 |
+----------------------------+
1 row in set (0.17 sec)
take a look at server's screen for to see the message error:
Error: Memory allocated at c:\mysql-4.0\sql\sql_string.cpp:47 was overrun,
discovered at 'c:\mysql-4.0\sql\sql_string.h:114'
for to crash the optimized server on Win9x:
CREATE TABLE IF NOT EXISTS mc (
bill_id varchar(10) default null,
bill_date date default null,
bill_value int default null,
bill_type char(1) default null
);
insert into mc ( bill_id, bill_value,bill_type )
values ("20",1500,"0"),("27",1000,"1");
select bill_id, bill_type, concat("$", format(bill_value,2)) as Price
from mc;