Description:
Examples:
My box (Intel Pentium M -- little endian)
SELECT 1.0E+300, CAST(1.0E+300 AS DECIMAL);
1.0E+300 1e+300
CAST(1.0E+300 AS DECIMAL) 803823920273299782054992133678869364753954248541633605124057805104488924519071744
<--- I expect 65 times the digit 9.
Warnings:
Level Error
Code 1292
Message Truncated incorrect DECIMAL value: ''
aix52 (PowerPC -- big endian)
SELECT 1.0E+300, CAST(1.0E+300 AS DECIMAL);
1.0E+300 1e+300
CAST(1.0E+300 AS DECIMAL) 0
<--- I expect 65 times the digit 9.
Warnings:
Level Error
Code 1292
Message Truncated incorrect DECIMAL value: ''
When a value is too big for a certain data type, MySQL tends
to return the biggest value of the data type range.
I expect 65 times the digit 9.
The cast result on my box is big, but not correct.
The cast result on aix52 is totally ugly.
BTW: INSERT INTO ... <DECIMAL(65) COLUMN>= 1E+300
works like expected on both boxes
(gives the truncation warning + 65 times the 9 as result)
This bug harms the development of testcases.
Currently we have only one file with expected
results independend of the processor architecture.
My environment:
- Intel PC with Linux(SuSE 9.3)
- MySQL compiled from source
Version 5.0 ChangeSet@1.1980, 2005-09-19
aix52:
- PowerPC
- Version 5.0 last ChangeSet around 2005-09-13
How to repeat:
Please execute the statements above.