Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bad math expression on first installation #69

Open
grimreaper opened this issue Apr 19, 2020 · 4 comments
Open

bad math expression on first installation #69

grimreaper opened this issue Apr 19, 2020 · 4 comments

Comments

@grimreaper
Copy link

I am having some issues installing this. Note that I don't use o-m-z.

To reproduce:

  1. git clone [email protected]:larkery/zsh-histdb.git ~/z
  2. add
. ~/z/zsh-histdb/sqlite-history.zsh
autoload -Uz add-zsh-hook
add-zsh-hook precmd histdb-update-outcome

to my ~/.zshrc. this reproduces without anything else there
3. Open new shell

What I expect to see:
A functional history replacement

What I actually see:

-- Loading resources from /Users/eax/.sqliterc
/Users/eax/z/zsh-histdb/histdb-migrate:8: bad math expression: operator expected at `2'
-- Loading resources from /Users/eax/.sqliterc
Error: near line 8: misuse of aggregate function max()
BuyingEagle%
@larkery
Copy link
Owner

larkery commented May 14, 2020

It may be that your sqlite is somehow incompatible with the query being run?

I am unable to reproduce this issue, so I guess it's caused by something else in the environment like software version.

@grimreaper
Copy link
Author

sqlite information:

∴sqlite3 --version
-- Loading resources from /Users/eax/.sqliterc
3.32.0 2020-05-22 17:46:16 5998789c9c744bce92e4cff7636bba800a75574243d6977e1fc8281e360f8d5a

sqlite> PRAGMA compile_options;
compile_options
COMPILER=clang-10.0.1
DISABLE_INTRINSIC
ENABLE_COLUMN_METADATA
ENABLE_DBSTAT_VTAB
ENABLE_FTS3_PARENTHESIS
ENABLE_FTS4
ENABLE_FTS5
ENABLE_GEOPOLY
ENABLE_JSON1
ENABLE_RTREE
ENABLE_STAT4
ENABLE_STMTVTAB
ENABLE_UNLOCK_NOTIFY
SECURE_DELETE
SOUNDEX
THREADSAFE=1
Run Time: real 0.000 user 0.000060 sys 0.000036

@larkery
Copy link
Owner

larkery commented May 27, 2020

Doesn't seem likely it's the version as yours is newer than mine.

I notice that your log speaks of .sqliterc, which I don't have. It could be that there is something in there affecting things, as I think that's run before anything else.

I don't think I can turn loading of .sqliterc off.

@grimreaper
Copy link
Author

.headers on
.timer on

Is the contents of my ~/.sqliterc. There is no difference if I remove it. In addition, it is only used in interactive mode and not used in normal mode.

My guess is some compile-time option or difference of runtime default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants