How could MySql Driver have this problem?
Posted by:
v d
Date: December 23, 2004 12:59AM
MySql Jdbc driver is probably used by million. Its very mature.
However, today, I hit a huge snag with it. Put it another way, 2 big snags with it.
First, I found a big memory leak in the moveToInsertRow()/insertRow() in the updatable resultset.
The leak is so big that the application goes out of memory quickly after 20-50 thousand inserts.
I already created a small test application for this, and will submit a bug report.
Second, I found that when you do a query:
select * from <table name>
When this table is large (like 200 thousand records, with 50 columns), the application just goes out of memory. If it does not go out of memory, it takes a long time before you retrieve the first record.
My question is this: how could this happens? Why did no one encounter this before?
There must be something wrong with the picture here. Was it something I did? I hope so, but I already check very carefully. For example, I switch the MySql Jdbc driver (latest production version), out and use a JdbcOdbc bridge to the same MySql database, and the memory problem goes away.
Ofcourse, software has bugs. However, you're talking about the most common things people do here.
How about select problem? This must be used very widely. Someone may say that this never happens, and people have to use a where clause, but what if I want to process all records?
Please share your thought, because I just don't understand how thing could be this mess up.