1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

Make the sqlite3_table_column_metadata() interface available by default and

without requiring the SQLITE_ENABLE_COLUMN_METADATA compile-time option.
Other sqlite3_column_* interfaces that have a run-time penalty even if they
are unused still require the SQLITE_ENABLE_COLUMN_METADATA option at
compile-time.

FossilOrigin-Name: 4f7549ff924b8ed8f90fc447cd4be11421453984
This commit is contained in:
drh
2014-12-09 19:07:29 +00:00
parent f5471925c9
commit 8c3026ecf3
7 changed files with 11 additions and 26 deletions

View File

@@ -1,5 +1,5 @@
C Add\sthe\sSQLITE_REVERSE_UNORDERED_SELECTS\scompile-time\soption\sthat\scauses\sthe\n"PRAGMA\sreverse_unordered_selects"\ssetting\sto\sbe\son\sby\sdefault. C Make\sthe\ssqlite3_table_column_metadata()\sinterface\savailable\sby\sdefault\sand\nwithout\srequiring\sthe\sSQLITE_ENABLE_COLUMN_METADATA\scompile-time\soption.\nOther\ssqlite3_column_*\sinterfaces\sthat\shave\sa\srun-time\spenalty\seven\sif\sthey\nare\sunused\sstill\srequire\sthe\sSQLITE_ENABLE_COLUMN_METADATA\soption\sat\ncompile-time.
D 2014-12-09T15:12:11.575 D 2014-12-09T19:07:29.805
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 6c4f961fa91d0b4fa121946a19f9e5eac2f2f809 F Makefile.in 6c4f961fa91d0b4fa121946a19f9e5eac2f2f809
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -194,8 +194,8 @@ F src/insert.c 5b9243a33726008cc4132897d2be371db12a13be
F src/journal.c b4124532212b6952f42eb2c12fa3c25701d8ba8d F src/journal.c b4124532212b6952f42eb2c12fa3c25701d8ba8d
F src/legacy.c ba1863ea58c4c840335a84ec276fc2b25e22bc4e F src/legacy.c ba1863ea58c4c840335a84ec276fc2b25e22bc4e
F src/lempar.c 7274c97d24bb46631e504332ccd3bd1b37841770 F src/lempar.c 7274c97d24bb46631e504332ccd3bd1b37841770
F src/loadext.c de741e66e5ddc1598d904d7289239696e40ed994 F src/loadext.c 86bd4e2fccd520b748cba52492ab60c4a770f660
F src/main.c 378923ed4cb27ca7486062d07b1e67973c8beca7 F src/main.c ad4c0ed3b4731274aabb91b9158405a48dfaabad
F src/malloc.c 740db54387204c9a2eb67c6d98e68b08e9ef4eab F src/malloc.c 740db54387204c9a2eb67c6d98e68b08e9ef4eab
F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645 F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645
F src/mem1.c faf615aafd8be74a71494dfa027c113ea5c6615f F src/mem1.c faf615aafd8be74a71494dfa027c113ea5c6615f
@@ -230,7 +230,7 @@ F src/resolve.c f6c46d3434439ab2084618d603e6d6dbeb0d6ada
F src/rowset.c eccf6af6d620aaa4579bd3b72c1b6395d9e9fa1e F src/rowset.c eccf6af6d620aaa4579bd3b72c1b6395d9e9fa1e
F src/select.c f377fb8a5c73c10678ea74f3400f7913943e3d75 F src/select.c f377fb8a5c73c10678ea74f3400f7913943e3d75
F src/shell.c 45d9c9bd7cde07845af957f2d849933b990773cf F src/shell.c 45d9c9bd7cde07845af957f2d849933b990773cf
F src/sqlite.h.in 6ec654324cb490ea3d8a7be28b8c7d37fe4ad282 F src/sqlite.h.in a68ac3ba964e17c446457944b41ad50313a11b21
F src/sqlite3.rc 992c9f5fb8285ae285d6be28240a7e8d3a7f2bad F src/sqlite3.rc 992c9f5fb8285ae285d6be28240a7e8d3a7f2bad
F src/sqlite3ext.h 17d487c3c91b0b8c584a32fbeb393f6f795eea7d F src/sqlite3ext.h 17d487c3c91b0b8c584a32fbeb393f6f795eea7d
F src/sqliteInt.h 28049b803b74a7f73242a8226915ea00ebb1309f F src/sqliteInt.h 28049b803b74a7f73242a8226915ea00ebb1309f
@@ -238,7 +238,7 @@ F src/sqliteLimit.h 164b0e6749d31e0daa1a4589a169d31c0dec7b3d
F src/status.c 81712116e826b0089bb221b018929536b2b5406f F src/status.c 81712116e826b0089bb221b018929536b2b5406f
F src/table.c f142bba7903e93ca8d113a5b8877a108ad1a27dc F src/table.c f142bba7903e93ca8d113a5b8877a108ad1a27dc
F src/tclsqlite.c 0a874655dd39a9875e39c5d3c464db662171d228 F src/tclsqlite.c 0a874655dd39a9875e39c5d3c464db662171d228
F src/test1.c ebb8cd3c94a2ac8851b7b0b1349284e73a8b4c7a F src/test1.c fa655a378b11bf811f0c15c56eb1d232118224cc
F src/test2.c 98049e51a17dc62606a99a9eb95ee477f9996712 F src/test2.c 98049e51a17dc62606a99a9eb95ee477f9996712
F src/test3.c 1c0e5d6f080b8e33c1ce8b3078e7013fdbcd560c F src/test3.c 1c0e5d6f080b8e33c1ce8b3078e7013fdbcd560c
F src/test4.c 9b32d22f5f150abe23c1830e2057c4037c45b3df F src/test4.c 9b32d22f5f150abe23c1830e2057c4037c45b3df
@@ -404,7 +404,7 @@ F test/collate7.test 8ec29d98f3ee4ccebce6e16ce3863fb6b8c7b868
F test/collate8.test df26649cfcbddf109c04122b340301616d3a88f6 F test/collate8.test df26649cfcbddf109c04122b340301616d3a88f6
F test/collate9.test 3adcc799229545940df2f25308dd1ad65869145a F test/collate9.test 3adcc799229545940df2f25308dd1ad65869145a
F test/collateA.test b8218ab90d1fa5c59dcf156efabb1b2599c580d6 F test/collateA.test b8218ab90d1fa5c59dcf156efabb1b2599c580d6
F test/colmeta.test 087c42997754b8c648819832241daf724f813322 F test/colmeta.test 63f92e28d87de59430b1a1a9bb43ad7f8d19335e
F test/colname.test 08948a4809d22817e0e5de89c7c0a8bd90cb551b F test/colname.test 08948a4809d22817e0e5de89c7c0a8bd90cb551b
F test/conflict.test 841bcf7cabbfca39c577eb8411ea8601843b46a8 F test/conflict.test 841bcf7cabbfca39c577eb8411ea8601843b46a8
F test/conflict2.test 0d3af4fb534fa1bd020c79960bb56e4d52655f09 F test/conflict2.test 0d3af4fb534fa1bd020c79960bb56e4d52655f09
@@ -1226,7 +1226,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32 F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
P b05340fe3cd5f1676a55023228dc8d1a92de5936 P 75a803e694d2c4e67579f45d54a0aaf120411a6e
R 30f0205c6ecccf655d5a50e721435aae R 9dd53b5b296f2bafeeb64e18470c82ee
U drh U drh
Z b3e21bd27e95301a6024ba1e3af7b9e7 Z b9a2aab60506af9678a60cdb34c9d56c

