/ Check-in [3833cbac]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Fix a 10-year-old misguided attempt at parser performance improvement that actually made parsing slightly slower.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3833cbac0706ecac9a641d70b786d26f7e1a42b1
User & Date: drh 2015-11-19 13:21:31
Context
2015-11-19
14:11
If compiled with SQLITE_ENABLE_HIDDEN_COLUMNS, then columns in ordinary tables and views that have names beginning with "__hidden__" are omitted from the "*" expansion in SELECT statements and from the automatic list of columns following the table name in an INSERT INTO statement. check-in: 011904ca user: drh tags: trunk
13:21
Fix a 10-year-old misguided attempt at parser performance improvement that actually made parsing slightly slower. check-in: 3833cbac user: drh tags: trunk
2015-11-17
21:42
When using mmap mode on Win32, use a read-only mapping by default. Write to the database file using WriteFile(). Unless SQLITE_MMAP_READWRITE is defined, in which case use a read/write mapping and write into the file using memcpy(). check-in: 4f521b5b user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/build.c.

  1045   1045   
  1046   1046     /* If an error occurs, we jump here */
  1047   1047   begin_table_error:
  1048   1048     sqlite3DbFree(db, zName);
  1049   1049     return;
  1050   1050   }
  1051   1051   
  1052         -/*
  1053         -** This macro is used to compare two strings in a case-insensitive manner.
  1054         -** It is slightly faster than calling sqlite3StrICmp() directly, but
  1055         -** produces larger code.
  1056         -**
  1057         -** WARNING: This macro is not compatible with the strcmp() family. It
  1058         -** returns true if the two strings are equal, otherwise false.
  1059         -*/
  1060         -#define STRICMP(x, y) (\
  1061         -sqlite3UpperToLower[*(unsigned char *)(x)]==   \
  1062         -sqlite3UpperToLower[*(unsigned char *)(y)]     \
  1063         -&& sqlite3StrICmp((x)+1,(y)+1)==0 )
  1064         -
  1065   1052   /*
  1066   1053   ** Add a new column to the table currently being constructed.
  1067   1054   **
  1068   1055   ** The parser calls this routine once for each column declaration
  1069   1056   ** in a CREATE TABLE statement.  sqlite3StartTable() gets called
  1070   1057   ** first to get things going.  Then this routine is called for each
  1071   1058   ** column.
................................................................................
  1082   1069       sqlite3ErrorMsg(pParse, "too many columns on %s", p->zName);
  1083   1070       return;
  1084   1071     }
  1085   1072   #endif
  1086   1073     z = sqlite3NameFromToken(db, pName);
  1087   1074     if( z==0 ) return;
  1088   1075     for(i=0; i<p->nCol; i++){
  1089         -    if( STRICMP(z, p->aCol[i].zName) ){
         1076  +    if( sqlite3_stricmp(z, p->aCol[i].zName)==0 ){
  1090   1077         sqlite3ErrorMsg(pParse, "duplicate column name: %s", z);
  1091   1078         sqlite3DbFree(db, z);
  1092   1079         return;
  1093   1080       }
  1094   1081     }
  1095   1082     if( (p->nCol & 0x7)==0 ){
  1096   1083       Column *aNew;