Commit graph

11 commits

Author SHA1 Message Date
unknown
cb8d9c3ad4 Backport my_strntod() from 5.0
Change string->float conversion to delay division as long as possible.
This gives us more exact integer->float conversion for numbers of type '123.45E+02' (Bug #7740)




client/mysql.cc:
  Fix wront usage of charset (found during review of pushed code)
include/m_string.h:
  Backported my_strtod() from 5.0
mysql-test/mysql-test-run.sh:
  Run also mysql_client_test with --debug
mysql-test/r/ps_1general.result:
  Safety fix (if mysql_client_test.test fails)
mysql-test/r/type_float.result:
  More test
mysql-test/t/mysql_client_test.test:
  Comments for what to do if this test fails
mysql-test/t/ps_1general.test:
  Safety fix (if mysql_client_test.test fails)
mysql-test/t/type_float.test:
  More test to better test new strtod() function
  Test also bug #7740 (wrong comparsion between integer and float-in-integer-range)
sql/field.cc:
  Backport my_strntod() from 5.0
sql/item.cc:
  Backport my_strntod() from 5.0
sql/item.h:
  Backport my_strntod() from 5.0
sql/item_func.h:
  Backport my_strntod() from 5.0
sql/item_strfunc.cc:
  Backport my_strntod() from 5.0
sql/item_sum.cc:
  Backport my_strntod() from 5.0
sql/item_sum.h:
  Backport my_strntod() from 5.0
sql/procedure.h:
  Backport my_strntod() from 5.0
strings/ctype-simple.c:
  Backport my_strntod() from 5.0
strings/ctype-ucs2.c:
  Backport my_strntod() from 5.0
strings/strtod.c:
  Backport my_strntod() from 5.0
  Change conversion to delay division as long as possible.
  This gives us more exact integer-> float conversion for numbers of type '123.45E+02'
2005-02-22 12:51:23 +02:00
unknown
9c6b9eba65 EOVERFLOW moved to my_base.h - it is used not only in strtod.c
error message corrected


include/my_base.h:
  EOVERFLOW moved to my_base.h - it is used not only in strtod.c
mysql-test/r/variables.result:
  error message corrected
mysql-test/t/variables.test:
  error message corrected
sql/item_func.cc:
  error message corrected
sql/sql_yacc.yy:
  error message corrected
strings/strtod.c:
  EOVERFLOW moved to my_base.h - it is used not only in strtod.c
2004-03-16 16:35:47 +01:00
unknown
33d7754e4d Moved errno to strtod.c as one can use m_string.h without errno.h 2004-03-16 00:04:06 +02:00
unknown
4c41b82b38 merge & simple cleanup 2004-03-15 13:21:14 +02:00
unknown
67108bdfa7 Optimizations
mysql-test/r/create.result:
  Changed ERROR -> NOTE (for enum/set)
sql/lock.cc:
  Removed not needed test (table_list->db is always set)
sql/sql_repl.cc:
  Removed not needed test
sql/sql_table.cc:
  ERROR -> NOTE
  Removed not needed test
strings/strtod.c:
  Portabilty fix. (DBL_MAX *10 is not safe)
2004-03-15 12:53:27 +02:00
unknown
22657f672c my_strtod fixes:
sigsegv protection (exp overflow)
don't return inf!
use errno=EOVERFLOW to signal an overflow (as my_strntod uses errno anyway)
if errno will be too slow, my_strtod can be changed to return overflow status in a parameter (like my_strntod does)


include/m_string.h:
  EOVERFLOW
mysql-test/r/insert.result:
  updated
mysql-test/r/mysqldump.result:
  updated
strings/strtod.c:
  sigsegv protection (exp overflow)
  don't return inf!
  use errno=EOVERFLOW to signal an overflow (as my_strntod uses errno anyway)
  if errno will be too slow, it my_strtod can be changed to return overflow status in a parameter (like my_strntod does)
2004-03-14 17:25:20 +01:00
unknown
17c4d7f361 - added commands --query_vertical and --query_horisontal to client/mysqltest.cc
- get my_strtod to return inf
- get Field_float::store(double) and Field_double::store(float) to set null for 
nan value 
(as extra serg's recomendations to fix for patch on 
 Bug #2082 'mysqldump converts "inf" to null')


client/mysqltest.c:
  added commands --query_vertical and --query_horisontal
mysql-test/r/insert.result:
  converted testcase so as my_strtod can return inf now
mysql-test/r/mysqldump.result:
  converted testcase so as my_strtod can return inf now
mysql-test/t/insert.test:
  corrected tests to using --query_vertical instead of 
  pair (vertical_results,horisontal_results)
sql/field.cc:
  corrected Field_float::store(double) and Field_double::store(double)
  to set null for nan value
strings/strtod.c:
  get my_strtod to return inf
2004-03-06 03:00:21 +04:00
unknown
ada82a3daa do not use static array of pastpoints in my_strtod - it is not portable
(that is, these numbers are converted to doubles by a local OS strtod,
and on different systems they get different values)


sql/item_strfunc.cc:
  no need to check for HAVE_ISNAN here, it is taken care of in my_global.h
strings/strtod.c:
  do not use static array of pastpoints - it is not portable
  (that is, these numbers are converted to doubles by a local OS strtod,
  and on different systems they get different values)
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2004-02-27 14:40:08 +01:00
unknown
8388a57a96 minor omission that effectively disabled my_strtod fixed :)
mysql-test/r/bigint.result:
  updated
mysql-test/r/func_misc.result:
  updated
mysql-test/t/bigint.test:
  updated
2004-02-24 12:31:33 +01:00
unknown
4443e76696 - fixed C++-style comment in strings/strtod.c which caused a compile
error with the IBM xlc_r compiler


strings/strtod.c:
   - No C++ comments in .c files, please...
2004-02-18 00:23:16 +01:00
unknown
1515c12191 my_atof is deleted
strtod from mit-threads is restored and cleaned up


BitKeeper/deleted/.del-atof.c~d3edf47a9884080:
  Delete: strings/atof.c
configure.in:
  atod() is no longer used in MySQL
  isinf() now is
include/m_string.h:
  my_strtod, my_atof
include/my_global.h:
  my_atof is deleted
  define isinf()
libmysql/Makefile.shared:
  use internal strtod
sql/gstream.cc:
  use internal strtod
sql/init.cc:
  my_atof is deleted
sql/item.h:
  use internal strtod
sql/item_func.cc:
  use internal strtod
sql/item_sum.h:
  use internal strtod
sql/sql_analyse.cc:
  use internal strtod
strings/Makefile.am:
  use internal strtod
strings/ctype-simple.c:
  use internal strtod
strings/ctype-ucs2.c:
  use internal strtod
strings/strtod.c:
  cleanup
  stricter input checks (e.g. ".E10" is no longer a number)
  don't return an "inf"
2004-02-13 15:27:21 +01:00