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

histdb:211: bad math expression: operator expected at `in select ... #62

Open
xkortex opened this issue Nov 21, 2019 · 1 comment
Open

Comments

@xkortex
Copy link

xkortex commented Nov 21, 2019

Just started getting this error on fresh install of Ubuntu 18.04.

Linux 4.18.0-15-generic #16~18.04.1-Ubuntu SMP Thu Feb 7 14:06:04 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
zsh 5.4.2 (x86_64-ubuntu-linux-gnu)
sqlite3 3.22.0 2018-01-22 18:45:57 0c55d179733b46d8d0ba4d88e01a25e10677046ee3da1d5b1581e86726f2alt1

Currently at master 873610f. Typing histdb shows

Error: no such column: true
Error: no such column: true
error in -header -separator                          select strftime(case when datetime(max_start, 'unixepoch') > datetime('now', 'start of day') then '%H:%M' else '%d/%m' end, max_start, 'unixepoch', 'localtime') as time, session as ses, dir, argv as cmd from (select session, replace(places.dir, '/home/user', '~') as dir, replace(commands.argv, '
', '
') as argv, max(start_time) as max_start
from
  commands 
  join history on history.command_id = commands.id
  join places on history.place_id = places.id
where true and places.host='guibox'
group by history.command_id, history.place_id
order by max_start desc
limit 20) order by max_start asc
histdb:211: bad math expression: operator expected at `in select ...'

If I checkout 9598f2f and restart zsh, the error goes away.

@larkery
Copy link
Owner

larkery commented Jan 7, 2020

That's very odd, especially the syntax error; select true should generally work. I'll see whether I can reproduce this somehow.

873610f does change the default where clause to 'true', but this should be legal. What's your sqlite version (although a long shot, maybe this is different?)

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