diff options
author | unknown <monty@narttu.mysql.fi> | 2000-10-11 00:48:03 +0300 |
---|---|---|
committer | unknown <monty@narttu.mysql.fi> | 2000-10-11 00:48:03 +0300 |
commit | f4d7717ceaabc8948c4517dab603f1103222a176 (patch) | |
tree | c6677bb9b8f4eee0143a25aa5b5b345004edc2ff /sql/sql_lex.cc | |
parent | dbde9337c201b7a53357d3904c7f0ac5b046ed85 (diff) | |
download | mariadb-git-f4d7717ceaabc8948c4517dab603f1103222a176.tar.gz |
Portability fixes
Docs/manual.texi:
Update for Access 2000
extra/perror.c:
Added --silent
include/my_pthread.h:
Patch for windows
scripts/safe_mysqld.sh:
Fix of bug in --patch
sql/sql_lex.cc:
Allow numbers of type 1e1
sql/sql_string.h:
Safety fix
sql/sql_table.cc:
Portability fix
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r-- | sql/sql_lex.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 50c9ab852c1..ca36cb9f205 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -526,7 +526,8 @@ int yylex(void *arg) } if (c == 'e' || c == 'E') { - if ((c=(yyGet())) == '+' || c == '-') + // The following test is written this way to allow numbers of type 1e1 + if (isdigit(yyPeek()) || (c=(yyGet())) == '+' || c == '-') { // Allow 1E+10 if (isdigit(yyPeek())) // Number must have digit after sign { @@ -628,7 +629,8 @@ int yylex(void *arg) yyUnget(); // Fix for next loop } while (isdigit(c=yyGet())) ; // Incomplete real or int number - if ((c == 'e' || c == 'E') && (yyPeek() == '+' || yyPeek() == '-')) + if ((c == 'e' || c == 'E') && + (yyPeek() == '+' || yyPeek() == '-' || isdigit(yyPeek()))) { // Real number yyUnget(); c= '.'; // Fool next test @@ -647,7 +649,7 @@ int yylex(void *arg) if (c == 'e' || c == 'E') { c = yyGet(); - if (c != '-' && c != '+') + if (c != '-' && c != '+' && !isdigit(c)) { // No exp sig found state= STATE_CHAR; break; |