I removed (commented out) all the lines with sqlite3VdbeAddOp2 in that
mentioned code block, so that is 4 code lines.
Still I get the duplicate output.
I am using the the 3.20.0 amalgation.

RBS













On Fri, Aug 25, 2017 at 12:41 AM, Keith Medcalf <kmedc...@dessus.com> wrote:

>
> If you search sqlite3.c for the SQLITE3_INTROSPECTION_PRAGMAS you will see
> in pragma.c (or in sqlite3.c) the following code:
>
> #ifdef SQLITE_INTROSPECTION_PRAGMAS
>   case PragTyp_FUNCTION_LIST: {
>     int i;
>     HashElem *j;
>     FuncDef *p;
>     pParse->nMem = 2;
>     for(i=0; i<SQLITE_FUNC_HASH_SZ; i++){
>       for(p=sqlite3BuiltinFunctions.a[i]; p; p=p->u.pHash ){
>         sqlite3VdbeMultiLoad(v, 1, "si", p->zName, 1);
>         sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 2);
>       }
>     }
>     for(j=sqliteHashFirst(&db->aFunc); j; j=sqliteHashNext(j)){
>       p = (FuncDef*)sqliteHashData(j);
>       sqlite3VdbeMultiLoad(v, 1, "si", p->zName, 0);
>       sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 2);
>     }
>   }
>   break;
>
> #ifndef SQLITE_OMIT_VIRTUALTABLE
>   case PragTyp_MODULE_LIST: {
>     HashElem *j;
>     pParse->nMem = 1;
>     for(j=sqliteHashFirst(&db->aModule); j; j=sqliteHashNext(j)){
>       Module *pMod = (Module*)sqliteHashData(j);
>       sqlite3VdbeMultiLoad(v, 1, "s", pMod->zName);
>       sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 1);
>     }
>   }
>   break;
> #endif /* SQLITE_OMIT_VIRTUALTABLE */
>
>   case PragTyp_PRAGMA_LIST: {
>     int i;
>     for(i=0; i<ArraySize(aPragmaName); i++){
>       sqlite3VdbeMultiLoad(v, 1, "s", aPragmaName[i].zName);
>       sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 1);
>     }
>   }
>   break;
> #endif /* SQLITE_INTROSPECTION_PRAGMAS */
>
> In each, the sqlite3VdbeAddOp2 should be removed.  sqlite3VdbeMultiLoad,
> as well as adding the data to the vdbe program also generates an
> OP_ResultRow instruction ...
>
> ---
> The fact that there's a Highway to Hell but only a Stairway to Heaven says
> a lot about anticipated traffic volume.
>
>
> >-----Original Message-----
> >From: sqlite-users [mailto:sqlite-users-
> >boun...@mailinglists.sqlite.org] On Behalf Of Bart Smissaert
> >Sent: Thursday, 24 August, 2017 14:53
> >To: General Discussion of SQLite Database
> >Subject: [sqlite] Duplicate output with pragma_list, function_list,
> >module_list
> >
> >The pragma names and function names are duplicated with these
> >pragma's.
> >Is this a bug?
> >
> >RBS
> >_______________________________________________
> >sqlite-users mailing list
> >sqlite-users@mailinglists.sqlite.org
> >http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to