SQLite Forum

simple insert issue with 3.35.5 - .sqliterc issue?
Login
I ran into a problem with a work computer.  After much head scratching, etc, I tried my home computer.  After more head scratching, I finally reduced this to a simple test case.

For sqlite-3.35.5 compiled with gcc or with clang on a linux machine - that's the work setup - or for version 3.32 on my MacOS machine, if I do this:

   $ cat ~/.sqliterc
   .headers on

   $ sqlite3
   sqlite> create table foo(a text, b text unique);
   sqlite> insert into foo values ("a", null), ("a2", "b1"), ("a3", "b2"), ("a4", null);
   sqlite> select * from foo;
   a|b
   a|
   a2|b1
   a3|b2
   a4|

When I remove ~/.sqliterc, I get different results:

   $ rm ~/.sqliterc

   $ sqlite3
  sqlite> create table foo(a text, b text unique);
   sqlite> insert into foo values ("a", null), ("a2", "b1"), ("a3", "b2"), ("a4", null);
   sqlite> select * from foo;
   a|
   a2|b1
   a3|b2
   a4|

Any thoughts or suggestions?  Perhaps something has changed with respect to the processing of the .sqliterc file?

Thanks!

David