/ Check-in [e0ed4c3e]
Login

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

Overview
Comment:Fix incorrect WHERE clause in sqldiff, as reported on the mailing list by Youcef Hilem.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:e0ed4c3e376248dfbf903e4b5845f910824fa6c6
User & Date: drh 2015-11-09 12:47:04
Context
2015-11-09
14:11
Size reduction and performance improvement in the stack-popping logic of the Lemon-generated parser. check-in: 9748c48a user: drh tags: trunk
12:47
Fix incorrect WHERE clause in sqldiff, as reported on the mailing list by Youcef Hilem. check-in: e0ed4c3e user: drh tags: trunk
12:44
Check in the cg_anno.tcl and run-speed-test.sh scripts, as an historical record. check-in: 836418d3 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tool/sqldiff.c.

698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
        }else{                /* Delete a row */
          fprintf(out, "DELETE FROM %s", zId);
        }
        zSep = " WHERE";
        for(i=0; i<nPk; i++){
          fprintf(out, "%s %s=", zSep, az2[i]);
          printQuoted(out, sqlite3_column_value(pStmt,i));
          zSep = ",";
        }
        fprintf(out, ";\n");
      }else{                  /* Insert a row */
        fprintf(out, "INSERT INTO %s(%s", zId, az2[0]);
        for(i=1; az2[i]; i++) fprintf(out, ",%s", az2[i]);
        fprintf(out, ") VALUES");
        zSep = "(";







|







698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
        }else{                /* Delete a row */
          fprintf(out, "DELETE FROM %s", zId);
        }
        zSep = " WHERE";
        for(i=0; i<nPk; i++){
          fprintf(out, "%s %s=", zSep, az2[i]);
          printQuoted(out, sqlite3_column_value(pStmt,i));
          zSep = " AND";
        }
        fprintf(out, ";\n");
      }else{                  /* Insert a row */
        fprintf(out, "INSERT INTO %s(%s", zId, az2[0]);
        for(i=1; az2[i]; i++) fprintf(out, ",%s", az2[i]);
        fprintf(out, ") VALUES");
        zSep = "(";