/ 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 Side-by-Side Diffs Ignore Whitespace Patch

Changes to tool/sqldiff.c.

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