David Bicking wrote:
Actually, it looks like anything except ".header on" will turn headers off. That includes ".header 
on;" (with semicolon - it doesn't do nothing, it turns the headers off) or ".header off;" (with or 
without semincolon.) or ".header ;" (with a space and semicolon but no text.)

I could only get it to return error text with .header or .header; (no space 
before semicolon.)

.explain behaves the same way. "on;" is treated the same as "off" or "foo".

(At least with version 3.7.0 which is what I had handy to test with.)

A quick perusal of the code reveals this logic:
Any case variation of "on" or "yes", or anything that starts with a non-zero integer counts as "true" with regard to its effect as an option setting. Anything else counts as "false". If this was the "expected" behavior, it would have to be considered bug-free now.

If anybody truly cares enough to make this behave better, it is encapsulated in a function named "booleanValue(char *zArg)". For myself, since it takes "0" and "1", which are easy to type, the present behavior is entirely unobjectionable.

As for whether an appended ';' (or any other junk not called for in the .help output) ought to produce a diagnostic instead of simply following the above logic, I would say that adherence to the GIGO principle is perfectly adequate.

--
Larry Brasfield

_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to