SQLite

Check-in [076658e5]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:MSVC does not allow constant expressions as initializers for constants with /fp:strict.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 076658e5d21d9284448f41312b83a6c3d25394c2bfa088ef6cdfe1dc60277856
User & Date: drh 2020-03-28 12:01:25
Context
2020-03-28
19:02
Enhancements to the SQLITE_ENABLE_SETLK_TIMEOUT compile-time option to avoid rare deadlocks on recovery. (check-in: 06885e9a user: drh tags: trunk)
12:01
MSVC does not allow constant expressions as initializers for constants with /fp:strict. (check-in: 076658e5 user: drh tags: trunk)
2020-03-26
00:29
Reinstate the optimization that converts "x IN (y)" into "x==y". (check-in: 27936e68 user: drh tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/date.c.

617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
static const struct {
  u8 eType;           /* Transformation type code */
  u8 nName;           /* Length of th name */
  char *zName;        /* Name of the transformation */
  double rLimit;      /* Maximum NNN value for this transform */
  double rXform;      /* Constant used for this transform */
} aXformType[] = {
  { 0, 6, "second", 464269060800.0, 86400000.0/(24.0*60.0*60.0) },
  { 0, 6, "minute", 7737817680.0,   86400000.0/(24.0*60.0)      },
  { 0, 4, "hour",   128963628.0,    86400000.0/24.0             },
  { 0, 3, "day",    5373485.0,      86400000.0                  },
  { 1, 5, "month",  176546.0,       30.0*86400000.0             },
  { 2, 4, "year",   14713.0,        365.0*86400000.0            },
};

/*
** Process a modifier to a date-time stamp.  The modifiers are
** as follows:
**
**     NNN days







|
|
|
|
|
|







617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
static const struct {
  u8 eType;           /* Transformation type code */
  u8 nName;           /* Length of th name */
  char *zName;        /* Name of the transformation */
  double rLimit;      /* Maximum NNN value for this transform */
  double rXform;      /* Constant used for this transform */
} aXformType[] = {
  { 0, 6, "second", 464269060800.0, 1000.0         },
  { 0, 6, "minute", 7737817680.0,   60000.0        },
  { 0, 4, "hour",   128963628.0,    3600000.0      },
  { 0, 3, "day",    5373485.0,      86400000.0     },
  { 1, 5, "month",  176546.0,       2592000000.0   },
  { 2, 4, "year",   14713.0,        31536000000.0  },
};

/*
** Process a modifier to a date-time stamp.  The modifiers are
** as follows:
**
**     NNN days