8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 02:03:04 +01:00

Fixed a number of issues for Dialect 1 and Dialect 3 (string arithmetics) + some cleanup.

The issues are:
1) '1.5' / '0.5' doesn't work in Dialect 1
2) avg ('1.5') doesn't work in Dialect 1
3) 5 * '1.5' produces INT result instead of DOUBLE PRECISION in Dialect 1
4) sum ('1.5') produces NUMERIC(15, 2) result instead of DOUBLE PRECISION in Dialect 1
5) - '1.5' doesn't work in Dialect 1
6) '1.5' * '0.5' and '1.5' / '0.5' are not forbidden in Dialect 3
This commit is contained in:
dimitr 2005-08-06 05:36:30 +00:00
parent 273fbb7483
commit d58a557d63

View File

@ -807,7 +807,7 @@ void CME_get_dtype(const gpre_nod* node, gpre_fld* f)
CME_get_dtype(node->nod_arg[1], f);
else
CME_get_dtype(node->nod_arg[0], f);
if (!DTYPE_CAN_AVERAGE(f->fld_dtype))
if (!DTYPE_IS_NUMERIC(f->fld_dtype))
CPR_error("expression evaluation not supported");
if (gpreGlob.sw_sql_dialect != SQL_DIALECT_V5)
{