/ Check-in [029ceea612]
Login

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

Overview
Comment:For the LIKE pattern in the .dump command of the CLI, accept backslash as an escape character.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 029ceea612f5c7a1420939d8a772eefcc6f9550d24d57b52ae1729ea9d85fae9
User & Date: drh 2020-03-25 20:31:45
Context
2020-03-26
00:29
Reinstate the optimization that converts "x IN (y)" into "x==y". check-in: 27936e6884 user: drh tags: trunk
2020-03-25
20:31
For the LIKE pattern in the .dump command of the CLI, accept backslash as an escape character. check-in: 029ceea612 user: drh tags: trunk
12:50
Enhance the ".dump" command in the CLI so that it accepts multiple LIKE pattern arguments and shows the union of all matching tables. check-in: 45fba3d705 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/shell.c.in.

7299
7300
7301
7302
7303
7304
7305
7306

7307
7308
7309
7310
7311
7312
7313
7314
7315
        }else
        {
          raw_printf(stderr, "Unknown option \"%s\" on \".dump\"\n", azArg[i]);
          rc = 1;
          goto meta_command_exit;
        }
      }else if( zLike ){
        zLike = sqlite3_mprintf("%z OR name LIKE %Q", zLike, azArg[i]);

      }else{
        zLike = sqlite3_mprintf("name LIKE %Q", azArg[i]);
      }
    }

    open_db(p, 0);

    /* When playing back a "dump", the content might appear in an order
    ** which causes immediate foreign key constraints to be violated.







|
>

|







7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
        }else
        {
          raw_printf(stderr, "Unknown option \"%s\" on \".dump\"\n", azArg[i]);
          rc = 1;
          goto meta_command_exit;
        }
      }else if( zLike ){
        zLike = sqlite3_mprintf("%z OR name LIKE %Q ESCAPE '\\'",
                zLike, azArg[i]);
      }else{
        zLike = sqlite3_mprintf("name LIKE %Q ESCAPE '\\'", azArg[i]);
      }
    }

    open_db(p, 0);

    /* When playing back a "dump", the content might appear in an order
    ** which causes immediate foreign key constraints to be violated.