koron / nvgd

Filterable (grep, head and tail) HTTP file server
MIT License
17 stars 2 forks source link

SQL LIMIT clause detection fails when there is a newline after LIMIT #106

Closed yuki-tsuchiya closed 2 months ago

yuki-tsuchiya commented 2 months ago

When there is a newline immediately after the LIMIT keyword in an SQL query, the detection of the LIMIT clause fails, and the max_rows setting is incorrectly applied.

Example: When using the db protocol, the max_rows setting is applied in the following query, but this is not the expected behavior:

Query:
SELECT hoge FROM piyo
LIMIT
10

URL:
http://localhost:9280/db/mysql@localhost.ladsp.net/SELECT%20hoge%20FROM%20piyo%0ALIMIT%0A10
koron commented 2 months ago

111 will fix this.