1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Use the database name supplied to table_info() and related pragmas. (CVS 2001)

FossilOrigin-Name: 0415af325739fd4e0bd4761c889719355a1ec4ff
This commit is contained in:
drh
2004-10-05 15:42:53 +00:00
parent 684917c269
commit 2783e4bc0e
3 changed files with 12 additions and 12 deletions

View File

@@ -11,7 +11,7 @@
*************************************************************************
** This file contains code used to implement the PRAGMA command.
**
** $Id: pragma.c,v 1.68 2004/10/05 02:41:43 drh Exp $
** $Id: pragma.c,v 1.69 2004/10/05 15:42:53 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -384,7 +384,7 @@ void sqlite3Pragma(
if( sqlite3StrICmp(zLeft, "table_info")==0 && zRight ){
Table *pTab;
if( sqlite3ReadSchema(pParse) ) goto pragma_out;
pTab = sqlite3FindTable(db, zRight, 0);
pTab = sqlite3FindTable(db, zRight, zDb);
if( pTab ){
int i;
sqlite3VdbeSetNumCols(v, 6);
@@ -413,7 +413,7 @@ void sqlite3Pragma(
Index *pIdx;
Table *pTab;
if( sqlite3ReadSchema(pParse) ) goto pragma_out;
pIdx = sqlite3FindIndex(db, zRight, 0);
pIdx = sqlite3FindIndex(db, zRight, zDb);
if( pIdx ){
int i;
pTab = pIdx->pTable;
@@ -436,7 +436,7 @@ void sqlite3Pragma(
Index *pIdx;
Table *pTab;
if( sqlite3ReadSchema(pParse) ) goto pragma_out;
pTab = sqlite3FindTable(db, zRight, 0);
pTab = sqlite3FindTable(db, zRight, zDb);
if( pTab ){
v = sqlite3GetVdbe(pParse);
pIdx = pTab->pIndex;
@@ -462,7 +462,7 @@ void sqlite3Pragma(
FKey *pFK;
Table *pTab;
if( sqlite3ReadSchema(pParse) ) goto pragma_out;
pTab = sqlite3FindTable(db, zRight, 0);
pTab = sqlite3FindTable(db, zRight, zDb);
if( pTab ){
v = sqlite3GetVdbe(pParse);
pFK = pTab->pFKey;