bun icon indicating copy to clipboard operation
bun copied to clipboard

fix: allow LIMIT 0 for SELECT queries

Open ygabuev opened this issue 1 year ago • 3 comments

This PR enables the correct queries of form SELECT ... LIMIT 0. Before that, the limit-clause wasn't applied to the query.

Closes https://github.com/uptrace/bun/issues/801

ygabuev avatar Oct 19 '23 10:10 ygabuev

The new tests fail for mssql, I've checked and they also fail for current master. Given that there were no tests for the LIMIT clause, I have a felling that the implementation for LIMIT and/or OFFSET is broken for mssql.

If this is true, it might be a better idea to fix those in a separate PR.

UPD: this ticket seems related https://github.com/uptrace/bun/issues/811

ygabuev avatar Oct 20 '23 09:10 ygabuev

@ygabuev this looks good, but I can't merge a PR that breaks the build....

vmihailenco avatar Jan 06 '24 07:01 vmihailenco

The new tests fail for mssql, I've checked and they also fail for current master. Given that there were no tests for the LIMIT clause, I have a felling that the implementation for LIMIT and/or OFFSET is broken for mssql.

If this is true, it might be a better idea to fix those in a separate PR.

UPD: this ticket seems related #811

Hi, I just implemented a fix for that problem in #1009. Could you please test if this workaround fixes your problem?

CL-Jeremy avatar Jul 16 '24 09:07 CL-Jeremy