| 1351 | |
| 1352 | |
| 1353 | double |
| 1354 | double_from_string_with_check (const CHARSET_INFO *cs, |
| 1355 | const char *cptr, char *end) |
| 1356 | { |
| 1357 | int error; |
| 1358 | char *org_end; |
| 1359 | double tmp; |
| 1360 | |
| 1361 | org_end= end; |
| 1362 | tmp= my_strntod(cs, (char*) cptr, end - cptr, &end, &error); |
| 1363 | if (error || (end != org_end && !check_if_only_end_space(cs, end, org_end))) |
| 1364 | { |
| 1365 | ErrConvString err(cptr, org_end - cptr, cs); |
| 1366 | push_warning_printf(current_thd, Sql_condition::WARN_LEVEL_WARN, |
| 1367 | ER_TRUNCATED_WRONG_VALUE, |
| 1368 | ER(ER_TRUNCATED_WRONG_VALUE), "DOUBLE", |
| 1369 | err.ptr()); |
| 1370 | } |
| 1371 | return tmp; |
| 1372 | } |
| 1373 | |
| 1374 | |
| 1375 | double Item_string::val_real() |
no test coverage detected