Details
Description
Description
Executing SELECT CEILING(t.c) on a table with a large DOUBLE value returns different results depending on the sql_buffer_result session variable. When sql_buffer_result is set to OFF, the correct value is returned. When set to ON, an incorrect value is returned.
Steps to Reproduce
1. Create Table and Insert Value:
CREATE TABLE t(c DOUBLE); |
INSERT INTO t VALUES (863006000000000000); |
2. Set sql_buffer_result to OFF and Query:
SET SESSION sql_buffer_result = OFF; |
SELECT CEILING(t.c) FROM t; |
Result: 863006000000000000
3. Set sql_buffer_result to ON and Query:
SET SESSION sql_buffer_result = ON; |
SELECT CEILING(t.c) FROM t; |
Result: 100000000000000000