Re: [sqlite] Command line not accepting multi-line statements.

2016-11-08 Thread John G
Thanks, that worked.

John Gillespie

On 8 November 2016 at 14:30, Richard Hipp  wrote:

> On 11/8/16, John G  wrote:
> > I normally use the 3.8.8.3 supplied with MacOS El Capitan.
> > I downloaded version 3.15.1 from the Download page - precompiled
> > command-line tools : (sqlite-tools-osx-x86-3150100.zip).
> >
> > When I tried copying and pasting multiple or multi-line statements from
> my
> > editor (jEdit) the command-line shell ignored everything after the first
> > line. This is not the case with 3.8.8.3.
> >
>
> This appears to be a bug in the "linenoise" library that we link
> against when building the precompiled shell - it has nothing to do
> with SQLite.  See the https://github.com/antirez/linenoise/issues/75
> bug report.  We first started linking precompiled SQLite binaries
> against linenoise with 3.8.9 (2015-04-08) and you are the first person
> to notice the difference.
>
> We'll see if we can't update the linenoise implementations on our
> build machines and upload new binaries for 3.15.1
>
> In the meantime, you can always build SQLite yourself from sources.
> On a mac, just type "./configure; make" (after installing Xcode, which
> is free on the apple store).
>
> --
> D. Richard Hipp
> d...@sqlite.org
> ___
> 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


Re: [sqlite] Command line not accepting multi-line statements.

2016-11-08 Thread Dominique Devienne
On Tue, Nov 8, 2016 at 3:30 PM, Richard Hipp  wrote:

> On 11/8/16, John G  wrote:
> > I normally use the 3.8.8.3 supplied with MacOS El Capitan.
> > I downloaded version 3.15.1 from the Download page - precompiled
> > command-line tools : (sqlite-tools-osx-x86-3150100.zip).
> >
> > When I tried copying and pasting multiple or multi-line statements from
> my
> > editor (jEdit) the command-line shell ignored everything after the first
> > line. This is not the case with 3.8.8.3.
> >
>
> This appears to be a bug in the "linenoise" library that we link
> against when building the precompiled shell - it has nothing to do
> with SQLite.  See the https://github.com/antirez/linenoise/issues/75
> bug report.  We first started linking precompiled SQLite binaries
> against linenoise with 3.8.9 (2015-04-08) and you are the first person
> to notice the difference.
>
> We'll see if we can't update the linenoise implementations on our
> build machines and upload new binaries for 3.15.1
>
> In the meantime, you can always build SQLite yourself from sources.
> On a mac, just type "./configure; make" (after installing Xcode, which
> is free on the apple store).
>

FWIW, I'm using linenoise-ng in my own command line app (see below),
wrote a couple commands in VS, each on its own line, and pasted them to
my linenoise-ng based app running on Linux in a Putty window, and
both lines where pasted (and executed) OK.

Unlike the original, the -ng variant works OK on Windows,
but is C++11 based. But it doesn't seem to be bug free either,
got a crash using its linenoiseHistorySetMaxLen().

Supports prompt coloring using ANSI escape codes too,
which work in both the DOS prompt, Putty, and RedHat terminal.

Since I consider this a bit "experimental", I have an SQLite-inspired
.linenoise on/off "dot" command, to switch to/from basic cout/getstring :)

// From https://github.com/arangodb/linenoise-ng
// Commit df1cfb41e3de9d2e716016d0571338ceed62290f
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Command line not accepting multi-line statements.

2016-11-08 Thread Richard Hipp
On 11/8/16, John G  wrote:
> I normally use the 3.8.8.3 supplied with MacOS El Capitan.
> I downloaded version 3.15.1 from the Download page - precompiled
> command-line tools : (sqlite-tools-osx-x86-3150100.zip).
>
> When I tried copying and pasting multiple or multi-line statements from my
> editor (jEdit) the command-line shell ignored everything after the first
> line. This is not the case with 3.8.8.3.
>

This appears to be a bug in the "linenoise" library that we link
against when building the precompiled shell - it has nothing to do
with SQLite.  See the https://github.com/antirez/linenoise/issues/75
bug report.  We first started linking precompiled SQLite binaries
against linenoise with 3.8.9 (2015-04-08) and you are the first person
to notice the difference.

We'll see if we can't update the linenoise implementations on our
build machines and upload new binaries for 3.15.1

In the meantime, you can always build SQLite yourself from sources.
On a mac, just type "./configure; make" (after installing Xcode, which
is free on the apple store).

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Command line not accepting multi-line statements.

2016-11-08 Thread John G
I normally use the 3.8.8.3 supplied with MacOS El Capitan.
I downloaded version 3.15.1 from the Download page - precompiled
command-line tools : (sqlite-tools-osx-x86-3150100.zip).

When I tried copying and pasting multiple or multi-line statements from my
editor (jEdit) the command-line shell ignored everything after the first
line. This is not the case with 3.8.8.3.

If I put ALL the statements on a single long  line they are accepted.

Is this a bug? Am doing something wrong? Tongue in wrong position?

Thanks for any help.

John Gillespie


Text in my editor:

create table people (pid integer primary key,name text);
insert into people values(1, 'John Smith');
insert into people values(2, 'Alan Smith');
insert into people values(3, 'Elsie Jones');
select * from people
 where name like '%Smith';
    I copied this block of text and pasted to the
command-line shells  ...


Using 3.8.8.3 from bash :

sqlite 528 % sqlite3
SQLite version 3.8.8.3 2015-02-25 13:29:11
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> create table people (pid integer primary key,name text);
sqlite> insert into people values(1, 'John Smith');
sqlite> insert into people values(2, 'Alan Smith');
sqlite> insert into people values(3, 'Elsie Jones');
sqlite> select * from people
   ...>  where name like '%Smith';
1|John Smith
2|Alan Smith
sqlite>
    as expected

Using 3.15.1 from bash :

sqlite 527 % ~/bin/sqlite3_15
SQLite version 3.15.1 2016-11-04 12:08:49
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> create table people (pid integer primary key,name text);
sqlite>
 - input truncated at first line
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users