/ Check-in [c942a38e]
Login

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

Overview
Comment:Continuing work on improved test coverage. (CVS 5415)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c942a38e9aa80770e7e2819e51b43fa7aa854d71
User & Date: drh 2008-07-15 14:47:19
Context
2008-07-15
20:56
Update column naming rules. Ticket #3221. Rules for column naming are still subject to change (except for the AS rule which we promise to keep the same) but are more consistent now. And the rules are tested using a new test script. (CVS 5416) check-in: 61f6e197 user: drh tags: trunk
14:47
Continuing work on improved test coverage. (CVS 5415) check-in: c942a38e user: drh tags: trunk
00:27
Increased test coverage. (CVS 5414) check-in: 7cf91e08 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/alter.c.

     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** This file contains C code routines that used to generate VDBE code
    13     13   ** that implements the ALTER TABLE command.
    14     14   **
    15         -** $Id: alter.c,v 1.45 2008/07/07 12:44:58 drh Exp $
           15  +** $Id: alter.c,v 1.46 2008/07/15 14:47:19 drh Exp $
    16     16   */
    17     17   #include "sqliteInt.h"
    18     18   #include <ctype.h>
    19     19   
    20     20   /*
    21     21   ** The code in this file only exists if we are not omitting the
    22     22   ** ALTER TABLE logic from the build.
................................................................................
   160    160   }
   161    161   #endif   /* !SQLITE_OMIT_TRIGGER */
   162    162   
   163    163   /*
   164    164   ** Register built-in functions used to help implement ALTER TABLE
   165    165   */
   166    166   void sqlite3AlterFunctions(sqlite3 *db){
   167         -  static const struct {
   168         -     char *zName;
   169         -     signed char nArg;
   170         -     void (*xFunc)(sqlite3_context*,int,sqlite3_value **);
   171         -  } aFuncs[] = {
   172         -    { "sqlite_rename_table",    2, renameTableFunc},
          167  +  sqlite3CreateFunc(db, "sqlite_rename_table", 2, SQLITE_UTF8, 0,
          168  +                         renameTableFunc, 0, 0);
   173    169   #ifndef SQLITE_OMIT_TRIGGER
   174         -    { "sqlite_rename_trigger",  2, renameTriggerFunc},
          170  +  sqlite3CreateFunc(db, "sqlite_rename_trigger", 2, SQLITE_UTF8, 0,
          171  +                         renameTriggerFunc, 0, 0);
   175    172   #endif
   176         -  };
   177         -  int i;
   178         -
   179         -  for(i=0; i<sizeof(aFuncs)/sizeof(aFuncs[0]); i++){
   180         -    sqlite3CreateFunc(db, aFuncs[i].zName, aFuncs[i].nArg,
   181         -        SQLITE_UTF8, 0, aFuncs[i].xFunc, 0, 0);
   182         -  }
   183    173   }
   184    174   
   185    175   /*
   186    176   ** Generate the text of a WHERE expression which can be used to select all
   187    177   ** temporary triggers on table pTab from the sqlite_temp_master table. If
   188    178   ** table pTab has no temporary triggers, or is itself stored in the 
   189    179   ** temporary database, NULL is returned.

Changes to src/main.c.

    10     10   **
    11     11   *************************************************************************
    12     12   ** Main file for the SQLite library.  The routines in this file
    13     13   ** implement the programmer interface to the library.  Routines in
    14     14   ** other files are for internal use by SQLite and should not be
    15     15   ** accessed by users of the library.
    16     16   **
    17         -** $Id: main.c,v 1.476 2008/07/11 16:15:18 drh Exp $
           17  +** $Id: main.c,v 1.477 2008/07/15 14:47:19 drh Exp $
    18     18   */
    19     19   #include "sqliteInt.h"
    20     20   #include <ctype.h>
    21     21   
    22     22   #ifdef SQLITE_ENABLE_FTS3
    23     23   # include "fts3.h"
    24     24   #endif
................................................................................
   218    218         /* Designate a buffer for scratch memory space */
   219    219         sqlite3Config.pPage = va_arg(ap, void*);
   220    220         sqlite3Config.szPage = va_arg(ap, int);
   221    221         sqlite3Config.nPage = va_arg(ap, int);
   222    222         break;
   223    223       }
   224    224   
          225  +#if defined(SQLITE_ENABLE_MEMSYS3) || defined(SQLITE_ENABLE_MEMSYS5)
   225    226       case SQLITE_CONFIG_HEAP: {
   226    227         /* Designate a buffer for heap memory space */
   227    228         sqlite3Config.pHeap = va_arg(ap, void*);
   228    229         sqlite3Config.nHeap = va_arg(ap, int);
   229    230         sqlite3Config.mnReq = va_arg(ap, int);
   230    231   
   231    232         if( sqlite3Config.pHeap==0 ){
................................................................................
   243    244           */
   244    245   #ifdef SQLITE_ENABLE_MEMSYS3
   245    246           sqlite3Config.m = sqlite3MemGetMemsys3();
   246    247   #endif
   247    248   #ifdef SQLITE_ENABLE_MEMSYS5
   248    249           sqlite3Config.m = sqlite3MemGetMemsys5();
   249    250   #endif
   250         -#if !defined(SQLITE_ENABLE_MEMSYS3) && !defined(SQLITE_ENABLE_MEMSYS5)
   251         -        rc = SQLITE_ERROR;
   252         -#endif
   253    251         }
   254    252         break;
   255    253       }
          254  +#endif
   256    255   
   257    256       default: {
   258    257         rc = SQLITE_ERROR;
   259    258         break;
   260    259       }
   261    260     }
   262    261     va_end(ap);