/ Check-in [eb98265b]
Login

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

Overview
Comment:Fix the implementation of CURRENT_TIMESTAME and CURRENT_DATE when SQLITE_OMIT_DATETIME_FUNCS is defined.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: eb98265b59db59965b468a7070739921da55efc4
User & Date: drh 2010-01-12 19:28:20
Context
2010-01-12
23:54
Make sure internal queries are well ordered, even when the reverse_unordered_selects pragma is in effect. Ticket [eb942c64a157]. check-in: 0209f171 user: drh tags: trunk
19:28
Fix the implementation of CURRENT_TIMESTAME and CURRENT_DATE when SQLITE_OMIT_DATETIME_FUNCS is defined. check-in: eb98265b user: drh tags: trunk
17:57
Update comments in fts3_snippet.c. check-in: dd9689b7 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/date.c.

  1088   1088       FUNCTION(datetime,         -1, 0, 0, datetimeFunc  ),
  1089   1089       FUNCTION(strftime,         -1, 0, 0, strftimeFunc  ),
  1090   1090       FUNCTION(current_time,      0, 0, 0, ctimeFunc     ),
  1091   1091       FUNCTION(current_timestamp, 0, 0, 0, ctimestampFunc),
  1092   1092       FUNCTION(current_date,      0, 0, 0, cdateFunc     ),
  1093   1093   #else
  1094   1094       STR_FUNCTION(current_time,      0, "%H:%M:%S",          0, currentTimeFunc),
  1095         -    STR_FUNCTION(current_timestamp, 0, "%Y-%m-%d",          0, currentTimeFunc),
  1096         -    STR_FUNCTION(current_date,      0, "%Y-%m-%d %H:%M:%S", 0, currentTimeFunc),
         1095  +    STR_FUNCTION(current_date,      0, "%Y-%m-%d",          0, currentTimeFunc),
         1096  +    STR_FUNCTION(current_timestamp, 0, "%Y-%m-%d %H:%M:%S", 0, currentTimeFunc),
  1097   1097   #endif
  1098   1098     };
  1099   1099     int i;
  1100   1100     FuncDefHash *pHash = &GLOBAL(FuncDefHash, sqlite3GlobalFunctions);
  1101   1101     FuncDef *aFunc = (FuncDef*)&GLOBAL(FuncDef, aDateTimeFuncs);
  1102   1102   
  1103   1103     for(i=0; i<ArraySize(aDateTimeFuncs); i++){
  1104   1104       sqlite3FuncDefInsert(pHash, &aFunc[i]);
  1105   1105     }
  1106   1106   }