__System info:__ InfluxDB v1.1.0 (downloaded, not built), Ubuntu 15.04 64-bit Intel
__Steps to reproduce:__
Startup InfluxDB and create a database.
curl -XPOST "http://influxdb:8086/query" --data-urlencode "q=CREATE DATABASE \"Test1\""
Add content to create measurement.
curl -XPOST 'http://influxdb:8086/write?db=Test1' --data-binary 'cpu_load_short,host=server01,region=us-west value=0.64 1434055562000000000'
You should see the /var/lib/influxdb/data directory with Test1 and _internal sub-directories.
Execute 'DROP DATABASE' without a name specifically like the following:
curl -XPOST "http://influxdb:8086/query" --data-urlencode "q=DROP DATABASE \"\""
No error is returned or logged but the entire /var/lib/influxdb/data is gone (including _internal).
__Expected behavior:__ Return an error if no database name is provided.
__Actual behavior:__ Deleted the entire /influxdb/data directory.
The DROP DATABASE with no name was a bug in my code where a null name got through but the consequences are pretty bad since all the data files are gone. The system worked ok for a couple days until influxdb was restarted of course. Errors about missing files started appearing only in the logs a few seconds after the drop.
Is it possible to drop database called ../../ ?:)
I would be afraid to try that.
Most helpful comment
I would be afraid to try that.