Fossil

Diff
Login

Differences From Artifact [3c402be10c]:

To Artifact [ccbc02a9ee]:


13718
13719
13720
13721
13722
13723
13724


13725
13726
13727
13728
13729
13730
13731
13732


13733
13734
13735
13736
13737
13738
13739
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732


13733
13734
13735
13736
13737
13738
13739
13740
13741







+
+






-
-
+
+







*/
static int dump_callback(void *pArg, int nArg, char **azArg, char **azNotUsed){
  int rc;
  const char *zTable;
  const char *zType;
  const char *zSql;
  ShellState *p = (ShellState *)pArg;
  int dataOnly;
  int noSys;

  UNUSED_PARAMETER(azNotUsed);
  if( nArg!=3 || azArg==0 ) return 0;
  zTable = azArg[0];
  zType = azArg[1];
  zSql = azArg[2];
  int dataOnly = (p->shellFlgs & SHFLG_DumpDataOnly)!=0;
  int noSys    = (p->shellFlgs & SHFLG_DumpNoSys)!=0;
  dataOnly = (p->shellFlgs & SHFLG_DumpDataOnly)!=0;
  noSys    = (p->shellFlgs & SHFLG_DumpNoSys)!=0;

  if( strcmp(zTable, "sqlite_sequence")==0 && !noSys ){
    if( !dataOnly ) raw_printf(p->out, "DELETE FROM sqlite_sequence;\n");
  }else if( sqlite3_strglob("sqlite_stat?", zTable)==0 && !noSys ){
    if( !dataOnly ) raw_printf(p->out, "ANALYZE sqlite_schema;\n");
  }else if( strncmp(zTable, "sqlite_", 7)==0 ){
    return 0;