我们在MariaDB中有一个存储过程,在服务器上运行良好,但是当我们使用JDBC从客户端运行时,我们可以获取到前几行,但是后面总是出现以下错误:
unexpected end of stream, read 0 bytes from 4 (socket was closed by server)
表loan_balances2不是太大,大约有600K行。这是存储过程,你看到有什么问题吗?谢谢!
CREATE PROCEDURE `get_loan_balances_sample`() BEGIN drop table if exists all_loan_ids; drop table if exists random_loan_ids; create table all_loan_ids as select distinct loan_id from loan_balances2; create table random_loan_ids as select * from all_loan_ids order by RAND() limit 50; SELECT * FROM loan_balances2 where loan_id in (select Loan_ID from random_loan_ids) order by Loan_ID, balance_date; END
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号