1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug #52165: Assertion failed: file .\dtoa.c, line 465

The failing assertion was written with the assumption that a NULL
string can never be passed to my_strtod(). However, an empty string
may be passed under some circumstances by passing str == NULL and
*end == NULL.

Fixed the assertion to take the above case into account.

mysql-test/r/func_misc.result:
  Added a test case for bug #52165.
mysql-test/t/func_misc.test:
  Added a test case for bug #52165.
strings/dtoa.c:
  Fixed the assertion in my_strtod() to take the case of 'str == NULL
  && *end == NULL' into account.
This commit is contained in:
Alexey Kopytov
2010-04-07 13:59:02 +04:00
parent 6da92d8f19
commit ee13669126
3 changed files with 23 additions and 1 deletions

View File

@ -336,4 +336,13 @@ End of 5.0 tests
select connection_id() > 0;
connection_id() > 0
1
#
# Bug #52165: Assertion failed: file .\dtoa.c, line 465
#
CREATE TABLE t1 (a SET('a'), b INT);
INSERT INTO t1 VALUES ('', 0);
SELECT COALESCE(a) = COALESCE(b) FROM t1;
COALESCE(a) = COALESCE(b)
1
DROP TABLE t1;
End of tests