diff options
author | drh <drh@noemail.net> | 2020-06-15 20:27:35 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2020-06-15 20:27:35 +0000 |
commit | 346a70ca1edd53f37e4c04a0eb11c63869ed8bc3 (patch) | |
tree | 33a280240eeed553d753d5ee7810d1ca51c973fb /src/sqliteInt.h | |
parent | 999429882edbf4fb04add7bb5338764271aead89 (diff) | |
download | sqlite-346a70ca1edd53f37e4c04a0eb11c63869ed8bc3.tar.gz sqlite-346a70ca1edd53f37e4c04a0eb11c63869ed8bc3.zip |
Provide "sqlite_schema" as an alternative name to the table that holds the
database schema.
FossilOrigin-Name: 61782a7ae3c25cf59d7a676cb295eb024d17c46e532ae78c6fe871a91d712fa9
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r-- | src/sqliteInt.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 1afca88f6..87c2bf1a9 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -1011,18 +1011,24 @@ struct BusyHandler { ** is a special table that holds the names and attributes of all ** user tables and indices. */ -#define MASTER_NAME "sqlite_master" -#define TEMP_MASTER_NAME "sqlite_temp_master" +//#define MASTER_NAME "sqlite_master" +//#define TEMP_MASTER_NAME "sqlite_temp_master" +#define DFLT_SCHEMA_TABLE "sqlite_master" +#define DFLT_TEMP_SCHEMA_TABLE "sqlite_temp_master" +#define ALT_SCHEMA_TABLE "sqlite_schema" +#define ALT_TEMP_SCHEMA_TABLE "sqlite_temp_schema" + /* -** The root-page of the master database table. +** The root-page of the schema table. */ -#define MASTER_ROOT 1 +#define SCHEMA_ROOT 1 /* -** The name of the schema table. +** The name of the schema table. The name is different for TEMP. */ -#define SCHEMA_TABLE(x) ((!OMIT_TEMPDB)&&(x==1)?TEMP_MASTER_NAME:MASTER_NAME) +#define SCHEMA_TABLE(x) \ + ((!OMIT_TEMPDB)&&(x==1)?DFLT_TEMP_SCHEMA_TABLE:DFLT_SCHEMA_TABLE) /* ** A convenience macro that returns the number of elements in @@ -4144,7 +4150,7 @@ void sqlite3DeleteColumnNames(sqlite3*,Table*); int sqlite3ColumnsFromExprList(Parse*,ExprList*,i16*,Column**); void sqlite3SelectAddColumnTypeAndCollation(Parse*,Table*,Select*,char); Table *sqlite3ResultSetOfSelect(Parse*,Select*,char); -void sqlite3OpenMasterTable(Parse *, int); +void sqlite3OpenSchemaTable(Parse *, int); Index *sqlite3PrimaryKeyIndex(Table*); i16 sqlite3TableColumnToIndex(Index*, i16); #ifdef SQLITE_OMIT_GENERATED_COLUMNS |