dbeaver / dbeaver

Free universal database tool and SQL client
https://dbeaver.io
Apache License 2.0
40.14k stars 3.46k forks source link

Problem with sorting (ASCII) #17982

Closed CelenaBb closed 1 year ago

CelenaBb commented 2 years ago

Description

CREATE TABLE TEST1 ( ID NUMBER(38,0), IP VARCHAR2(255) );

INSERT INTO TEST1 (ID,IP ) VALUES(1,’1.2.3.4^110.0.0.2′);

INSERT INTO TEST1 (ID,IP ) VALUES(2, ‘110.0.0.0’);

INSERT INTO TEST1 (ID,IP ) VALUES(3, ‘110.0.0.2’);

according to ASCII character “.” is less than “1”

but in version 22.2.2.202210092258 The result of sorting

SELECT * FROM TEST1 ORDER BY IP

is:

110.0.0.0 110.0.0.2 1.2.3.4^110.0.0.2

Connection to my database by sqlplus gives different result of the same sorting

1.2.3.4^110.0.0.2 110.0.0.0 110.0.0.2

please explain the reason for incorrect sorting

DBeaver Version

22.2.2.202210092258

Operating System

Версия 20H2 ( Сборка ОС 19042.1826)

Database and driver

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production com.oracle.database.jdbc:ojdbc8:RELEASE[12.2.0.1]

Steps to reproduce

No response

Additional context

No response

LonwoLonwo commented 2 years ago

Hello @CelenaBb

Unfortunately can't reproduce your issue.

2022-10-20 17_13_05-DBeaver Ultimate 22 2 2 - _orcl_Script-190

Sorting from the client-side (DBeaver) and the server side is the same (Oracle).

I used Oracle Oracle Database 12c and the same driver as you.

CelenaBb commented 2 years ago

image image

this is what I see sorting the table by pushing the sorting buttom

iraidaa commented 1 year ago

Hi @CelenaBb,

Can you please check whether the issue remains in 22.2.3? I can't reproduce it in 22.2.3 with the same driver.

CelenaBb commented 1 year ago

Hi @iraidaa
i have tried it in the same DBeaver and driver, but Oracle 18. It works correct. So I guess it something between DBeaver and Oracle 19 communication.

More over oracle 19 works with DBeaver 7.3 uncorrectly

ShadelessFox commented 1 year ago

Hello @CelenaBb,

Have you tried changing the ordering mode to be server-side only?

image

CelenaBb commented 1 year ago

Hello @ShadelessFox yes i have it does not change anything

ShadelessFox commented 1 year ago

It's really weird.

DBeaver does not change results in any way, therefore an explicit ORDER BY clause should yield the same result regardless of the DBMS tool you're using.

uslss commented 1 year ago

there have been no updates for a long time. If the issue is still actual - feel free to reopen it.