continuent.org JIRA  History | Log In     View a printable version of the current page. Get help!  
Issue Details (XML | Word)

Key: MYO-99
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Gilles Rayrat
Reporter: Gilles Rayrat
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Tungsten Connector

Reconnections with "use" keyword confuse direct-connection management, leading to ArrayIndexOutOfBoundsException

Created: 02/Jul/09 10:04 AM   Updated: 02/Jul/09 10:10 AM
Component/s: MySQL protocol
Affects Version/s: None
Fix Version/s: 0.6.8

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description   
When issuing a "use <db>", the following error appears:
jvm 1 | Exception in thread "pool-2-thread-1" java.lang.ArrayIndexOutOfBoundsException: -1
jvm 1 | at java.util.Vector.elementAt(Vector.java:435)
jvm 1 | at org.continuent.myosotis.protocol.mysql.MySQLProtocolHandler.processQuery(MySQLProtocolHandler.java:555)
jvm 1 | at org.continuent.myosotis.protocol.mysql.MySQLProtocolHandler.processCommand(MySQLProtocolHandler.java:266)
jvm 1 | at org.continuent.myosotis.protocol.mysql.MySQLProtocolHandler.processClientPacket(MySQLProtocolHandler.java:222)
jvm 1 | at org.continuent.myosotis.protocol.mysql.MySQLConnectionHandler.run(MySQLConnectionHandler.java:104)
jvm 1 | at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
jvm 1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
jvm 1 | at java.lang.Thread.run(Thread.java:595)


This is due to the fact that we create a new connection, which then is different than the "connectionToUse". At the end of the query execution, this is confusing since this make the handler think that we were using a direct connection, so it tries to close it.

 All   Comments   Work Log   Change History      Sort Order:
Comment by Gilles Rayrat [02/Jul/09 10:10 AM]
Fixed in SVN: now reseting the connectionToUse after reconnection