diff --git a/Docs/manual.texi b/Docs/manual.texi index 6843438b416..12c7df0679c 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -46461,6 +46461,8 @@ not yet 100% confident in this code. @appendixsubsec Changes in release 3.23.40 @itemize @bullet @item +Fixed parser to allow floats of type @code{1.0e1} (no sign after @code{e}). +@item Option @code{--force} to @code{myisamchk} now also updates states. @item Added option @code{--warnings} to @code{mysqld}. Now @code{mysqld} diff --git a/mysql-test/t/type_float.test b/mysql-test/t/type_float.test index 1496170a256..23941ad2913 100644 --- a/mysql-test/t/type_float.test +++ b/mysql-test/t/type_float.test @@ -3,7 +3,8 @@ # Numeric floating point. SELECT 10,10.0,10.,.1e+2,100.0e-1; -select 6e-05, -6e-05, --6e-05, -6e-05+1.000000; +SELECT 6e-05, -6e-05, --6e-05, -6e-05+1.000000; +SELECT 1e1,1.e1,1.0e1,1e+1,1.e+1,1.0e+1,1e-1,1.e-1,1.0e-1; drop table if exists t1; create table t1 (f1 float(24),f2 float(52)); diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index b8d2ee13b0e..a78fef62657 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -650,12 +650,9 @@ int yylex(void *arg) if (c == 'e' || c == 'E') { c = yyGet(); - if (c != '-' && c != '+' && !isdigit(c)) - { // No exp sig found - state= STATE_CHAR; - break; - } - if (!isdigit(yyGet())) + if (c == '-' || c == '+') + c = yyGet(); // Skipp sign + if (!isdigit(c)) { // No digit after sign state= STATE_CHAR; break;