View File

@@ -1 +1 @@
75a803e694d2c4e67579f45d54a0aaf120411a6e 4f7549ff924b8ed8f90fc447cd4be11421453984

View File

@@ -34,7 +34,6 @@
# define sqlite3_column_table_name16 0 # define sqlite3_column_table_name16 0
# define sqlite3_column_origin_name 0 # define sqlite3_column_origin_name 0
# define sqlite3_column_origin_name16 0 # define sqlite3_column_origin_name16 0
# define sqlite3_table_column_metadata 0
#endif #endif
#ifdef SQLITE_OMIT_AUTHORIZATION #ifdef SQLITE_OMIT_AUTHORIZATION

View File

@@ -3149,7 +3149,6 @@ void sqlite3_thread_cleanup(void){
** Return meta information about a specific column of a database table. ** Return meta information about a specific column of a database table.
** See comment in sqlite3.h (sqlite.h.in) for details. ** See comment in sqlite3.h (sqlite.h.in) for details.
*/ */
#ifdef SQLITE_ENABLE_COLUMN_METADATA
int sqlite3_table_column_metadata( int sqlite3_table_column_metadata(
sqlite3 *db, /* Connection handle */ sqlite3 *db, /* Connection handle */
const char *zDbName, /* Database name or NULL */ const char *zDbName, /* Database name or NULL */
@@ -3256,7 +3255,6 @@ error_out:
sqlite3_mutex_leave(db->mutex); sqlite3_mutex_leave(db->mutex);
return rc; return rc;
} }
#endif
/* /*
** Sleep for a little while. Return the amount of time slept. ** Sleep for a little while. Return the amount of time slept.

View File

@@ -5207,9 +5207,6 @@ SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N);
** error occurs during this process, or if the requested table or column ** error occurs during this process, or if the requested table or column
** cannot be found, an [error code] is returned and an error message left ** cannot be found, an [error code] is returned and an error message left
** in the [database connection] (to be retrieved using sqlite3_errmsg()).)^ ** in the [database connection] (to be retrieved using sqlite3_errmsg()).)^
**
** ^This API is only available if the library was compiled with the
** [SQLITE_ENABLE_COLUMN_METADATA] C-preprocessor symbol defined.
*/ */
int sqlite3_table_column_metadata( int sqlite3_table_column_metadata(
sqlite3 *db, /* Connection handle */ sqlite3 *db, /* Connection handle */

View File

@@ -1569,7 +1569,6 @@ static int test_libversion_number(
** Usage: sqlite3_table_column_metadata DB dbname tblname colname ** Usage: sqlite3_table_column_metadata DB dbname tblname colname
** **
*/ */
#ifdef SQLITE_ENABLE_COLUMN_METADATA
static int test_table_column_metadata( static int test_table_column_metadata(
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
@@ -1618,7 +1617,6 @@ static int test_table_column_metadata(
return TCL_OK; return TCL_OK;
} }
#endif
#ifndef SQLITE_OMIT_INCRBLOB #ifndef SQLITE_OMIT_INCRBLOB
@@ -6778,9 +6776,7 @@ int Sqlitetest1_Init(Tcl_Interp *interp){
{ "sqlite3_shared_cache_report", sqlite3BtreeSharedCacheReport, 0}, { "sqlite3_shared_cache_report", sqlite3BtreeSharedCacheReport, 0},
#endif #endif
{ "sqlite3_libversion_number", test_libversion_number, 0 }, { "sqlite3_libversion_number", test_libversion_number, 0 },
#ifdef SQLITE_ENABLE_COLUMN_METADATA
{ "sqlite3_table_column_metadata", test_table_column_metadata, 0 }, { "sqlite3_table_column_metadata", test_table_column_metadata, 0 },
#endif
#ifndef SQLITE_OMIT_INCRBLOB #ifndef SQLITE_OMIT_INCRBLOB
{ "sqlite3_blob_reopen", test_blob_reopen, 0 }, { "sqlite3_blob_reopen", test_blob_reopen, 0 },
#endif #endif

View File

@@ -17,11 +17,6 @@
set testdir [file dirname $argv0] set testdir [file dirname $argv0]
source $testdir/tester.tcl source $testdir/tester.tcl
ifcapable !columnmetadata {
finish_test
return
}
# Set up a schema in the main and temp test databases. # Set up a schema in the main and temp test databases.
do_test colmeta-0 { do_test colmeta-0 {
execsql { execsql {