Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001221 [Resin] minor always 06-28-06 09:58 06-28-06 19:03
Reporter artem View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.0.20 Product Version 3.0.19
  Product Build
Summary 0001221: reopen issue 0001188. more details. mysql SELECT * from table1
Description I added
<log name="" level="all" path="logs/error.log" timestamp="[%H:%M:%S.%s] "/>
to conf file.

It showed following error on "select * from table1" query.

[19:49:07.781] java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Date
[19:49:07.781] at com.mysql.jdbc.ResultSet.getDateFromString(ResultSet.java:1963)
[19:49:07.781] at com.mysql.jdbc.ResultSet.getStringInternal(ResultSet.java:4874)
[19:49:07.781] at com.mysql.jdbc.ResultSet.getString(ResultSet.java:4739)
[19:49:07.781] at com.caucho.quercus.lib.db.JdbcResultResource.getColumnValue(JdbcResultResource.java:1009)
[19:49:07.781] at com.caucho.quercus.lib.db.JdbcResultResource.fetchArray(JdbcResultResource.java:911)
[19:49:07.781] at com.caucho.quercus.lib.db.MysqliResult.fetch_array(MysqliResult.java:90)
[19:49:07.781] at com.caucho.quercus.lib.db.MysqlModule.mysql_fetch_array(MysqlModule.java:257)
[19:49:07.781] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[19:49:07.781] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[19:49:07.781] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[19:49:07.781] at java.lang.reflect.Method.invoke(Method.java:585)
[19:49:07.781] at com.caucho.quercus.module.StaticFunction.invoke(StaticFunction.java:114)
[19:49:07.781] at com.caucho.quercus.env.JavaInvoker.call(JavaInvoker.java:531)
[19:49:07.781] at com.caucho.quercus.env.JavaInvoker.call(JavaInvoker.java:404)
[19:49:07.781] at com.caucho.quercus.env.JavaInvoker.call(JavaInvoker.java:390)
[19:49:07.781] at com.caucho.quercus.env.JavaInvoker.callCopy(JavaInvoker.java:399)
[19:49:07.781] at com.caucho.quercus.expr.FunctionExpr.evalImpl(FunctionExpr.java:179)
[19:49:07.781] at com.caucho.quercus.expr.FunctionExpr.evalCopy(FunctionExpr.java:150)
[19:49:07.781] at com.caucho.quercus.expr.AssignExpr.eval(AssignExpr.java:80)
[19:49:07.781] at com.caucho.quercus.expr.Expr.evalBoolean(Expr.java:443)
[19:49:07.781] at com.caucho.quercus.program.WhileStatement.execute(WhileStatement.java:62)
[19:49:07.781] at com.caucho.quercus.program.BlockStatement.execute(BlockStatement.java:112)
[19:49:07.781] at com.caucho.quercus.program.QuercusProgram.execute(QuercusProgram.java:264)
[19:49:07.781] at com.caucho.quercus.page.InterpretedPage.execute(InterpretedPage.java:71)
[19:49:07.781] at com.caucho.quercus.page.QuercusPage.executeTop(QuercusPage.java:122)
[19:49:07.781] at com.caucho.quercus.servlet.QuercusServlet.service(QuercusServlet.java:237)
[19:49:07.781] at javax.servlet.http.HttpServlet.service(HttpServlet.java:92)
[19:49:07.781] at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:106)
[19:49:07.781] at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:178)
[19:49:07.781] at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229)
[19:49:07.781] at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:268)
[19:49:07.781] at com.caucho.server.port.TcpConnection.run(TcpConnection.java:402)
[19:49:07.781] at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:507)
[19:49:07.781] at com.caucho.util.ThreadPool.run(ThreadPool.java:433)
[19:49:07.781] at java.lang.Thread.run(Thread.java:595)


It seems it does not work well with dates. May be new Date('0000-00-00') does not work well.
Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0001350)
ferg
06-28-06 19:03

php/141e

The underlying issue looks like a problem with the mysql driver. That in itself isn't something Quercus can do anything about.

Quercus can catch the exception and return null when the column is invalid, like in this case. So the rest of the data will be available.
 

- Issue History
Date Modified Username Field Change
06-28-06 09:58 artem New Issue
06-28-06 19:03 ferg Note Added: 0001350
06-28-06 19:03 ferg Assigned To  => ferg
06-28-06 19:03 ferg Status new => closed
06-28-06 19:03 ferg Resolution open => fixed
06-28-06 19:03 ferg Fixed in Version  => 3.0.20


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker