Gilles Rayrat (JIRA)
2009-10-01 16:40:46 UTC
NPE when reading resultset containing zero year (with option yearIsDateType=false)
----------------------------------------------------------------------------------
Key: MYO-109
URL: https://forge.continuent.org/jira/browse/MYO-109
Project: Tungsten Connector
Type: Bug
Components: MySQL protocol
Reporter: Gilles Rayrat
Assigned to: Gilles Rayrat
Fix For: 0.6.8
With the following entries:
mysql> show create table t;
+-------+--------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+--------------------------------------------------------------------------------------------------------------------+
| t | CREATE TABLE `t` (
`y1` year(4) DEFAULT NULL,
`y2` year(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 |
+-------+--------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql> select * from t;
+------+------+
| y1 | y2 |
+------+------+
| 0000 | 00 |
+------+------+
4 rows in set (0.00 sec)
selecting * from t from the connector where mysql url option has yearIsDateType=false will show the following stacktrace:
INFO | jvm 1 | 2009/10/01 18:38:41 | Exception in thread "pool-2-thread-1" java.lang.NullPointerException
INFO | jvm 1 | 2009/10/01 18:38:41 | at org.continuent.myosotis.protocol.mysql.MySQLProtocolHandler.sendDate(MySQLProtocolHandler.java:1537)
INFO | jvm 1 | 2009/10/01 18:38:41 | at org.continuent.myosotis.protocol.mysql.MySQLProtocolHandler.sendResultSetRowMessage(MySQLProtocolHandler.java:1438)
INFO | jvm 1 | 2009/10/01 18:38:41 | at org.continuent.myosotis.protocol.mysql.MySQLProtocolHandler.sendResultSet(MySQLProtocolHandler.java:543)
INFO | jvm 1 | 2009/10/01 18:38:41 | at org.continuent.myosotis.protocol.mysql.MySQLProtocolHandler.sendAllResultSets(MySQLProtocolHandler.java:458)
INFO | jvm 1 | 2009/10/01 18:38:41 | at org.continuent.myosotis.protocol.mysql.MySQLProtocolHandler.processQuery(MySQLProtocolHandler.java:383)
INFO | jvm 1 | 2009/10/01 18:38:41 | at org.continuent.myosotis.protocol.mysql.MySQLProtocolHandler.processCommand(MySQLProtocolHandler.java:198)
INFO | jvm 1 | 2009/10/01 18:38:41 | at org.continuent.myosotis.protocol.mysql.MySQLProtocolHandler.processClientPacket(MySQLProtocolHandler.java:154)
INFO | jvm 1 | 2009/10/01 18:38:41 | at org.continuent.myosotis.protocol.mysql.MySQLConnectionHandler.run(MySQLConnectionHandler.java:104)
INFO | jvm 1 | 2009/10/01 18:38:41 | at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
INFO | jvm 1 | 2009/10/01 18:38:41 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
INFO | jvm 1 | 2009/10/01 18:38:41 | at java.lang.Thread.run(Thread.java:595)
----------------------------------------------------------------------------------
Key: MYO-109
URL: https://forge.continuent.org/jira/browse/MYO-109
Project: Tungsten Connector
Type: Bug
Components: MySQL protocol
Reporter: Gilles Rayrat
Assigned to: Gilles Rayrat
Fix For: 0.6.8
With the following entries:
mysql> show create table t;
+-------+--------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+--------------------------------------------------------------------------------------------------------------------+
| t | CREATE TABLE `t` (
`y1` year(4) DEFAULT NULL,
`y2` year(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 |
+-------+--------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql> select * from t;
+------+------+
| y1 | y2 |
+------+------+
| 0000 | 00 |
+------+------+
4 rows in set (0.00 sec)
selecting * from t from the connector where mysql url option has yearIsDateType=false will show the following stacktrace:
INFO | jvm 1 | 2009/10/01 18:38:41 | Exception in thread "pool-2-thread-1" java.lang.NullPointerException
INFO | jvm 1 | 2009/10/01 18:38:41 | at org.continuent.myosotis.protocol.mysql.MySQLProtocolHandler.sendDate(MySQLProtocolHandler.java:1537)
INFO | jvm 1 | 2009/10/01 18:38:41 | at org.continuent.myosotis.protocol.mysql.MySQLProtocolHandler.sendResultSetRowMessage(MySQLProtocolHandler.java:1438)
INFO | jvm 1 | 2009/10/01 18:38:41 | at org.continuent.myosotis.protocol.mysql.MySQLProtocolHandler.sendResultSet(MySQLProtocolHandler.java:543)
INFO | jvm 1 | 2009/10/01 18:38:41 | at org.continuent.myosotis.protocol.mysql.MySQLProtocolHandler.sendAllResultSets(MySQLProtocolHandler.java:458)
INFO | jvm 1 | 2009/10/01 18:38:41 | at org.continuent.myosotis.protocol.mysql.MySQLProtocolHandler.processQuery(MySQLProtocolHandler.java:383)
INFO | jvm 1 | 2009/10/01 18:38:41 | at org.continuent.myosotis.protocol.mysql.MySQLProtocolHandler.processCommand(MySQLProtocolHandler.java:198)
INFO | jvm 1 | 2009/10/01 18:38:41 | at org.continuent.myosotis.protocol.mysql.MySQLProtocolHandler.processClientPacket(MySQLProtocolHandler.java:154)
INFO | jvm 1 | 2009/10/01 18:38:41 | at org.continuent.myosotis.protocol.mysql.MySQLConnectionHandler.run(MySQLConnectionHandler.java:104)
INFO | jvm 1 | 2009/10/01 18:38:41 | at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
INFO | jvm 1 | 2009/10/01 18:38:41 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
INFO | jvm 1 | 2009/10/01 18:38:41 | at java.lang.Thread.run(Thread.java:595)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://forge.continuent.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://forge.continuent.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira