/ Check-in [c037403b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Bug fix in pragma table_info(). (CVS 3440)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c037403bae0d78f9dd2703ff05cc3cd3ac54e062
User & Date: drh 2006-09-25 13:48:30
Context
2006-09-25
18:01
Fix a round-off problem in the %f conversion of strftime(). Ticket #1991. (CVS 3443) check-in: bf460840 user: drh tags: trunk
13:48
Bug fix in pragma table_info(). (CVS 3440) check-in: c037403b user: drh tags: trunk
13:09
Remove legacy cruft from shell.c. (CVS 3439) check-in: 815d8f84 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/pragma.c.

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
...
486
487
488
489
490
491
492

493



494
495
496
497
498
499
500
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains code used to implement the PRAGMA command.
**
** $Id: pragma.c,v 1.122 2006/08/14 14:23:42 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
#include <ctype.h>

/* Ignore this whole file if pragmas are disabled
*/
................................................................................
        static const Token noDflt =  { (unsigned char*)"", 0, 0 };
        sqlite3VdbeAddOp(v, OP_Integer, i, 0);
        sqlite3VdbeOp3(v, OP_String8, 0, 0, pCol->zName, 0);
        sqlite3VdbeOp3(v, OP_String8, 0, 0,
           pCol->zType ? pCol->zType : "", 0);
        sqlite3VdbeAddOp(v, OP_Integer, pCol->notNull, 0);
        pDflt = pCol->pDflt ? &pCol->pDflt->span : &noDflt;

        sqlite3VdbeOp3(v, OP_String8, 0, 0, (char*)pDflt->z, pDflt->n);



        sqlite3VdbeAddOp(v, OP_Integer, pCol->isPrimKey, 0);
        sqlite3VdbeAddOp(v, OP_Callback, 6, 0);
      }
    }
  }else

  if( sqlite3StrICmp(zLeft, "index_info")==0 && zRight ){







|







 







>
|
>
>
>







7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
...
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains code used to implement the PRAGMA command.
**
** $Id: pragma.c,v 1.123 2006/09/25 13:48:30 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
#include <ctype.h>

/* Ignore this whole file if pragmas are disabled
*/
................................................................................
        static const Token noDflt =  { (unsigned char*)"", 0, 0 };
        sqlite3VdbeAddOp(v, OP_Integer, i, 0);
        sqlite3VdbeOp3(v, OP_String8, 0, 0, pCol->zName, 0);
        sqlite3VdbeOp3(v, OP_String8, 0, 0,
           pCol->zType ? pCol->zType : "", 0);
        sqlite3VdbeAddOp(v, OP_Integer, pCol->notNull, 0);
        pDflt = pCol->pDflt ? &pCol->pDflt->span : &noDflt;
        if( pDflt->z ){
          sqlite3VdbeOp3(v, OP_String8, 0, 0, (char*)pDflt->z, pDflt->n);
        }else{
          sqlite3VdbeAddOp(v, OP_Null, 0, 0);
        }
        sqlite3VdbeAddOp(v, OP_Integer, pCol->isPrimKey, 0);
        sqlite3VdbeAddOp(v, OP_Callback, 6, 0);
      }
    }
  }else

  if( sqlite3StrICmp(zLeft, "index_info")==0 && zRight ){