mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-10 01:02:56 +03:00
Clean up obfuscated code in sqlite3_table_column_meta_data().
Be sure to invoke sqlite3_initialize() within sqlite3_mprintf(). (CVS 5224) FossilOrigin-Name: bb4edb53964559fc1cd69700beb72ecc29b58f37
This commit is contained in:
10
src/main.c
10
src/main.c
@@ -14,7 +14,7 @@
|
||||
** other files are for internal use by SQLite and should not be
|
||||
** accessed by users of the library.
|
||||
**
|
||||
** $Id: main.c,v 1.444 2008/06/14 16:56:22 drh Exp $
|
||||
** $Id: main.c,v 1.445 2008/06/16 20:51:16 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <ctype.h>
|
||||
@@ -1554,7 +1554,7 @@ int sqlite3_table_column_metadata(
|
||||
char const **pzCollSeq, /* OUTPUT: Collation sequence name */
|
||||
int *pNotNull, /* OUTPUT: True if NOT NULL constraint exists */
|
||||
int *pPrimaryKey, /* OUTPUT: True if column part of PK */
|
||||
int *pAutoinc /* OUTPUT: True if colums is auto-increment */
|
||||
int *pAutoinc /* OUTPUT: True if column is auto-increment */
|
||||
){
|
||||
int rc;
|
||||
char *zErrMsg = 0;
|
||||
@@ -1617,9 +1617,9 @@ int sqlite3_table_column_metadata(
|
||||
if( pCol ){
|
||||
zDataType = pCol->zType;
|
||||
zCollSeq = pCol->zColl;
|
||||
notnull = (pCol->notNull?1:0);
|
||||
primarykey = (pCol->isPrimKey?1:0);
|
||||
autoinc = ((pTab->iPKey==iCol && pTab->autoInc)?1:0);
|
||||
notnull = pCol->notNull!=0;
|
||||
primarykey = pCol->isPrimKey!=0;
|
||||
autoinc = pTab->iPKey==iCol && pTab->autoInc;
|
||||
}else{
|
||||
zDataType = "INTEGER";
|
||||
primarykey = 1;
|
||||
|
Reference in New Issue
Block a user