Fix the sqlite3_table_column_metadata() routine so that it gives the correct
answer for the "rowid" column in a WITHOUT ROWID table. Enhance it so that it can be used to check for the existence of a table by setting the column name parameter to NULL. The routine is now included in the build by default, even without the SQLITE_ENABLE_COLUMN_METADATA compile-time option. FossilOrigin-Name: cf9be419a16156a9814e1378bb49b780de977343
This commit is contained in:
+2
-2
@@ -1588,14 +1588,14 @@ static int test_table_column_metadata(
|
||||
int primarykey;
|
||||
int autoincrement;
|
||||
|
||||
if( objc!=5 ){
|
||||
if( objc!=5 && objc!=4 ){
|
||||
Tcl_WrongNumArgs(interp, 1, objv, "DB dbname tblname colname");
|
||||
return TCL_ERROR;
|
||||
}
|
||||
if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ) return TCL_ERROR;
|
||||
zDb = Tcl_GetString(objv[2]);
|
||||
zTbl = Tcl_GetString(objv[3]);
|
||||
zCol = Tcl_GetString(objv[4]);
|
||||
zCol = objc==5 ? Tcl_GetString(objv[4]) : 0;
|
||||
|
||||
if( strlen(zDb)==0 ) zDb = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user