| OLD | NEW |
| 1 /* | 1 /* |
| 2 ** 2001 September 15 | 2 ** 2001 September 15 |
| 3 ** | 3 ** |
| 4 ** The author disclaims copyright to this source code. In place of | 4 ** The author disclaims copyright to this source code. In place of |
| 5 ** a legal notice, here is a blessing: | 5 ** a legal notice, here is a blessing: |
| 6 ** | 6 ** |
| 7 ** May you do good and not evil. | 7 ** May you do good and not evil. |
| 8 ** May you find forgiveness for yourself and forgive others. | 8 ** May you find forgiveness for yourself and forgive others. |
| 9 ** May you share freely, never taking more than you give. | 9 ** May you share freely, never taking more than you give. |
| 10 ** | 10 ** |
| (...skipping 2459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2470 assert( pName==0 ); | 2470 assert( pName==0 ); |
| 2471 pTab = pParse->pNewTable; | 2471 pTab = pParse->pNewTable; |
| 2472 if( !pTab ) goto exit_create_index; | 2472 if( !pTab ) goto exit_create_index; |
| 2473 iDb = sqlite3SchemaToIndex(db, pTab->pSchema); | 2473 iDb = sqlite3SchemaToIndex(db, pTab->pSchema); |
| 2474 } | 2474 } |
| 2475 pDb = &db->aDb[iDb]; | 2475 pDb = &db->aDb[iDb]; |
| 2476 | 2476 |
| 2477 assert( pTab!=0 ); | 2477 assert( pTab!=0 ); |
| 2478 assert( pParse->nErr==0 ); | 2478 assert( pParse->nErr==0 ); |
| 2479 if( sqlite3StrNICmp(pTab->zName, "sqlite_", 7)==0 | 2479 if( sqlite3StrNICmp(pTab->zName, "sqlite_", 7)==0 |
| 2480 && sqlite3StrNICmp(&pTab->zName[7],"altertab_",9)!=0 ){ | 2480 && memcmp(&pTab->zName[7],"altertab_",9)!=0 ){ |
| 2481 sqlite3ErrorMsg(pParse, "table %s may not be indexed", pTab->zName); | 2481 sqlite3ErrorMsg(pParse, "table %s may not be indexed", pTab->zName); |
| 2482 goto exit_create_index; | 2482 goto exit_create_index; |
| 2483 } | 2483 } |
| 2484 #ifndef SQLITE_OMIT_VIEW | 2484 #ifndef SQLITE_OMIT_VIEW |
| 2485 if( pTab->pSelect ){ | 2485 if( pTab->pSelect ){ |
| 2486 sqlite3ErrorMsg(pParse, "views may not be indexed"); | 2486 sqlite3ErrorMsg(pParse, "views may not be indexed"); |
| 2487 goto exit_create_index; | 2487 goto exit_create_index; |
| 2488 } | 2488 } |
| 2489 #endif | 2489 #endif |
| 2490 #ifndef SQLITE_OMIT_VIRTUALTABLE | 2490 #ifndef SQLITE_OMIT_VIRTUALTABLE |
| (...skipping 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3748 } | 3748 } |
| 3749 pKey->nField = (u16)nCol; | 3749 pKey->nField = (u16)nCol; |
| 3750 } | 3750 } |
| 3751 | 3751 |
| 3752 if( pParse->nErr ){ | 3752 if( pParse->nErr ){ |
| 3753 sqlite3DbFree(db, pKey); | 3753 sqlite3DbFree(db, pKey); |
| 3754 pKey = 0; | 3754 pKey = 0; |
| 3755 } | 3755 } |
| 3756 return pKey; | 3756 return pKey; |
| 3757 } | 3757 } |
| OLD | NEW |