Bug #69745 Major Open Source java application (Pentaho Data Integration v4.2.0)
Submitted: 15 Jul 2013 9:51 Modified: 15 Jul 2013 13:44
Reporter: gaurav singh Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.6.12 OS:Linux
Assigned to: CPU Architecture:Any
Tags: issue in fetching data from view

[15 Jul 2013 9:51] gaurav singh
Description:
Using the open source Tool PDI v4.2 below error occurred when we wre fetching the data from a View.  

2013/07/15 14:52:43 - Table input.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : Unexpected error
2013/07/15 14:52:43 - Add sequence 31.0 - Finished processing (I=0, O=0, R=2403, W=2403, U=0, E=0)
2013/07/15 14:52:43 - Table input.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : org.pentaho.di.core.exception.KettleDatabaseException: 
2013/07/15 14:52:43 - Table input.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : An error occurred executing SQL: 
2013/07/15 14:52:43 - Table input.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : select ov.name,bat.name from campusorganizationsview ov 
2013/07/15 14:52:43 - Table input.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : left join campusacdbatch bat on(bat.site_id=ov.entity_id and bat.site_dcnid=ov.dcnid) where bat.rowstate!=-1 and ov.entity_id=?
2013/07/15 14:52:43 - Table input.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : Prepared statement needs to be re-prepared
2013/07/15 14:52:43 - Table input.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : 
2013/07/15 14:52:43 - Table input.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : 	at org.pentaho.di.core.database.Database.openQuery(Database.java:1912)
2013/07/15 14:52:43 - Table input.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : 	at org.pentaho.di.trans.steps.tableinput.TableInput.doQuery(TableInput.java:225)
2013/07/15 14:52:43 - Table input.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : 	at org.pentaho.di.trans.steps.tableinput.TableInput.processRow(TableInput.java:133)
2013/07/15 14:52:43 - Table input.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : 	at org.pentaho.di.trans.step.RunThread.run(RunThread.java:40)
2013/07/15 14:52:43 - Table input.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : 	at java.lang.Thread.run(Thread.java:619)
2013/07/15 14:52:43 - Table input.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : Caused by: java.sql.SQLException: Prepared statement needs to be re-prepared
2013/07/15 14:52:43 - Table input.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : 	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1062)
2013/07/15 14:52:43 - Table input.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : 	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4187)
2013/07/15 14:52:43 - Table input.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : 	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4119)
2013/07/15 14:52:43 - Table input.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : 	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2570)
2013/07/15 14:52:43 - Table input.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : 	at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1383)
2013/07/15 14:52:43 - Table input.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : 	at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:841)
2013/07/15 14:52:43 - Table input.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : 	at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2306)
2013/07/15 14:52:43 - Table input.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : 	at org.pentaho.di.core.database.Database.openQuery(Database.java:1873)
2013/07/15 14:52:43 - Table input.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : 	... 4 more
2013/07/15 14:52:43 - Select values 7.0 - Finished processing (I=0, O=0, R=8, W=8, U=0, E=0)
2013/07/15 14:52:43 - Add sequence 4.0 - Finished processing (I=0, O=0, R=10, W=10, U=0, E=0)
2013/07/15 14:52:43 - Select values 30.0 - Finished processing (I=0, O=0, R=4, W=4, U=0, E=0)
2013/07/15 14:52:43 - Select values 27.0 - Finished processing (I=0, O=0, R=8, W=8, U=0, E=0)
2013/07/15 14:52:43 - Add sequence 44.0 - Finished processing (I=0, O=0, R=6, W=6, U=0, E=0)

Kindly help.

How to repeat:
Use opensource Tool PDI 4.2.

Use databaselookup and try to fetch data from view.

Error will occur on runtime.
[15 Jul 2013 10:13] MySQL Verification Team
the cause of this is explained in the manual.
http://dev.mysql.com/doc/refman/5.6/en/statement-caching.html
[15 Jul 2013 10:29] Hartmut Holzgraefe
Most likely not a bug and this isn't a support forum ...
(there is a canned response for that but I don't have access to it)

"Prepared statement needs to be re-prepared" seems to be the actual error message, and that is just an informational message that auto-re-prepare
of a prepared statement failed. Correct handling would be to re-prepare
the statement on the client/application side, then executed it again.

There are some that report that increasing the table_definition_cache
makes hitting this kind of warning less likely, e.g. in the discussion
on http://bugs.mysql.com/bug.php?id=42041
[15 Jul 2013 13:44] Tonci Grgin
We're sorry, but the bug system is not the appropriate forum for asking help on using MySQL products. Your problem is not the result of a bug.

Support on using our products is available both free in our forums at http://forums.mysql.com/ and for a reasonable fee direct from our skilled support engineers at http://www.mysql.com/support/

Thank you for your interest in MySQL.

Gaurav, please see Hartmut's explanation. Hartmut, thanks.