Skip to content

Potential issue when using ROUND #3982

@suyZhong

Description

@suyZhong

Consider the following test cases, the queries execute slowly.

sql> SELECT ROUND(1, -9999999);
0
0
(1 row, 2717 ms)
sql> SELECT ROUND(1, -99999999);
0
0
(1 row, 74565 ms)

I understand that the negative value for the second argument of ROUND is somewhat illegal. However, in SQLite, MySQL and PostgreSQL, the queries take less than 1 second.

I originally find this by building the latest source version cd09d93. I could also reproduce this in 2.2.224.

Here's how I start H2 Shell:

java -cp target/h2-2.2.229-SNAPSHOT.jar org.h2.tools.Shell -url jdbc:h2:./test -user sa -password 1

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions