-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[0.9.1-2] WHERE regex within single quotes followed by LIMIT causes panic #3301
Comments
@andrewpwade In your schema, is If you remove the single quotes you said it doesn't crash. What does it return? |
Without the single quotes, I belive rows with the expected data were returned. This was on a VM I don't have access to right now to check. I don't understand Influxdb enough to say whether it's a tag vs a field, sorry. If it helps, the schema comes from collectd's network plugin writing to Influxdb's collectd plugin. |
Adding single quotes around the regex renders it a simple string, not a regular expression. It's not acceptable that the db panicked but bad syntax can do that. It doesn't appear to crash in 0.9.1, this might be new behavior in the 0.9.2 pre-release nightlies:
|
I'm able to reproduce this, but a key element of the problem is that the improper string literal needs to be followed by the
Also, I can reproduce the above failure on v0.9.1 as well as HEAD. I'm going to take a stab at writing a test and a fix for this. |
Excellent sleuthing @rnubel! It does seem like a well-bounded problem, we eagerly await your PR. |
#3351 contains my fix 😄 |
Version: 0.9.1-rc1-120-g29a34df (from nightly deb package).
OS: Ubuntu 14.04 64-bit
This query using the Influxdb web interface reliably crashes the program:
SELECT derivative(value) FROM "interface_rx" WHERE type = 'if_octets' AND instance =~ '/eth/' limit 2
If you remove the single quotes around the regex, it does not crash.
The text was updated successfully, but these errors were encountered: