/ Check-in [e5e39764]
Login

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

Overview
Comment:Allow strings that look like integers to be inserted into IPK columns in a UTF-16 database. (CVS 1771)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e5e39764038311cbb3555b5bd41de2563a89113e
User & Date: danielk1977 2004-06-30 02:43:38
Context
2004-06-30
03:08
Improved test coverage of func.c and hash.c. (CVS 1772) check-in: 0c999f28 user: drh tags: trunk
02:43
Allow strings that look like integers to be inserted into IPK columns in a UTF-16 database. (CVS 1771) check-in: e5e39764 user: danielk1977 tags: trunk
02:35
Minor fixes for UTF-16 databases. (CVS 1770) check-in: 6c5c11e0 user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vdbe.c.

    39     39   **
    40     40   ** Various scripts scan this source file in order to generate HTML
    41     41   ** documentation, headers files, or other derived files.  The formatting
    42     42   ** of the code in this file is, therefore, important.  See other comments
    43     43   ** in this file for details.  If in doubt, do not deviate from existing
    44     44   ** commenting and indentation practices when changing or adding code.
    45     45   **
    46         -** $Id: vdbe.c,v 1.395 2004/06/30 02:35:51 danielk1977 Exp $
           46  +** $Id: vdbe.c,v 1.396 2004/06/30 02:43:38 danielk1977 Exp $
    47     47   */
    48     48   #include "sqliteInt.h"
    49     49   #include "os.h"
    50     50   #include <ctype.h>
    51     51   #include "vdbeInt.h"
    52     52   
    53     53   /*
................................................................................
  1412   1412       i64 v;
  1413   1413       if( sqlite3VdbeChangeEncoding(pTos, SQLITE_UTF8)
  1414   1414          || sqlite3VdbeMemNulTerminate(pTos) ){
  1415   1415         goto no_mem;
  1416   1416       }
  1417   1417       if( !sqlite3atoi64(pTos->z, &v) ){
  1418   1418         double r;
  1419         -      if( !sqlite3IsNumber(pTos->z, 0, db->enc) ){
         1419  +      if( !sqlite3IsNumber(pTos->z, 0, SQLITE_UTF8) ){
  1420   1420           goto mismatch;
  1421   1421         }
  1422   1422         Realify(pTos);
  1423   1423         v = (int)pTos->r;
  1424   1424         r = (double)v;
  1425   1425         if( r!=pTos->r ){
  1426   1426           goto mismatch;