Bug #79619 Table 'database.Table_Name' doesn't exist.
Submitted: 13 Dec 2015 3:54 Modified: 13 Dec 2015 12:21
Reporter: Sayantan Mandal Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.7.9 OS:Windows (Windows 8.1 Build 9600)
Assigned to: CPU Architecture:Any

[13 Dec 2015 3:54] Sayantan Mandal
Description:
When I try to insert values into table "test" of database "sayan" using batch processing, I am seeing the following issue:

java.sql.BatchUpdateException: Table 'sayan.intotest' doesn't exist
	at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1102)
	at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:860)
	at SQL_Sayyan.Sample.main(Sample.java:22)

I am currently using mysql-connector-java-3.1.14-bin.jar for jdbc connectivity.

How to repeat:
1.Create a table, say table1 with a column column1.
2. Insert a record into table1 using Batch
3. Write the following java code.

   Class.forName("com.mysql.jdbc.Driver");
			
Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/"
					+ "sayan","root","root");  
   PreparedStatement ps=con.prepareStatement("Insert into"
					+ "test values(?,?)");
			int id=101;
			String s="sayantan";
			ps.setInt(1, id);
			ps.setString(2, s);
			ps.addBatch();
			int[] i=ps.executeBatch();

4. Simultaneously, open a mysql session in another window.

No matter how many times the code is executed for any database or the table, the same issue comes into picture.
[13 Dec 2015 12:21] MySQL Verification Team
try putting a space:  "Insert into "