Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

max/min bug? #247

Open
mervynzhang opened this issue Nov 5, 2024 · 2 comments
Open

max/min bug? #247

mervynzhang opened this issue Nov 5, 2024 · 2 comments

Comments

@mervynzhang
Copy link

最新代码, max/min一个 INTEGER 字段的时候报错了, max/min VARCHAR 字段没报错, 老版本没报错。

sql> select max(CUST_ID) from CUSTOMER;
Error: General error: "java.lang.ClassCastException: class com.lealone.db.row.Row cannot be cast to class com.lealone.db.value.Value (com.lealone.db.row.Row and com.lealone.db.value.Value are in unnamed module of loader 'app')"; SQL statement:
select max(CUST_ID) from CUSTOMER [50000-0]

sql> select (CUST_ID) from CUSTOMER;    
+---------+
| CUST_ID |
+---------+
| 1       |
| 2       |

...
sql> select count(CUST_ID) from CUSTOMER; 
+----------------+
| COUNT(CUST_ID) |
+----------------+
| 6              |
+----------------+
(1 row, 2 ms)

sql> select min(name) from CUSTOMER;      
+-----------+
| MIN(NAME) |
+-----------+
| John      |
+-----------+


@mervynzhang
Copy link
Author

client退出的时候, server端刷屏报下边的错
image

16:06:19.583 [ScheduleService-7] WARN  com.lealone.net.nio.NioEventLoop - Failed to read remote address[127.0.0.1:49679]: Connection reset
16:06:19.584 [ScheduleService-7] WARN  com.lealone.server.scheduler.GlobalScheduler - Failed to runEventLoop
java.lang.NullPointerException: Cannot invoke "java.nio.ByteBuffer.limit()" because "this.buff" is null
        at com.lealone.db.DataBuffer.clear(DataBuffer.java:496) ~[lealone-6.1.0-SNAPSHOT.jar:?]
        at com.lealone.net.NetBuffer.reset(NetBuffer.java:87) ~[lealone-6.1.0-SNAPSHOT.jar:?]
        at com.lealone.net.NetBuffer.recycle(NetBuffer.java:81) ~[lealone-6.1.0-SNAPSHOT.jar:?]
        at com.lealone.net.TransferInputStream.closeForce(TransferInputStream.java:115) ~[lealone-6.1.0-SNAPSHOT.jar:?]
        at com.lealone.server.TcpServerConnection.close(TcpServerConnection.java:222) ~[lealone-6.1.0-SNAPSHOT.jar:?]
        at com.lealone.server.AsyncServer.removeConnection(AsyncServer.java:133) ~[lealone-6.1.0-SNAPSHOT.ja        at com.lealone.server.TcpServerConnection.handleException(TcpServerConnection.java:65) ~[lealone-6.1.0-SNAPSHOT.jar:?]
        at com.lealone.net.nio.NioEventLoop.handleException(NioEventLoop.java:540) ~[lealone-6.1.0-SNAPSHOT.jar:?]
        at com.lealone.net.nio.NioEventLoop.handleReadException(NioEventLoop.java:527) ~[lealone-6.1.0-SNAPSHOT.jar:?]
        at com.lealone.net.nio.NioEventLoop.read(NioEventLoop.java:221) ~[lealone-6.1.0-SNAPSHOT.jar:?]     
        at com.lealone.net.nio.NioEventLoop.handleSelectedKeys(NioEventLoop.java:465) ~[lealone-6.1.0-SNAPSHOT.jar:?]
        at com.lealone.net.nio.NioEventLoop.handleSelectedKeys(NioEventLoop.java:450) ~[lealone-6.1.0-SNAPSHOT.jar:?]
        at com.lealone.server.scheduler.GlobalScheduler.runEventLoop(GlobalScheduler.java:441) [lealone-6.1.0-SNAPSHOT.jar:?]
        at com.lealone.server.scheduler.GlobalScheduler.run(GlobalScheduler.java:75) [lealone-6.1.0-SNAPSHOT.jar:?]
        at java.lang.Thread.run(Thread.java:840) [?:?]

@codefollower
Copy link
Member

lealone-6.1.0-SNAPSHOT 的代码还在快速迭代中,还没有稳定

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants